unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols
@ 2016-01-27 22:27 Dima Kogan
  2016-01-27 23:08 ` Juri Linkov
  2016-01-28  8:10 ` Stephen Berman
  0 siblings, 2 replies; 23+ messages in thread
From: Dima Kogan @ 2016-01-27 22:27 UTC (permalink / raw)
  To: 22479

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?





^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-04-23  2:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 22:27 bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Dima Kogan
2016-01-27 23:08 ` Juri Linkov
2016-01-30 11:43   ` Dima Kogan
2016-01-31  0:04     ` Juri Linkov
2016-01-31  1:00       ` Drew Adams
2016-01-31 17:20         ` Dima Kogan
2016-01-31 22:05           ` Juri Linkov
2016-02-02  5:32             ` Dima Kogan
2016-02-03  0:39               ` Juri Linkov
2016-02-04  0:35               ` Juri Linkov
2016-02-04  1:38                 ` Dima Kogan
2016-02-04  7:42       ` Dima Kogan
2016-02-05  0:50         ` Juri Linkov
2018-03-12 21:43         ` Juri Linkov
2018-04-14 21:22           ` Juri Linkov
2018-04-19 20:32             ` Juri Linkov
2018-04-20  7:29               ` Eli Zaretskii
2018-04-21 20:02                 ` Juri Linkov
2018-04-22  2:37                   ` Eli Zaretskii
2018-04-22 22:11                     ` Juri Linkov
2018-04-23  2:34                       ` Eli Zaretskii
2016-01-28  8:10 ` Stephen Berman
2016-01-28 10:17   ` Dima Kogan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).