bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59918: 29.0.60; query-replace in the minibuffer lazy-highlights orig


From: Eli Zaretskii
Subject: bug#59918: 29.0.60; query-replace in the minibuffer lazy-highlights original buffer
Date: Mon, 12 Dec 2022 21:28:29 +0200

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: Juri Linkov <juri@linkov.net>,  59918@debbugs.gnu.org
> Date: Mon, 12 Dec 2022 20:05:52 +0100
> 
> On Mon, 12 Dec 2022 at 20:07, Eli Zaretskii wrote:
> 
> > I admit that I don't understand the patch.  minibuffer-selected-window
> > returns a window, not a buffer, and it returns the window that you
> > didn't want, AFAIU.
> 
> The check in the patch is whether the buffer of the
> minibuffer-selected-window is the current buffer.  It's meant to fail
> when you are about to start a recursive minibuffer.

Isn't that test fragile as well?  Which buffer is considered "current"
and which window is considered "selected" when the minibuffer is
active is always a tricky question.  Wouldn't it be better to test
instead that the we are in the minibuffer, and if so to use
minibuffer-window instead of minibuffer-selected-window?

> It may or may not be the best patch, but I would say it's the safe one
> if were to fix this in Emacs 29.

So is the method I suggest -- assuming that it works.

> > Also, was this code introduced in Emacs 28/29 or earlier?
> 
> New in Emacs 29.

OK, so we must fix it on the emacs-29 branch.  What remains is to
decide what fix to use.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]