GNU bug report logs -
#53126
29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc.
Previous Next
Reported by: Augusto Stoffel <arstoffel <at> gmail.com>
Date: Sat, 8 Jan 2022 13:25:01 UTC
Severity: normal
Tags: patch
Merged with 53341
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #148 received at 53126 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've attached a sketch of a macro to help activating the minibuffer lazy
highlight. It doesn't make query-replace-read-args exactly short, but
if you like this, I can prepare the patch.
Note that I haven't tested this code at all. It's for impressionistic
purposes only.
[0001-Display-lazy-highlight-and-match-count-in-query-repl.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Below a response to your last message.
On Sat, 2 Apr 2022 at 21:23, Juri Linkov <juri <at> linkov.net> wrote:
>> - The value of case-fold-search can change on the fly
>
> Please clarify when it can be changed on the fly.
I refer to the following lines of my patch, which are necessary.
(when (and case-fold-search search-upper-case)
(setq isearch-case-fold-search
(isearch-no-upper-case-p from-string regexp-flag)))
(Incidentally, I like better the ripgrep smart case, where an uppercase
character only matches itself, and lowercase characters match both upper
and lower case.)
>> I'm referring to the anzu feature whereby the replacement text is shown
>> next to each match, like this:
>>
>> This will not be totally trivial to implement, right? And it will add
>> some extra stuff to query-replace-read-args that is very much
>> query-replace specific.
>
> I very much doubt in usefulness of such a feature. I thought it could
> simply highlight the replacement text to show the places in the buffer
> that already contain such replacement text.
The anzu thing is only really meaningful if you are doing some complex
replacements with \, and whatnot. But in that case, I guess it could
help a lot?
This bug report was last modified 3 years and 39 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.