GNU bug report logs - #61601
[PATCH] * lisp/isearch.el (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sat, 18 Feb 2023 11:31:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.1

Done: Augusto Stoffel <arstoffel <at> gmail.com>

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 61601 in the body.
You can then email your comments to 61601 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 juri <at> linkov.net, bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sat, 18 Feb 2023 11:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to juri <at> linkov.net, bug-gnu-emacs <at> gnu.org. (Sat, 18 Feb 2023 11:31:02 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] * lisp/isearch.el (minibuffer-lazy-highlight-setup): Use
 cursor-in-echo-area
Date: Sat, 18 Feb 2023 12:30:02 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

I wasn't aware of the variable cursor-in-echo-area when I originally
wrote this function, but it's a much less drastic measure than setting
inhibit-redisplay.

[0001-lisp-isearch.el-minibuffer-lazy-highlight-setup-Use-.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sat, 18 Feb 2023 18:51:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61601 <at> debbugs.gnu.org
Subject: Re: bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sat, 18 Feb 2023 20:44:40 +0200
> I wasn't aware of the variable cursor-in-echo-area when I originally
> wrote this function, but it's a much less drastic measure than setting
> inhibit-redisplay.

I don't know if Eli will allow this to the emacs-29 branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sat, 18 Feb 2023 19:07:01 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 61601 <at> debbugs.gnu.org
Subject: Re: bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sat, 18 Feb 2023 20:05:49 +0100
[Message part 1 (text/plain, inline)]
On Sat, Feb 18, 2023, 19:50 Juri Linkov <juri <at> linkov.net> wrote:

> > I wasn't aware of the variable cursor-in-echo-area when I originally
> > wrote this function, but it's a much less drastic measure than setting
> > inhibit-redisplay.
>
> I don't know if Eli will allow this to the emacs-29 branch.
>

I think it's okay to leave it for Emacs 30.

>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sat, 18 Feb 2023 19:19:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 61601 <at> debbugs.gnu.org, arstoffel <at> gmail.com
Subject: Re: bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sat, 18 Feb 2023 21:18:24 +0200
> Cc: 61601 <at> debbugs.gnu.org
> From: Juri Linkov <juri <at> linkov.net>
> Date: Sat, 18 Feb 2023 20:44:40 +0200
> 
> > I wasn't aware of the variable cursor-in-echo-area when I originally
> > wrote this function, but it's a much less drastic measure than setting
> > inhibit-redisplay.
> 
> I don't know if Eli will allow this to the emacs-29 branch.

Can you explain how the old and the new code prevent "flickering" in
that place?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sat, 18 Feb 2023 21:41:02 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61601 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sat, 18 Feb 2023 22:40:13 +0100
On Sat, 18 Feb 2023 at 21:18, Eli Zaretskii wrote:

>> Cc: 61601 <at> debbugs.gnu.org
>> From: Juri Linkov <juri <at> linkov.net>
>> Date: Sat, 18 Feb 2023 20:44:40 +0200
>> 
>> > I wasn't aware of the variable cursor-in-echo-area when I originally
>> > wrote this function, but it's a much less drastic measure than setting
>> > inhibit-redisplay.
>> 
>> I don't know if Eli will allow this to the emacs-29 branch.
>
> Can you explain how the old and the new code prevent "flickering" in
> that place?

The flickering happens because the cursor briefly moves from the
minibuffer to the minibuffer selected window when the lazy highlighting
is done (e.g. after typing a character in the C-M-% regexp query).

The previous solution was to inhibit redisplay during that brief period.
The new and better solution is to just set cursor-in-echo-area, which
does exactly what we want to happen.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sat, 18 Feb 2023 22:44:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: "61601 <at> debbugs.gnu.org" <61601 <at> debbugs.gnu.org>,
 Juri Linkov <juri <at> linkov.net>
Subject: RE: [External] : bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sat, 18 Feb 2023 22:43:14 +0000
> The flickering happens because the cursor briefly moves from the
> minibuffer to the minibuffer selected window when the lazy highlighting
> is done (e.g. after typing a character in the C-M-% regexp query).

FWIW -
No such problems existed before Isearch started 
using the minibuffer instead of the echo area.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sun, 19 Feb 2023 06:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61601 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sun, 19 Feb 2023 08:16:21 +0200
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Cc: Juri Linkov <juri <at> linkov.net>,  61601 <at> debbugs.gnu.org
> Date: Sat, 18 Feb 2023 22:40:13 +0100
> 
> On Sat, 18 Feb 2023 at 21:18, Eli Zaretskii wrote:
> 
> > Can you explain how the old and the new code prevent "flickering" in
> > that place?
> 
> The flickering happens because the cursor briefly moves from the
> minibuffer to the minibuffer selected window when the lazy highlighting
> is done (e.g. after typing a character in the C-M-% regexp query).
> 
> The previous solution was to inhibit redisplay during that brief period.
> The new and better solution is to just set cursor-in-echo-area, which
> does exactly what we want to happen.

OK, thanks.  It's fine with me to install this on emacs-29.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sun, 19 Feb 2023 12:17:02 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: "61601 <at> debbugs.gnu.org" <61601 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: [External] : bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sun, 19 Feb 2023 13:16:04 +0100
On Sat, 18 Feb 2023 at 22:43, Drew Adams wrote:

>> The flickering happens because the cursor briefly moves from the
>> minibuffer to the minibuffer selected window when the lazy highlighting
>> is done (e.g. after typing a character in the C-M-% regexp query).
>
> FWIW -
> No such problems existed before Isearch started 
> using the minibuffer instead of the echo area.

AFAICT C-M-% always used the minibuffer to read a regular expression.
This has nothing to do with Isearch per se.

Also, in isearch I still see cursor flickering when I type fast enough.
But since I normally use isearch-mb, which is not affected by this, I
can't describe the problem in more detail.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61601; Package emacs. (Sun, 19 Feb 2023 15:54:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: "61601 <at> debbugs.gnu.org" <61601 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>, Juri Linkov <juri <at> linkov.net>
Subject: RE: [External] : bug#61601: [PATCH] * lisp/isearch.el
 (minibuffer-lazy-highlight-setup): Use cursor-in-echo-area
Date: Sun, 19 Feb 2023 15:53:42 +0000
> > No such problems existed before Isearch started
> > using the minibuffer instead of the echo area.
> 
> AFAICT C-M-% always used the minibuffer to read a regular expression.
> This has nothing to do with Isearch per se.

If this is only about C-M-% reading a regexp
then OK, and I apologize for not having read
more of the thread.

C-M-%'s reading of a regexp is an all-at-once,
one time reading that uses the minibuffer.

That reading has nothing to do with Isearch's
reading of keys you type, for incremental
input and editing of the search pattern.  

_If_ this is about Isearch's incremental
handling of a search pattern, then maybe my
comment is relevant.  Apart from `M-e', since
Day One Isearch always read input directly,
not using the minibuffer.  It displayed what
you typed in the echo area, giving somewhat
the (mistaken) impression that input was in
the minibuffer.




bug marked as fixed in version 29.1, send any further explanations to 61601 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel <at> gmail.com> Request was from Augusto Stoffel <arstoffel <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 09 Mar 2023 13:05: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. (Fri, 07 Apr 2023 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 12 days ago.

Previous Next


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