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


Message #32 received at 22479 <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: 22479 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#22479: 25.0.50;
 isearch and query-replace histories do not remember if we were
 looking for symbols
Date: Mon, 01 Feb 2016 21:32:08 -0800
Juri Linkov <juri <at> linkov.net> writes:

>>> 5. More ideas? ;)
>>
>> - We can retain the two histories: regex, non-regex
>>
>> - Any fancy (word, symbol, etc) searches can be stored into the regex
>>   history, bookmarked with the appropriate regexen ("\_<", "\_>" for
>>   instance)
>>
>> - When reading the history to present to the user, these can be parsed
>>   out. So for instance when the user looks through the symbol-search
>>   history by hitting
>>
>>   M-s _
>>   C-s
>>
>>   emacs can look through the regex history, only selecting entries in
>>   \_<...\_>. The C-M-s history can either include all of these, or show
>>   only unbookmarked entries; both would be ok, I think.
>
> This approach is compromising but unreliable

Indeed it is a compromise. It feels to me to be much better than what we
have now, and the issues aren't too significant... I think...


> (doesn't distinguish between the case when the user uses the symbol
> search M-s _ or types \_<...\_> directly in the regexp search)

True, but I think this is OK. The symbol-search history would include
M-s _ searches AND those C-M-s searches where the intent was to look for
symbols; I think this is fine. The regex-search history would include
all symbol searches also; maybe that is less fine, but it isn't crazy.
The text search history would include none of these; this is GOOD, and
is not what we do now.


> (need to remember other search parameters like case-fold and
> lax-whitespace).

Hmmm. This clearly requires metadata so some of your other, more
intrusive proposals would be required to handle this. The above proposal
would work for word and symbol searches. I think fixing that would be
worth it. Do yall just want to leave it alone?




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.