GNU bug report logs - #53126
29.0.50; [PATCH] Lazy highlight/count when reading query-replace string, etc.

Previous Next

Package: emacs;

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 #151 received at 53126 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 53126 <at> debbugs.gnu.org
Subject: Re: bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading
 query-replace string, etc.
Date: Sun, 03 Apr 2022 20:06:37 +0300
> 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,

I guess it will be much shorter for other less complex uses like occur?
So the complexity of this feature activation will be hidden inside the macro.

> Note that I haven't tested this code at all.  It's for impressionistic
> purposes only.

This code doesn't look bad when other uses will have just one line with
with-minibuffer-lazy-highlight.  But then the macro
with-minibuffer-lazy-highlight needs to set some reasonable
default values to isearch variables, such as setting
isearch-forward to t, etc.

> but if you like this, I can prepare the patch.

Currently it fails with

  Eager macro-expansion failure: (error
  "Malformed argument list ends with: ...

so it seems the macro complexity makes it too fragile.
OTOH, spreading this complexity in every feature use
doesn't look better.

> 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?

I can see how it could help during replacements, but not during entering
the replacement string.




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.