From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Detect window switches? Date: 26 Sep 2013 16:54:34 GMT Message-ID: References: slrnl46lft.31s.joostkremers@j.kremers4.news.arnhem.chello.nl NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1380214515 27580 80.91.229.3 (26 Sep 2013 16:55:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Sep 2013 16:55:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 26 18:55:19 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VPEqV-0001dA-27 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 18:55:19 +0200 Original-Received: from localhost ([::1]:58978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPEqU-0006Qe-Oe for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 12:55:18 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-X-Trace: individual.net y9Gi+jzAKDRy1m0giVmrcwH2kmOQTK+44PmJzIsH/EzOlbQ8/t Cancel-Lock: sha1:jal4yl/QSaM30nsWWv2daG1EzCk= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:201348 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93617 Archived-At: martin rudalics wrote: > > 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. > > Did you try the "global" part? If it doesn't work, please report a bug. A quick test I just did suggests that window-configuration-change-hook isn't even called when switching from one window to another, e.g., with `other-window' or one of the `windmove-*' commands. I apologise if my initial description was too unclear. What I'd like to know is if it's possible to detect when a window goes from being selected to being not selected and vice versa. Or, alternatively, when a buffer goes from being current to not current and vice versa. From what I've been able to find on the internet, this isn't possible. TIA -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)