[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14604: 22.214.171.124; Possibly incorrect behaviour of frame-selected-win
bug#14604: 126.96.36.199; Possibly incorrect behaviour of frame-selected-window
Wed, 30 Oct 2013 13:50:20 -0400
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
> (defvar user-selected-window nil)
> (defun register-user-location ()
> (setq user-selected-window (selected-window)))
> (add-hook 'post-command-hook 'register-user-location)
> '(:eval (if (eq user-selected-window (selected-window))
That will usually work, except for corner-cases where redisplay happens
in the middle of a command, or when the selected window is modified
between commands (e.g. from a process sentinel).
You can make it reliable with the use of the new
`pre-redisplay-function' hook (instead of post-command-hook), which
I just added yesterday.
Of course, making it reliable doesn't mean it's not an omission.
I tend to agree that it would be good to provide access to that info
- bug#14604: 188.8.131.52; Possibly incorrect behaviour of frame-selected-window,
Stefan Monnier <=