GNU bug report logs - #52356
27.2; Isearch prompt changes unexpectedly with char folding enabled

Previous Next

Package: emacs;

Reported by: Andrea Greselin <greselin.andrea <at> gmail.com>

Date: Tue, 7 Dec 2021 18:47:02 UTC

Severity: normal

Found in version 27.2

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52356 in the body.
You can then email your comments to 52356 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Tue, 07 Dec 2021 18:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrea Greselin <greselin.andrea <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Dec 2021 18:47:02 GMT) Full text and rfc822 format available.

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

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; Isearch prompt changes unexpectedly with char folding enabled
Date: Tue, 7 Dec 2021 19:38:15 +0100
[Message part 1 (text/plain, inline)]
Hello,
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 ‘lazy-count-*-format’ and ‘search-default-mode’ (if they all
have their default value the prompt is ‘Pending char-fold I-search:…’;
with the settings described below it’s just ‘I-search: …’, and it
changes briefly to ‘Pending I-search: …’).

Steps to reproduce:
-------------------

Launch ‘Emacs -Q’, evaluate these forms

    (setq isearch-lazy-count t)
    (setq lazy-count-prefix-format nil
          lazy-count-suffix-format " [%s/%s]")
    (setq-local search-default-mode 'char-fold-to-regexp)
    (electric-quote-local-mode)

and Isearch for something.

All the best,
Andrea



In GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.30,
cairo version 1.17.4)
 of 2021-08-07 built on buildvm-x86-29.iad2.fedoraproject.org
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Fedora 34 (Workstation Edition)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [5 times]

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz
 --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER GMP

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 47051 7677)
 (symbols 48 6007 1)
 (strings 32 15798 2213)
 (string-bytes 1 518549)
 (vectors 16 11404)
 (vector-slots 8 137751 8790)
 (floats 8 20 45)
 (intervals 56 271 0)
 (buffers 1000 12))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Tue, 07 Dec 2021 19:26:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
Cc: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Tue, 07 Dec 2021 21:23:53 +0200
> 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 ‘lazy-count-*-format’ and ‘search-default-mode’ (if they all
> have their default value the prompt is ‘Pending char-fold I-search:…’;
> with the settings described below it’s just ‘I-search: …’, and it
> changes briefly to ‘Pending I-search: …’).
>
> Steps to reproduce:
> -------------------
>
> Launch ‘Emacs -Q’, evaluate these forms
>
>     (setq isearch-lazy-count t)
>     (setq lazy-count-prefix-format nil
>           lazy-count-suffix-format " [%s/%s]")
>     (setq-local search-default-mode 'char-fold-to-regexp)
>     (electric-quote-local-mode)
>
> and Isearch for something.

Thanks for the bug report.  Some time ago I proposed the following patch:

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 75a80840d6..5aa8ea2f14 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3479,7 +3479,6 @@ 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 (and isearch-wrapped
 			    (not isearch-wrap-function)
 			    (if isearch-forward

But it was unclear whether it's really justified to remove the message
"pending" completely.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Tue, 07 Dec 2021 20:09:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
Cc: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Tue, 07 Dec 2021 22:07:48 +0200
>> 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 ‘lazy-count-*-format’ and ‘search-default-mode’ (if they all
>> have their default value the prompt is ‘Pending char-fold I-search:…’;
>> with the settings described below it’s just ‘I-search: …’, and it
>> changes briefly to ‘Pending I-search: …’).
>
> Thanks for the bug report.  Some time ago I proposed the following patch:
>
> -		   (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))
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Fri, 10 Dec 2021 10:43:01 GMT) Full text and rfc822 format available.

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

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Fri, 10 Dec 2021 11:41:44 +0100
[Message part 1 (text/plain, inline)]
Hello Juri,

your patch works for me. If you’re 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 ‘memq’ for comparing against a single item.

Thanks,
Andrea

On Tue, 7 Dec 2021 at 21:08, Juri Linkov <juri <at> linkov.net> 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 ‘lazy-count-*-format’ and ‘search-default-mode’ (if they all
> >> have their default value the prompt is ‘Pending char-fold I-search:…’;
> >> with the settings described below it’s just ‘I-search: …’, and it
> >> changes briefly to ‘Pending I-search: …’).
> >
> > Thanks for the bug report.  Some time ago I proposed the following patch:
> >
> > -                (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))
> --
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Sat, 11 Dec 2021 20:06:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
Cc: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Sat, 11 Dec 2021 22:04:55 +0200
Hello Andrea,

