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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53126 <at> debbugs.gnu.org
Subject: Re: bug#53126: 29.0.50; [PATCH] Lazy highlight/count when reading
 query-replace string, etc.
Date: Thu, 17 Mar 2022 20:45:57 +0100
On Thu, 17 Mar 2022 at 19:05, Juri Linkov <juri <at> linkov.net> wrote:

>>> When I tried your latest patch, it still flashes when it starts
>>> the perform-replace loop.
>>
>> Does it always happen for you?  I see this occasionally, and as far as I
>> can tell it's random.
>
> It happens every time when starting perform-replace from isearch.

Interesting, I can't see thing flash at that particular place.  But I've
replaced the unwind-protect by a more fine-grained condition-case.  Let
me know if it helps.

> The biggest hunk in your patch are changes in query-replace-read-args
> starting from 'condition-case error'.  Would it be possible to simplify
> this part?  Maybe by some refactoring?

The only refactoring opportunity I see it to define

    (defun replace-regexp-function (delimited-flag)
      (or replace-regexp-function
          delimited-flag
          (and replace-char-fold
               (not regexp-flag)
               #'char-fold-to-regexp)))

which can be used in 3 places.  Should I do that?

Otherwise, I dont' see much room for improvement.  There are a lot of
moving parts there, so to me things already turned out surprisingly
short.




This bug report was last modified 3 years and 38 days ago.

Previous Next


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