From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Greselin Newsgroups: gmane.emacs.bugs Subject: bug#52356: 27.2; Isearch prompt changes unexpectedly with char folding enabled Date: Fri, 10 Dec 2021 11:41:44 +0100 Message-ID: References: <868rwwdxrq.fsf@mail.linkov.net> <86tufkch63.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000af6cda05d2c8608b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2506"; mail-complaints-to="usenet@ciao.gmane.io" To: 52356@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 10 11:43:29 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvdNB-0000R8-Cd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 11:43:29 +0100 Original-Received: from localhost ([::1]:52096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvdN9-0005sb-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 05:43:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvdMk-0005rV-SB for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 05:43:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvdMk-0000vc-6y for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 05:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mvdMj-0000LX-PL for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 05:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Greselin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Dec 2021 10:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52356 X-GNU-PR-Package: emacs Original-Received: via spool by 52356-submit@debbugs.gnu.org id=B52356.16391329491288 (code B ref 52356); Fri, 10 Dec 2021 10:43:01 +0000 Original-Received: (at 52356) by debbugs.gnu.org; 10 Dec 2021 10:42:29 +0000 Original-Received: from localhost ([127.0.0.1]:45599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvdMD-0000Ki-4d for submit@debbugs.gnu.org; Fri, 10 Dec 2021 05:42:29 -0500 Original-Received: from mail-qv1-f52.google.com ([209.85.219.52]:45768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvdMA-0000KU-NN for 52356@debbugs.gnu.org; Fri, 10 Dec 2021 05:42:28 -0500 Original-Received: by mail-qv1-f52.google.com with SMTP id s9so7581422qvk.12 for <52356@debbugs.gnu.org>; Fri, 10 Dec 2021 02:42:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=/f0ZR5sPzPpjF3/SZXzwmy0qlmhMDRceEwwMHr2nO9I=; b=JxKR4O57gDcifbOGZaV0xeKzTeXSbN4SFgsNrlsIiMCt0iNZtn6ucvULkaBChnOmPw OQ3ZK2iiVDFi8f5EaL/EsuYdoC4H+y5h0pwKXtlBsjS+OY+hb0bGYCK1iwSKmTTTS8oM ajYRdI70xqzxF44U4eezS7yZ/qLArg0+aD2PGkjYBuXSzwD6tKOuggGo4ZAArLG4hZ6k ic5ZvyCoySnej5mURVNvqVownSZgaAlGMvI8El5N+J5Gwa0j5JRAwWo1Pl45QHwKLuuY WUWBQ5JyyVkodcluaslYTuZoRzn5QAi1b47/qmpUH+QuynMiX18diFxGIpyGK2XtWdfh uY2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=/f0ZR5sPzPpjF3/SZXzwmy0qlmhMDRceEwwMHr2nO9I=; b=Tp9PbQYTcXSBdkDfbk60SmTPDppyPtrsO2C2bFqrjbq3zstO63F6vLeoOGcma5i6Hb R1W0Olc0E4YsDDiKWu6DkV4+PdCxIzMiM9Ah+Kf/Q3jcb1McTwJ7VjKukK3TVv0EyyVl AxJ5aADf1z8B3+JEgSKc3KAK5WJpXbdJ1dEmo8W1DT+WtRZRhjyaotzDEv5vbIHloWJ0 lkA/Bp9qZb0FdoDNZgh3GeocnAqmeegXmlYZhfbXmhCfLaFoubG7PRNcr/NYFz79MsdS zIDWHtBB9mvgjH91Iita5F8EzeZ2vadkN8C9X8iDTOnHgU5uXcRVheE+N/EhJbvBeMH0 TGEg== X-Gm-Message-State: AOAM530B+g8xi2etVAOo6Sqqch+NWrUuhfiCSVVkcCyYG1I1ssYch8mN MYpQWM+OvVKbS7eY3FXhdFCt8WUuFjve4O/7cx5spq7uAoI= X-Google-Smtp-Source: ABdhPJz3RWDc7NnjfuTvCfrw82kFA6GevvikOOeD5NXgaKf9+MSNvb0PnwnyatELxCA+QOieG9sUNuN6T7Bp3BhRWdM= X-Received: by 2002:ad4:5bec:: with SMTP id k12mr23498255qvc.94.1639132940953; Fri, 10 Dec 2021 02:42:20 -0800 (PST) In-Reply-To: <86tufkch63.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222042 Archived-At: --000000000000af6cda05d2c8608b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Juri, your patch works for me. If you=E2=80=99re going to submit it for merging you might consider replacing the old line with (or (eq this-command 'isearch-del-char) just to avoid using =E2=80=98memq=E2=80=99 for comparing against a single i= tem. Thanks, Andrea On Tue, 7 Dec 2021 at 21:08, Juri Linkov wrote: > >> when I use Isearch with char folding enabled, the prompt changes very > >> briefly at every character I type in. The actual prompt depends on the > >> values of =E2=80=98lazy-count-*-format=E2=80=99 and =E2=80=98search-de= fault-mode=E2=80=99 (if they all > >> have their default value the prompt is =E2=80=98Pending char-fold I-se= arch:=E2=80=A6=E2=80=99; > >> with the settings described below it=E2=80=99s just =E2=80=98I-search:= =E2=80=A6=E2=80=99, and it > >> changes briefly to =E2=80=98Pending I-search: =E2=80=A6=E2=80=99). > > > > Thanks for the bug report. Some time ago I proposed the following patc= h: > > > > - (if isearch-adjusted "pending " "") > > But many functions in isearch.el set isearch-adjusted for a reason. > So maybe better to fix only the reported case with: > > diff --git a/lisp/isearch.el b/lisp/isearch.el > index 75a80840d6..065f6b3c2a 100644 > --- a/lisp/isearch.el > +++ b/lisp/isearch.el > @@ -3571,7 +3571,7 @@ isearch-search-fun > > (defun isearch--lax-regexp-function-p () > "Non-nil if next regexp-function call should be lax." > - (or (memq this-command '(isearch-printing-char isearch-del-char)) > + (or (memq this-command '(isearch-del-char)) > isearch-yank-flag)) > -- > --000000000000af6cda05d2c8608b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Juri,

