[Top][All Lists]

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

Re: Should killing a help or compile buffer also delete the window?

From: Stefan Monnier
Subject: Re: Should killing a help or compile buffer also delete the window?
Date: Mon, 25 Apr 2005 15:04:37 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> I realize that you can't expect Emacs to know when you are done with a
> window unless you actually tell when.  The obvious way to tell when is
> to type `C-x 1' or `C-x 0', but this leaves the temporary buffer
> lingering, which makes me nervous.

The way Emacs is expected to deal with it, is via the notion of dedicated
windows.  When a window is created by display-buffer, it is sometimes marked
as dedicated, so that if the buffer it displays is killed the window is
deleted (and if it's the only window in the frame, the frame is also

I think Emacs should be a bit more aggressive about marking windows dedicated.

My locally hacked Emacs has changed it to *always* mark the window
as dedicated.  The problem with that is that you can't switch-to-buffer in
a dedicated window, so I introduced the notion of "softly-dedicated" which
basically says "this window was created to display buffer FOO and has never
displayed anything else".  I.e. it's a form of the `dedicated' flag which
does not prevent switch-to-buffer: instead when doing switch-to-buffer the
flag gets set back to nil to indicate that the wnidow is not dedicated
any more.

It works great in my environment, don't know about others's.


reply via email to

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