GNU bug report logs - #55110
29.0.50; Regression in query-replace prompt

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Juri Linkov <juri@HIDDEN>; dated Mon, 25 Apr 2022 15:46:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 55110 <at> debbugs.gnu.org:


Received: (at 55110) by debbugs.gnu.org; 15 May 2022 18:46:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 15 14:46:24 2022
Received: from localhost ([127.0.0.1]:50751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nqJG4-0008Ak-F2
	for submit <at> debbugs.gnu.org; Sun, 15 May 2022 14:46:24 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:57289)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nqJG2-00084S-SB
 for 55110 <at> debbugs.gnu.org; Sun, 15 May 2022 14:46:23 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 4252CFF803;
 Sun, 15 May 2022 18:46:14 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#55110: 29.0.50; Regression in query-replace prompt
Organization: LINKOV.NET
References: <86levtfa31.fsf@HIDDEN> <8735hzzl5n.fsf@HIDDEN>
 <86tuaft1fr.fsf@HIDDEN> <87fslcumpq.fsf@HIDDEN>
Date: Sun, 15 May 2022 21:45:51 +0300
In-Reply-To: <87fslcumpq.fsf@HIDDEN> (Augusto Stoffel's message of "Sat, 14
 May 2022 18:02:09 +0200")
Message-ID: <86y1z2ocrk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 55110
Cc: 55110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> So maybe a buffer-local value of `isearch-filter-predicate'
>> in the minibuffer would help.
>
> Yes, that indeed solves the problem.  See attached patch.

Thanks, pushed.

>> Also I recommend to make all hooks in `minibuffer-lazy-highlight-setup'
>> local by adding the argument LOCAL to add-hook/remove-hook.
>
> Indeed, the minibuffer lazy highlight feature is currently incompatible
> with recursive minibuffers.  The patch fixes that as well.
>
> There's a caveat, though: isearch in a recursive minibuffer is again
> affected by the presence of an inappropriate filter function.  Fixing
> that in a robust way might require a bigger refactoring of the lazy
> highlight feature, I think.  Another option might be to make
> `replace--region-filter' also check for the value of `(current-buffer)'.

I see no problem to fix this because every minibuffer uses own buffer,
so they have separate buffer-local variables.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55110; Package emacs. Full text available.

Message received at 55110 <at> debbugs.gnu.org:


Received: (at 55110) by debbugs.gnu.org; 14 May 2022 16:02:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 14 12:02:19 2022
Received: from localhost ([127.0.0.1]:47347 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1npuDi-0005U9-St
	for submit <at> debbugs.gnu.org; Sat, 14 May 2022 12:02:19 -0400
Received: from mail-ed1-f43.google.com ([209.85.208.43]:43669)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1npuDh-0005Tu-Or
 for 55110 <at> debbugs.gnu.org; Sat, 14 May 2022 12:02:18 -0400
Received: by mail-ed1-f43.google.com with SMTP id c12so13281452edv.10
 for <55110 <at> debbugs.gnu.org>; Sat, 14 May 2022 09:02:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=fAHM5bcb+CSDU1aVBvY4ByOjURaGQv3OU661OsMuucM=;
 b=eUgXIRvlShLxf9tyy/WL/u6aJddvRndTY8dQqHn6P54j6mw9u4t7Pdlj/tRzKGeiWO
 l94nk3ibKFzJ1z3PlimqkZEAs7/2Cp5gLcblua4y+fsNJQJhBRHDH0e1bQHieEJFz6aU
 aeL5rGg2MddU/vdyvzbUZElx9ycvMnVlTo93UF/kYE/qu77WKMuzLVqb993u4Fa7FZq/
 FeCILEo3iKmwSM8+IT+bKik5OrGAzB1BgMpXv2TA+A7SjDhbcHNtnFxY8vyjAtJNcz5o
 Qfuy3FdE/tmzwAXmvoVsNYoO/5yQz5bbMUrcT9rXjk3qMsdA5l5tm7GerLyQ8Wbxp4oW
 8c2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=fAHM5bcb+CSDU1aVBvY4ByOjURaGQv3OU661OsMuucM=;
 b=4ciET7XvHhCS3K14unR+T3TGXfJZMTVy52YtXHm1TrTsnlfOThF+b/JTp1XvUGp/gL
 EMUIcy7ZqJ3gpg+4zyjZVO2Q55NHBldjjlEXWN2CFzt2Oz8o3bZ1MFwgXw50oktk9gvK
 ylEmp2iWpJAECUkKPU39pibqAUJan0EBw86LO3DhjrdhRsbcaUo/17fjXwPOY5Gky/3K
 8tSkuMWGm0t5Mz2qdtncNEXnzDtaf1dVI4fmpVhB8Gv5Y3GYhkYhDZUjKYdvCFmWquyK
 pTgnottmcYPQXmfvHAfYtNcIhDAfyBAIJEE21FT9r/uU4P6CczH4+KN5EaRrrIxh/uhS
 LhXg==
X-Gm-Message-State: AOAM533CLXTfoLvvupTvvvXwZsB8fSXVgHGENjjwknPv0Zs1UsH2LWzA
 3CWptr76qQfIBMwKNflcnmJ28oGTWHY=
X-Google-Smtp-Source: ABdhPJzBH17QFljxrzzfp5VNfDyM6Xcbsz+CsS31kBQ1FwGPEC4w0RlwCaPEAWIBgfL0DD+bjMyzFA==
X-Received: by 2002:a05:6402:4256:b0:428:39:c6c7 with SMTP id
 g22-20020a056402425600b004280039c6c7mr4456353edb.374.1652544131576; 
 Sat, 14 May 2022 09:02:11 -0700 (PDT)
Received: from ars3 ([2a02:8109:8ac0:56d0::1b06])
 by smtp.gmail.com with ESMTPSA id
 jy7-20020a170907762700b006f3ef214dc0sm1803028ejc.38.2022.05.14.09.02.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 14 May 2022 09:02:10 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#55110: 29.0.50; Regression in query-replace prompt
References: <86levtfa31.fsf@HIDDEN> <8735hzzl5n.fsf@HIDDEN>
 <86tuaft1fr.fsf@HIDDEN>
Date: Sat, 14 May 2022 18:02:09 +0200
In-Reply-To: <86tuaft1fr.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 27 Apr 2022 10:44:56 +0300")
Message-ID: <87fslcumpq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 55110
Cc: 55110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

On Wed, 27 Apr 2022 at 10:44, Juri Linkov <juri@HIDDEN> wrote:

>>> Maybe this is caused by minibuffer-lazy-highlight-setup
>>> that sets filter to replace--region-filter in the minibuffer
>>> instead of the original buffer?
>>
>> Most likely, yes.  `replace--region-filter' is modified globally, so a
>> similar problem should happen if you temporarily leave the minibuffer
>> and do Isearch in any other buffer.
>>
>> If that's the case, I think we would have two options:
>>
>> 1) Add a quick fix for the minibuffer Isearch only.
>>
>> 2) A more complicated change that solves the issue generally by saving
>> the region filter in the fashion of isearch-lazy-highlight-regexp et
>> alii.
>>
>> WDYT?
>
> Recently we fixed a similar problem in `perform-replace'
> by creating a dynamically bound value in `let':
>
>   (let ((opos (point-marker))
>         ;; Restore original isearch filter to allow
>         ;; using isearch in a recursive edit even
>         ;; when perform-replace was started from
>         ;; `xref--query-replace-1' that let-binds
>         ;; `isearch-filter-predicate' (bug#53758).
>         (isearch-filter-predicate #'isearch-filter-visible))
>
> So maybe a buffer-local value of `isearch-filter-predicate'
> in the minibuffer would help.

Yes, that indeed solves the problem.  See attached patch.

> Also I recommend to make all hooks in `minibuffer-lazy-highlight-setup'
> local by adding the argument LOCAL to add-hook/remove-hook.

Indeed, the minibuffer lazy highlight feature is currently incompatible
with recursive minibuffers.  The patch fixes that as well.

There's a caveat, though: isearch in a recursive minibuffer is again
affected by the presence of an inappropriate filter function.  Fixing
that in a robust way might require a bigger refactoring of the lazy
highlight feature, I think.  Another option might be to make
`replace--region-filter' also check for the value of `(current-buffer)'.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Make-minibuffer-lazy-highlight-setup-buffer-local-wh.patch

From 37de4e53fce6adbf5e52f3184c163574e3129def Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@HIDDEN>
Date: Sat, 14 May 2022 17:21:27 +0200
Subject: [PATCH] Make minibuffer lazy highlight setup buffer-local where
 appropriate

* lisp/isearch.el (minibuffer-lazy-highlight-setup): Modify hooks
buffer-locally, so that recursive minibuffers are not affected by the
special behavior of lazy-highlight.  Also make
'isearch-filter-predicate' buffer-local, so that isearch in the
minibuffer is not affected by the region filter (bug#55110).
---
 lisp/isearch.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 96168f94bd..3e1dab4d15 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4441,12 +4441,13 @@ minibuffer-lazy-highlight-setup
                                 (format minibuffer-lazy-count-format
                                         isearch-lazy-count-total)))))
       (lambda ()
-        (add-hook 'minibuffer-exit-hook unwind)
-        (add-hook 'after-change-functions after-change)
+        (add-hook 'minibuffer-exit-hook unwind nil t)
+        (add-hook 'after-change-functions after-change nil t)
         (when minibuffer-lazy-count-format
           (setq overlay (make-overlay (point-min) (point-min) (current-buffer) t))
           (add-hook 'lazy-count-update-hook display-count))
         (when filter
+          (make-local-variable 'isearch-filter-predicate)
           (add-function :after-while isearch-filter-predicate filter))
         (funcall after-change nil nil nil)))))
 
-- 
2.36.1


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55110; Package emacs. Full text available.

Message received at 55110 <at> debbugs.gnu.org:


Received: (at 55110) by debbugs.gnu.org; 27 Apr 2022 07:46:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 27 03:46:07 2022
Received: from localhost ([127.0.0.1]:41134 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njcND-0000Me-Gk
	for submit <at> debbugs.gnu.org; Wed, 27 Apr 2022 03:46:07 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48533)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1njcNA-0000Lz-2R
 for 55110 <at> debbugs.gnu.org; Wed, 27 Apr 2022 03:46:06 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id DCD264000B;
 Wed, 27 Apr 2022 07:45:56 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#55110: 29.0.50; Regression in query-replace prompt
Organization: LINKOV.NET
References: <86levtfa31.fsf@HIDDEN> <8735hzzl5n.fsf@HIDDEN>
Date: Wed, 27 Apr 2022 10:44:56 +0300
In-Reply-To: <8735hzzl5n.fsf@HIDDEN> (Augusto Stoffel's message of "Tue, 26
 Apr 2022 21:42:28 +0200")
Message-ID: <86tuaft1fr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 55110
Cc: 55110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Maybe this is caused by minibuffer-lazy-highlight-setup
>> that sets filter to replace--region-filter in the minibuffer
>> instead of the original buffer?
>
> Most likely, yes.  `replace--region-filter' is modified globally, so a
> similar problem should happen if you temporarily leave the minibuffer
> and do Isearch in any other buffer.
>
> If that's the case, I think we would have two options:
>
> 1) Add a quick fix for the minibuffer Isearch only.
>
> 2) A more complicated change that solves the issue generally by saving
> the region filter in the fashion of isearch-lazy-highlight-regexp et
> alii.
>
> WDYT?

Recently we fixed a similar problem in `perform-replace'
by creating a dynamically bound value in `let':

  (let ((opos (point-marker))
        ;; Restore original isearch filter to allow
        ;; using isearch in a recursive edit even
        ;; when perform-replace was started from
        ;; `xref--query-replace-1' that let-binds
        ;; `isearch-filter-predicate' (bug#53758).
        (isearch-filter-predicate #'isearch-filter-visible))

So maybe a buffer-local value of `isearch-filter-predicate'
in the minibuffer would help.

Also I recommend to make all hooks in `minibuffer-lazy-highlight-setup'
local by adding the argument LOCAL to add-hook/remove-hook.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55110; Package emacs. Full text available.

Message received at 55110 <at> debbugs.gnu.org:


Received: (at 55110) by debbugs.gnu.org; 26 Apr 2022 19:42:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 15:42:40 2022
Received: from localhost ([127.0.0.1]:40603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njR56-00075D-6X
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2022 15:42:40 -0400
Received: from mail-ej1-f53.google.com ([209.85.218.53]:45695)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arstoffel@HIDDEN>) id 1njR55-00074z-0C
 for 55110 <at> debbugs.gnu.org; Tue, 26 Apr 2022 15:42:39 -0400
Received: by mail-ej1-f53.google.com with SMTP id y3so17792735ejo.12
 for <55110 <at> debbugs.gnu.org>; Tue, 26 Apr 2022 12:42:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=D+Uk3g1e6HmmY35HhRtMlwLCWw3s+2OcLK1rgEB47yk=;
 b=nQ8TUCqfX6rh9xPr4DWlLWSpaDGRjCjZSTDpR0C8w3o88fTanqb78DDcLvs0mnNqW8
 LPZ63oifqLk3rZ/4pWMqxlafyn1aMzOQUasc4NKQ83FbqaPLHs9pY3Usc8UWXxrtk4aI
 Dmjk59t2JBZ0ypxQ4MPCIUhj6wVBsHOu92Y0vsZ94FO3oJJfGHqmqQ2qkiHBxg+pwv/C
 JhDaXAp0odPumFYdrEeRjAs2LpEy5XJ9SQrUycQxkArmoMLeODx+UD21mj+HljCWCNn6
 UMTH9tol/nECKty76ElMaHxF8xKkjfz18qjH9aBx+sGF5x+yRED3OyaCNMwm3XKcOymA
 wTSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=D+Uk3g1e6HmmY35HhRtMlwLCWw3s+2OcLK1rgEB47yk=;
 b=6N8Urk0ylUBsJ63UlHVrsZ+AYSVeocFU2pRj7bUfxTgr68S3ORbz6Ts4Nv0iimCvA9
 LvhxtHWpmS2+3G3oFysBGy8UV3SgBmqAmo51mCgz1tr9F+jd+hSqMhUDv8wROvgIRvLY
 Eg0xBJp1pz9wjzYrrXE4rPKio/5Dq0oq6F5jlVO65rMyR6cNmUZPuqorESj+w+qFs+4X
 sCiflo2f1ccfX3DlCdrHbYhmq0u2ub4x3m0ar8QF8FKllfoUVh2M44+dElHA4xsDRyJB
 3Vh1L4CwLEQh+MtRj/dbT7GsLxGr735RMQggnLakR6R0Uk6VftHLxwDEDNAz6iXNpN0A
 6zYg==
X-Gm-Message-State: AOAM531gm9LoP58PXKprh7TcMFEhmAalTc93xaqh8O5akQikj1umh6tP
 ETQwFi004ekDAKNbnsP2rAISnoH3qkM=
X-Google-Smtp-Source: ABdhPJwg0DloU/dNYL9AlzfhI6gKcEHvRc8pZ3IhD/SDS4kFvORgSfVNdq8OXT921uTDQHL20q/fKA==
X-Received: by 2002:a17:906:a05a:b0:6ef:a44d:2f46 with SMTP id
 bg26-20020a170906a05a00b006efa44d2f46mr23529947ejb.192.1651002152661; 
 Tue, 26 Apr 2022 12:42:32 -0700 (PDT)
Received: from ars3 ([2a02:8109:8ac0:56d0::1b06])
 by smtp.gmail.com with ESMTPSA id
 q7-20020aa7cc07000000b00423ded189aesm6672366edt.13.2022.04.26.12.42.31
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 26 Apr 2022 12:42:32 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#55110: 29.0.50; Regression in query-replace prompt
References: <86levtfa31.fsf@HIDDEN>
Date: Tue, 26 Apr 2022 21:42:28 +0200
In-Reply-To: <86levtfa31.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 25 Apr 2022 18:37:22 +0300")
Message-ID: <8735hzzl5n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 55110
Cc: 55110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Thanks for the heads up, I'll take a look at this some time soon.

On Mon, 25 Apr 2022 at 18:37, Juri Linkov <juri@HIDDEN> wrote:

> Maybe this is caused by minibuffer-lazy-highlight-setup
> that sets filter to replace--region-filter in the minibuffer
> instead of the original buffer?

Most likely, yes.  `replace--region-filter' is modified globally, so a
similar problem should happen if you temporarily leave the minibuffer
and do Isearch in any other buffer.

If that's the case, I think we would have two options:

1) Add a quick fix for the minibuffer Isearch only.

2) A more complicated change that solves the issue generally by saving
the region filter in the fashion of isearch-lazy-highlight-regexp et
alii.

WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#55110; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Apr 2022 15:45:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 25 11:45:41 2022
Received: from localhost ([127.0.0.1]:35899 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nj0uC-0006t4-LE
	for submit <at> debbugs.gnu.org; Mon, 25 Apr 2022 11:45:40 -0400
Received: from lists.gnu.org ([209.51.188.17]:60894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1nj0uA-0006st-MK
 for submit <at> debbugs.gnu.org; Mon, 25 Apr 2022 11:45:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58544)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1nj0uA-0002fe-F1
 for bug-gnu-emacs@HIDDEN; Mon, 25 Apr 2022 11:45:38 -0400
Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:58917)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1nj0u8-0001fM-NW
 for bug-gnu-emacs@HIDDEN; Mon, 25 Apr 2022 11:45:38 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id BDAD9C0002
 for <bug-gnu-emacs@HIDDEN>; Mon, 25 Apr 2022 15:45:31 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; Regression in query-replace prompt
Organization: LINKOV.NET
Date: Mon, 25 Apr 2022 18:37:22 +0300
Message-ID: <86levtfa31.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2001:4b98:dc4:8::226;
 envelope-from=juri@HIDDEN; helo=relay6-d.mail.gandi.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

X-Debbugs-Cc: Augusto Stoffel <arstoffel@HIDDEN>

I noticed a recent regression after minibuffer-lazy-highlight changes:

0. emacs -Q
1. perform one query-replace to add some FROM and TO to its history:
   M-% a RET b RET
2. check that isearch still works in the minibuffer history:
   M-% C-r a
3. activate the region, e.g. C-SPC and move point
4. try to isearch in the history again:
   M-% C-r a

It fails with: [Failing I-search backward: a]

Maybe this is caused by minibuffer-lazy-highlight-setup
that sets filter to replace--region-filter in the minibuffer
instead of the original buffer?




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to arstoffel@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to arstoffel@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#55110; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 15 May 2022 18:45:02 UTC

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