From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: live windows Date: Thu, 29 Dec 2011 08:00:46 +0100 Message-ID: <4EFC101E.50601@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1325142068 13347 80.91.229.12 (29 Dec 2011 07:01:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2011 07:01:08 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: adam_w67@yahoo.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 29 08:01:04 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rg9z4-000658-Jd for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Dec 2011 08:01:02 +0100 Original-Received: from localhost ([::1]:36571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg9yy-0002IN-KN for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Dec 2011 02:00:56 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg9ys-0002IB-Jm for help-gnu-emacs@gnu.org; Thu, 29 Dec 2011 02:00:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rg9yr-0001Ed-Ie for help-gnu-emacs@gnu.org; Thu, 29 Dec 2011 02:00:50 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:47568) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Rg9yr-0001ER-4d for help-gnu-emacs@gnu.org; Thu, 29 Dec 2011 02:00:49 -0500 Original-Received: (qmail invoked by alias); 29 Dec 2011 07:00:47 -0000 Original-Received: from 62-47-44-99.adsl.highway.telekom.at (EHLO [62.47.44.99]) [62.47.44.99] by mail.gmx.net (mp032) with SMTP; 29 Dec 2011 08:00:47 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX181PmJTylE1+utZ/kTBYJUNLrtOAmiI+IVWgSd37a HRSj1mqwyJoraH User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) Original-References: 87d3b8u1kl.fsf@earth.home X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.22 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:83266 Archived-At: > I eval > > (defvar a nil) > (setq a (selected-window)) > > in the *scratch*-Buffer. Then I work a little bit (2 minutes or so) > without touching the window that displays the *scratch* buffer. Then I > eval (window-live-p a) via M-: . In some cases (I cannot figure out > what to do exactly), nil is returned, although I did not touch the > window. > > Whats wrong? Hard to tell. Evaluate the below in *scratch* and we'll see whether you really "did not touch the window" ;-) Good luck, martin (defvar my-suspicious-window nil) (setq my-suspicious-window (selected-window)) (defun is-my-suspicious-window-still-live () (unless (window-live-p my-suspicious-window) (message "My suspicious window was killed by `%s'" this-command) (ding) (setq my-suspicious-window (selected-window)))) (add-hook 'post-command-hook 'is-my-suspicious-window-still-live)