GNU bug report logs - #22479
25.0.50; isearch and query-replace histories do not remember if we were looking for symbols

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Wed, 27 Jan 2016 22:29:01 UTC

Severity: minor

Found in version 25.0.50

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dima Kogan <dima <at> secretsauce.net>
Subject: bug#22479: closed (Re: bug#22479: 25.0.50; isearch and
 query-replace histories do not remember if we were looking for symbols)
Date: Thu, 19 Apr 2018 20:33:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 22479 <at> debbugs.gnu.org.

-- 
22479: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22479
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 22479-done <at> debbugs.gnu.org
Subject: Re: bug#22479: 25.0.50;
 isearch and query-replace histories do not remember if we were
 looking for symbols
Date: Thu, 19 Apr 2018 23:32:04 +0300
Version: 27.0.50

> I'm not sure if I found all problems or there will be more trouble,
> but at least these fixes were necessary for this patch:

Pushed to master as 99de04e.

[Message part 3 (message/rfc822, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 isearch and query-replace histories do not remember if we were
 looking for symbols
Date: Wed, 27 Jan 2016 14:27:53 -0800
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?



This bug report was last modified 7 years and 33 days ago.

Previous Next


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