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

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

Re: Detect window switches?


From: Joost Kremers
Subject: Re: Detect window switches?
Date: 25 Sep 2013 21:30:37 GMT
User-agent: slrn/pre1.0.0-18 (Linux)

Pascal J. Bourguignon wrote:
> Joost Kremers <joostkremers@yahoo.com> writes:
>
>> Is there a way in Emacs to detect a window switch? Basically, I'd like
>> to perform an action when a window showing a particular buffer gains or
>> loses focus. Is there a hook or something that exposes this to Elisp?
>
> have a look at: window-configuration-change-hook
> I guess you will have to filter the exact condition yourself.

Mmm, the documentation of that hook says that "[t]he buffer-local part
of this hook is run once for each window on the affected frame,
with the relevant window selected and its buffer current." That doesn't
seem to leave much room for determining if the relevant window has just
lost focus.


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


reply via email to

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