GNU bug report logs - #25591
25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Tue, 31 Jan 2017 18:04:02 UTC

Severity: minor

Found in version 25.1

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Cc: 25591 <at> debbugs.gnu.org
Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search
Date: Wed, 01 Feb 2017 02:23:27 +0200
> I don't know if this is a bug, but it's disappointing and inconvenient.
>
> Start emacs with -Q, and type into the *scratch* buffer these 10 characters:
>
>     I ate this
>
> Now do C-a to move point to the beginning of the line.
>
> Now replace the symbol "i" with "u":
>
>    M-s _ i M-% u RET !
>
> So far, so good: we are looking at
>
>    U at this
>
> which is correct.
>
> Now try to repeat the replacement:
>
>    C-a M-% RET !
>
> This changes the "i" in "this" to a u, even though that "i" isn't an
> independent symbol.  I was hoping that it would do nothing.

Thanks for the feature request, or you might call it a bug
since it doesn't do what you expect.

We discussed this for isearch a while ago, where the proposal was
for ‘C-s C-s’ to reuse the search type from a previous search.
You rightfully want the same for ‘M-% RET’ to reuse a previous
replacement type.

The main problem in https://debbugs.gnu.org/22479 was to find a suitable
data structure complementary to the existing history lists to keep
search/replacement meta-data as well.




This bug report was last modified 8 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.