[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect advice how to restore previous window

From: Kim F. Storm
Subject: Re: Incorrect advice how to restore previous window
Date: Mon, 26 Feb 2007 10:56:50 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux)

Richard Stallman <address@hidden> writes:

> The code that gives this advice handles only the simple cases.
> As you have pointed out, to even try to handle the hard cases
> is very hard.

True, but without any hooks, it is not only hard -- it is impossible.

> We certainly don't want to do that now, and it might not be worth
> doing ever.  

For that specific purpose (the bad advise), it may be sufficient for
the change-window-buffer-functions hook to simply note that the
previous window is already visible in another window, and as such it
could just avoid giving the false advise (i.e. not try to give the
correct advise).

Alternatively, it could make a temporary binding for `q' and
a [restore] button in the *Help* buffer which restores the
previous window and point of that window  (making suitable
checks in case the old buffer no longer exists etc.)

And give the advice that "click [restore] button to restore

>                                I also see potential problems in
> putting hooks on every state-changing activity in Emacs, such as
> displaying a buffer in a window.

IMO it is rather obscure that we have a hook (several in fact) which
are run _after_ displaying a buffer in a window -- but no hook which
is run before the change.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]