From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Detect window switches? Date: Fri, 27 Sep 2013 09:13:47 -0400 Message-ID: References: <83mwmzfjoc.fsf@gnu.org> <83had6g5v0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380287667 14511 80.91.229.3 (27 Sep 2013 13:14:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Sep 2013 13:14:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 27 15:14:30 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 1VPXsK-0004MI-SC for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Sep 2013 15:14:28 +0200 Original-Received: from localhost ([::1]:36218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPXsK-0006p5-AM for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Sep 2013 09:14:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPXs2-0006oi-C9 for help-gnu-emacs@gnu.org; Fri, 27 Sep 2013 09:14:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPXrt-00023w-18 for help-gnu-emacs@gnu.org; Fri, 27 Sep 2013 09:14:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPXrs-00023k-QF for help-gnu-emacs@gnu.org; Fri, 27 Sep 2013 09:14:00 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VPXrr-0003tU-9B for help-gnu-emacs@gnu.org; Fri, 27 Sep 2013 15:13:59 +0200 Original-Received: from 184.175.15.200 ([184.175.15.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Sep 2013 15:13:59 +0200 Original-Received: from monnier by 184.175.15.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Sep 2013 15:13:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 12 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 184.175.15.200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:nQJ001HDuCEkoXxcC2mSFW8edho= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:93662 Archived-At: > I don't think redisplay-window-hook would help in this case, but if it > will, so will an idle timer, since the code that runs off that hook > will simply sample the situation at more or less regular intervals. > Doing that from a timer is probably an approximation that is "good > enough". There are plenty of "good enough" solutions (e.g. post-command-hook). But a `before-redisplay-hook' would make it possible to write a reliable solution, rather than just a "good enough" one. Stefan