your patch works for me. If you=E2=80= =99re going to submit it for merging
you might consider replacing the ol= d line with

=C2=A0 =C2=A0 (or (eq this-command 'isearch-del-char= )

just to avoid using =E2=80=98memq=E2=80=99 for comparing against a= single item.

Thanks,
Andrea

=
On Tue, 7 Dec 2021 at 21:08, Juri Lin= kov <juri@linkov.net> wrote:
>> when I u= se Isearch with char folding enabled, the prompt changes very
>> briefly at every character I type in. The actual prompt depends on= the
>> values of =E2=80=98lazy-count-*-format=E2=80=99 and =E2=80=98searc= h-default-mode=E2=80=99 (if they all
>> have their default value the prompt is =E2=80=98Pending char-fold = I-search:=E2=80=A6=E2=80=99;
>> with the settings described below it=E2=80=99s just =E2=80=98I-sea= rch: =E2=80=A6=E2=80=99, and it
>> changes briefly to =E2=80=98Pending I-search: =E2=80=A6=E2=80=99).=
>
> Thanks for the bug report.=C2=A0 Some time ago I proposed the followin= g patch:
>
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if isearch-a= djusted "pending " "")

But many functions in isearch.el set isearch-adjusted for a reason.
So maybe better to fix only the reported case with:

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 75a80840d6..065f6b3c2a 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3571,7 +3571,7 @@ isearch-search-fun

=C2=A0(defun isearch--lax-regexp-function-p ()
=C2=A0 =C2=A0"Non-nil if next regexp-function call should be lax."= ;
-=C2=A0 (or (memq this-command '(isearch-printing-char isearch-del-char= ))
+=C2=A0 (or (memq this-command '(isearch-del-char))
=C2=A0 =C2=A0 =C2=A0 =C2=A0isearch-yank-flag))
--
--000000000000af6cda05d2c8608b--