all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: adam_w67@yahoo.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: live windows
Date: Thu, 29 Dec 2011 08:00:46 +0100	[thread overview]
Message-ID: <4EFC101E.50601@gmx.at> (raw)

 > 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)



             reply	other threads:[~2011-12-29  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29  7:00 martin rudalics [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-28 16:10 live windows Adam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EFC101E.50601@gmx.at \
    --to=rudalics@gmx.at \
    --cc=adam_w67@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.