> your patch works for me. If you’re 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 ‘memq’ for comparing against a single item.

I'm still not sure about this change.  Do you think this problem
exists only when isearch-lazy-count is customized to t?
Do you see the same problem with the "pending" message
while using the default value of isearch-lazy-count nil?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Sat, 11 Dec 2021 20:32:01 GMT) Full text and rfc822 format available.

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

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Sat, 11 Dec 2021 21:30:21 +0100
[Message part 1 (text/plain, inline)]
> 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.

On Sat, 11 Dec 2021 at 21:05, Juri Linkov <juri <at> linkov.net> wrote:

> Hello Andrea,
>
> > your patch works for me. If you’re 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 ‘memq’ for comparing against a single item.
>
> I'm still not sure about this change.  Do you think this problem
> exists only when isearch-lazy-count is customized to t?
> Do you see the same problem with the "pending" message
> while using the default value of isearch-lazy-count nil?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Sun, 12 Dec 2021 17:36:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
Cc: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Sun, 12 Dec 2021 19:30:16 +0200
[Message part 1 (text/plain, inline)]
>> 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:

[isearch-adjusted-lax.patch (text/x-diff, inline)]
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))))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Fri, 17 Dec 2021 19:37:01 GMT) Full text and rfc822 format available.

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

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Fri, 17 Dec 2021 20:35:50 +0100
[Message part 1 (text/plain, inline)]
Hi Juri, thanks for your help.
I’ve tested your latest patch in two ways and in both tests the prompt
didn’t flicker on adding letters to the search string. So it looks
fine to me.

> 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

If I understand it correctly the jittering there is all due to
‘lazy-count-prefix-format’ being non-nil. If you set it to nil (and
use ‘lazy-count-suffix-format’ to display the counter) then you have
no jittering at all.

> But maybe better not to display "Pending" at all?

I personally don’t like delayed changes to graphical elements, so I’d
say yes.

Now I'm curious though, what‘s the meaning of “pending” in the context
of Isearch?

Anyway, these were my tests:

1) Run ‘emacs -Q’, evaluate functions with your patch. At each step on
   the left I get the prompt on the right:

   C-s       → I-search:
   M-s '     → Pending char-fold I-search:
   Type smth → Char-fold I-search: Type smth

2) Run ‘emacs -Q’, evaluate my settings and the functions with your
   patch. Result:

   C-s       → I-search:

   (At this point the search is already being done with char-folding
   enabled because of my settings.)

   Type smth → I-search: Type smth [0/0]

