bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22479: 25.0.50; isearch and query-replace histories do not remember


From: Juri Linkov
Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols
Date: Thu, 28 Jan 2016 01:08:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu)

> Hi. It is possible to look for a symbol, and for this information to be
> lost when repeating a search. For instance, say I have this buffer:
>
> =======
> a b c
> ab bc
> =======
>
> 1. I put the point on the first 'a'
>
> 2. M-s . (search for symbol at point). This find a symbol 'a', so the
>    'a' in 'ab' doesn't match
>
> 3. C-g (quit the search)
>
> 4. C-s C-s (repeat previous search). Here emacs remembers we looked for
>    'a', but not that it was a symbol, so it finds the 'a' in 'ab' even
>    though it should not
>
>
>
> A similar sequence is possible with query-replace:
>
> 1. Point on 'a'
>
> 2. M-s .
>
> 3. C-M-%, 'asdf' to replace the symbol 'a' with 'asdf'
>
> 4. C-g (quit before replacing anything)
>
> 5. C-M-% (repeat last replacement. The symbol-ness of 'a' was forgotten)
>
>
> The simplest way to fix this would probably be to treat these as regex
> searches wrapped in \_<...\_>. The downside is that to access the
> history we'd have to do C-M-s C-M-s instead of C-s C-s, but maybe that
> is ok. Thoughts?

Thanks for the test cases.  We started designing the customizable variables
for this feature in bug#11378, and reached no final implementation.
What do you think about the proposal in bug#11378?

Since the original subject of bug#11378 was quite different,
I propose to close bug#11378, and leave this bug#22479 open
to implement this feature here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]