GNU bug report logs - #7381
24.0.50; Provide a hook run when a window is selected

Previous Next

Package: emacs;

Reported by: Štěpán Němec <stepnem <at> gmail.com>

Date: Fri, 12 Nov 2010 00:12:02 UTC

Severity: wishlist

Merged with 16436

Found in version 24.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 7381 <at> debbugs.gnu.org
Subject: bug#7381: 24.0.50; Provide a hook run when a window is selected
Date: Fri, 12 Nov 2010 17:31:24 +0100
>> Can't you use `window-configuration-change-hook'?
>
> I don't see how that would help, as the hook is not run when a window is
> selected.

Well, we _could_ run it when another window gets selected.  But at the
time we'd run it the identity of the old selected window would not be
available anywhere.  So this wouldn't help you much either.

Basically, we could keep the old window configuration around from one
"change" to the next but it's not clear whether we want to save the
configuration before the last command or before the last configuration
change.  In the latter case, your code would hardly know whether it runs
within one and the same command or within different commands.

Note in this context that a single command like setting up a GDB frame
may entail a couple of configuration changes and you would have to keep
track of all of them.  And the hook would trigger within each and every
instance of `with-selected-window' or `save-window-excursion' no matter
how silly these macros are occasionally used.

martin




This bug report was last modified 6 years and 136 days ago.

Previous Next


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