Here are my settings and the patched functions, for convenience.

    (setq isearch-lazy-count t)
    (setq lazy-count-prefix-format nil
          lazy-count-suffix-format " [%s/%s]")
    (setq-local search-default-mode 'char-fold-to-regexp)
    (electric-quote-local-mode)

    (defun isearch-message-prefix (&optional ellipsis nonincremental)
      ;; If about to search, and previous search regexp was invalid,
      ;; check that it still is.  If it is valid now,
      ;; let the message we display while searching say that it is valid.
      (and isearch-error ellipsis
           (condition-case ()
      (progn (re-search-forward isearch-string (point) t)
     (setq isearch-error nil))
    (error nil)))
      ;; If currently failing, display no ellipsis.
      (or isearch-success (setq ellipsis nil))
      (let ((m (concat (if isearch-success "" "failing ")
      (if (eq isearch-adjusted t) "pending " "")
    (if (and isearch-wrapped
       (not isearch-wrap-function)
       (if isearch-forward
    (> (point) isearch-opoint)
         (< (point) isearch-opoint)))
          "over")
      (if isearch-wrapped "wrapped ")
                       (if (and (not isearch-success) (not
isearch-case-fold-search))
                           "case-sensitive ")
                       (let ((prefix ""))
                         (advice-function-mapc
                          (lambda (_ props)
                            (let ((np (cdr (assq 'isearch-message-prefix
props))))
                              (if np (setq prefix (concat np prefix)))))
                          isearch-filter-predicate)
                         prefix)
                       (isearch--describe-regexp-mode
isearch-regexp-function)
      (cond
       (multi-isearch-file-list "multi-file ")
       (multi-isearch-buffer-list "multi-buffer ")
       (t ""))
      (or isearch-message-prefix-add "")
      (if nonincremental "search" "I-search")
      (if isearch-forward "" " backward")
      (if current-input-method
          ;; Input methods for RTL languages use RTL
          ;; characters for their title, and that messes
          ;; up the display of search text after the prompt.
          (bidi-string-mark-left-to-right
    (concat " [" current-input-method-title "]: "))
        ": ")
      )))
        (apply #'propertize (concat (isearch-lazy-count-format)
                            (upcase (substring m 0 1)) (substring m 1))
      isearch-message-properties)))

    (defun isearch-search-fun-default ()
      "Return default functions to use for the search."
      (lambda (string &optional bound noerror count)
        (let (;; Evaluate this before binding `search-spaces-regexp' which
              ;; can break all sorts of regexp searches.  In particular,
              ;; calling `isearch-regexp-function' can trigger autoloading
              ;; (Bug#35802).
              (regexp
               (cond (isearch-regexp-function
                      (let ((lax (and (not bound)
                                      (isearch--lax-regexp-function-p))))
                        (when lax
                          (setq isearch-adjusted 'lax))
                        (if (functionp isearch-regexp-function)
                            (funcall isearch-regexp-function string lax)
                          (word-search-regexp string lax))))
                     (isearch-regexp string)
                     (t (regexp-quote string))))
              ;; Use lax versions to not fail at the end of the word while
              ;; the user adds and removes characters in the search string
              ;; (or when using nonincremental word isearch)
              (search-spaces-regexp (when (if isearch-regexp
                                              isearch-regexp-lax-whitespace
                                            isearch-lax-whitespace)
                                      search-whitespace-regexp)))
          (funcall
           (if isearch-forward #'re-search-forward #'re-search-backward)
           regexp bound noerror count))))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52356; Package emacs. (Sun, 19 Dec 2021 17:50:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
Cc: 52356 <at> debbugs.gnu.org
Subject: Re: bug#52356: 27.2; Isearch prompt changes unexpectedly with char
 folding enabled
Date: Sun, 19 Dec 2021 19:48:19 +0200
close 52356 29.0.50
thanks

> I’ve tested your latest patch in two ways and in both tests the prompt
> didn’t flicker on adding letters to the search string. So it looks
> fine to me.

Thanks for testing.  So now pushed to Emacs 29.

>> 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
>
> If I understand it correctly the jittering there is all due to
> ‘lazy-count-prefix-format’ being non-nil. If you set it to nil (and
> use ‘lazy-count-suffix-format’ to display the counter) then you have
> no jittering at all.

Indeed, there is no jittering when the count is at the end of I-search message.

>> But maybe better not to display "Pending" at all?
>
> I personally don’t like delayed changes to graphical elements, so I’d
> say yes.
>
> Now I'm curious though, what‘s the meaning of “pending” in the context
> of Isearch?

“Pending” was intended to say the current search state might not
correspond to the search string until the user types C-s or C-r
to search for the next match.  But this should be obvious
without this prefix message.




bug marked as fixed in version 29.0.50, send any further explanations to 52356 <at> debbugs.gnu.org and Andrea Greselin <greselin.andrea <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sun, 19 Dec 2021 17:50:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Jan 2022 12:24:08 GMT) Full text and rfc822 format available.

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

Previous Next


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