unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how can I run commands when window displays a different buffer?
@ 2017-10-27 12:04 Amos Bird
  2017-10-27 12:18 ` Kaushal Modi
  0 siblings, 1 reply; 8+ messages in thread
From: Amos Bird @ 2017-10-27 12:04 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


Hi,

I know there is a window-configuration-change-hook that covers 
this. But I need only the subset of the hook. What can I do? 

regards,

-- 
Amos Bird
amosbird@gmail.com



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: how can I run commands when window displays a different buffer?
@ 2017-10-27 12:53 martin rudalics
  2017-10-27 13:34 ` Amos Bird
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2017-10-27 12:53 UTC (permalink / raw)
  To: amosbird; +Cc: help-gnu-emacs

In a function on ‘window-configuration-change-hook’ you have to remember
all window-buffer associations in a list, removing defunct windows from
that list.  If you find a window whose association changed since the
last time that hook was run (and maybe also if you find a new window),
you know that that "window displays a different buffer" now.

martin




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-30  1:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27 12:04 how can I run commands when window displays a different buffer? Amos Bird
2017-10-27 12:18 ` Kaushal Modi
2017-10-27 12:46   ` Amos Bird
  -- strict thread matches above, loose matches on Subject: below --
2017-10-27 12:53 martin rudalics
2017-10-27 13:34 ` Amos Bird
2017-10-28  8:45   ` martin rudalics
2017-10-28  8:56     ` Amos Bird
2017-10-30  1:52     ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).