GNU bug report logs - #54733
Match again in perform-replace

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Tue, 5 Apr 2022 17:41:02 UTC

Severity: normal

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> jurta.org>, 54733 <at> debbugs.gnu.org
Subject: Re: bug#54733: Match again in perform-replace
Date: Tue, 21 Jun 2022 02:59:06 +0300
Hi Juri,

Thanks for working on this.

On 03.05.2022 10:10, Juri Linkov wrote:
> +				(replace-search search-string limit
> +						regexp-flag delimited-flag
> +						case-fold-search backward))

I don't know this code too well, but perhaps SEARCH_STRING here should 
be anchored with something like "\\=" at the beginning?

Otherwise the search can succeed here even if the next match is not 
here. Not sure how important that is, though.

> -         ;; Counteract the "do the next match now" hack in
> -         ;; `perform-replace'.  And still, it'll report that those
> -         ;; matches were "filtered out" at the end.
> -         (isearch-filter-predicate
> -          (lambda (beg end)
> -            (and current-beg
> -                 (>= beg current-beg)
> -                 (<= end current-end))))

Please note that we'll likely have to keep this code here for a number 
of Emacs releases. So the patch should be tested with both versions: 
with this code present and with it removed, to ensure present and future 
compatibility.




This bug report was last modified 2 years and 350 days ago.

Previous Next


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