From: Juri Linkov <juri@linkov.net>
To: Andrea Greselin <greselin.andrea@gmail.com>
Cc: 52356@debbugs.gnu.org
Subject: bug#52356: 27.2; Isearch prompt changes unexpectedly with char folding enabled
Date: Sun, 12 Dec 2021 19:30:16 +0200 [thread overview]
Message-ID: <86r1ahopzb.fsf@mail.linkov.net> (raw)
In-Reply-To: <CAJ_oJbaBOoPR0J_QorXuhFAd3oZpZ0DB5FbXS7SFSvcdQ5jEcQ@mail.gmail.com> (Andrea Greselin's message of "Sat, 11 Dec 2021 21:30:21 +0100")
[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]
>> 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isearch-adjusted-lax.patch --]
[-- Type: text/x-diff, Size: 996 bytes --]
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))))
next prev parent reply other threads:[~2021-12-12 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 18:38 bug#52356: 27.2; Isearch prompt changes unexpectedly with char folding enabled Andrea Greselin
2021-12-07 19:23 ` Juri Linkov
2021-12-07 20:07 ` Juri Linkov
2021-12-10 10:41 ` Andrea Greselin
2021-12-11 20:04 ` Juri Linkov
2021-12-11 20:30 ` Andrea Greselin
2021-12-12 17:30 ` Juri Linkov [this message]
2021-12-17 19:35 ` Andrea Greselin
2021-12-19 17:48 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r1ahopzb.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=52356@debbugs.gnu.org \
--cc=greselin.andrea@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).