From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#52356: 27.2; Isearch prompt changes unexpectedly with char folding enabled Date: Sun, 12 Dec 2021 19:30:16 +0200 Organization: LINKOV.NET Message-ID: <86r1ahopzb.fsf@mail.linkov.net> References: <868rwwdxrq.fsf@mail.linkov.net> <86tufkch63.fsf@mail.linkov.net> <86tufelxg8.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39837"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 52356@debbugs.gnu.org To: Andrea Greselin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 12 18:38:52 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 1mwSoG-000AG4-4y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 18:38:52 +0100 Original-Received: from localhost ([::1]:56802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwSoE-0004nY-VS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 12:38:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwSla-0003BV-Im for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 12:36:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwSlW-00034D-H1 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 12:36:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwSlW-0002LH-77 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 12:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Dec 2021 17:36:02 +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.16393305528985 (code B ref 52356); Sun, 12 Dec 2021 17:36:02 +0000 Original-Received: (at 52356) by debbugs.gnu.org; 12 Dec 2021 17:35:52 +0000 Original-Received: from localhost ([127.0.0.1]:53021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwSlM-0002Kq-AJ for submit@debbugs.gnu.org; Sun, 12 Dec 2021 12:35:52 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:53639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwSlK-0002KS-TH for 52356@debbugs.gnu.org; Sun, 12 Dec 2021 12:35:51 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id DEE34100006; Sun, 12 Dec 2021 17:35:43 +0000 (UTC) In-Reply-To: (Andrea Greselin's message of "Sat, 11 Dec 2021 21:30:21 +0100") 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:222238 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit >> Do you think this problem exists only >> when isearch-lazy-count is customised to t? > > No, I can just launch ‘emacs -Q’, go to the beginning of the buffer > and start searching for something with ‘C-s M-s '’ to get the > flickering prompt. What the settings in the first message do is change > the prompt: it is ‘Pending char-fold I-search’ without them (after > doing ‘C-s M-s '’) and just ‘I-search:’ with them (where just ‘C-s’ > suffices for starting a char-folded search). > > Your patch works both with and without my settings. I don’t know if > there are cases where it suppresses useful messages. A possible variant would be not to flicker too much by transitioning from the message: Pending char-fold I-search: string to 1/20 Pending char-fold I-search: string whereas currently it changes to 1/20 Char-fold I-search: string by removing the prefix "Pending" after a delay. But maybe better not to display "Pending" at all? So with the following patch, adding or removing characters in the search string doesn't show with the message "Pending" in char-fold mode: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-adjusted-lax.patch diff --git a/lisp/isearch.el b/lisp/isearch.el index 75a80840d6..e3b0c34b4a 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -3479,7 +3479,7 @@ isearch-message-prefix ;; If currently failing, display no ellipsis. (or isearch-success (setq ellipsis nil)) (let ((m (concat (if isearch-success "" "failing ") - (if isearch-adjusted "pending " "") + (if (eq isearch-adjusted t) "pending " "") (if (and isearch-wrapped (not isearch-wrap-function) (if isearch-forward @@ -3586,7 +3586,7 @@ isearch-search-fun-default (let ((lax (and (not bound) (isearch--lax-regexp-function-p)))) (when lax - (setq isearch-adjusted t)) + (setq isearch-adjusted 'lax)) (if (functionp isearch-regexp-function) (funcall isearch-regexp-function string lax) (word-search-regexp string lax)))) --=-=-=--