[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Select completions from the minibuffer
From: |
Ergus |
Subject: |
Re: Select completions from the minibuffer |
Date: |
Fri, 18 Mar 2022 12:16:08 +0100 |
On Fri, Mar 18, 2022 at 08:28:34AM +0200, Eli Zaretskii wrote:
Date: Fri, 18 Mar 2022 00:10:27 +0100
From: Ergus <spacibba@aol.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Yes I just confirmed, actually the pre-redisplay-function is not called
for simple commands like self-insert or moving the point and in your
case neither.
If that's the case, how come the region's display is updated when you
insert a character or move point (with Shift pressed)?
Hi Eli:
Maybe I expressed a bit incorrectly, sorry.
When moving point redisplay--pre-redisplay-functions is called BUT
receives nil in the list of windows to update, so it goes in the first
part of the if and runs the hooks for the selected-window
only. (actually this code looks like a workaround for that situation)
(if (null windows)
(with-current-buffer (window-buffer (selected-window))
(run-hook-with-args 'pre-redisplay-functions (selected-window)))
(dolist (win (if (listp windows) windows (window-list-1 nil nil t)))
(with-current-buffer (window-buffer win)
(run-hook-with-args 'pre-redisplay-functions win))))
In Juri's code it is moving the point in completions while in the
minibuffer so *Completions* never becomes the active window and it is
never passed to redisplay--pre-redisplay-functions.
When we force (redisplay--update-cursor-face-highlight) then
*Completions* is passed to redisplay--pre-redisplay-functions, maybe
because an overlay moved or because of the set-window-parameter
call... I am not really sure about how the windows list is filled to
call pre-redisplay-function.
Does it makes sense?
Best,
Ergus
- Re: Select completions from the minibuffer, (continued)
- Re: Select completions from the minibuffer, Ergus, 2022/03/17
- Re: Select completions from the minibuffer, Ergus, 2022/03/17
- Re: Select completions from the minibuffer, Juri Linkov, 2022/03/17
- Re: Select completions from the minibuffer, Stefan Monnier, 2022/03/17
- Re: Select completions from the minibuffer, Ergus, 2022/03/17
- Re: Select completions from the minibuffer, Stefan Monnier, 2022/03/17
- Re: Select completions from the minibuffer, Ergus, 2022/03/17
- Re: Select completions from the minibuffer, Eli Zaretskii, 2022/03/18
- Re: Select completions from the minibuffer, Ergus, 2022/03/17
- Re: Select completions from the minibuffer, Eli Zaretskii, 2022/03/18
- Re: Select completions from the minibuffer,
Ergus <=
- Re: Select completions from the minibuffer, Eli Zaretskii, 2022/03/18
- Re: Select completions from the minibuffer, Stefan Monnier, 2022/03/18
- Re: Select completions from the minibuffer, Eli Zaretskii, 2022/03/18
- Re: Select completions from the minibuffer, Ergus, 2022/03/18
- Re: Select completions from the minibuffer, Stefan Monnier, 2022/03/18
- Re: Select completions from the minibuffer, Ergus, 2022/03/18
- Re: Select completions from the minibuffer, Eli Zaretskii, 2022/03/18
- Re: Select completions from the minibuffer, Juri Linkov, 2022/03/18
- Re: Select completions from the minibuffer, Eli Zaretskii, 2022/03/18
- Re: Select completions from the minibuffer, Ergus, 2022/03/18