[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: Drew Adams
Subject: RE: Should killing a help or compile buffer also delete the window?
Date: Mon, 25 Apr 2005 10:20:44 -0700

    I've always found it annoying that Emacs seems to have a habit of
    leaving junk windows around whenever you invoke something that needs
    to display information in a temporary buffer....

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

    When I was new to Emacs, I would always kill a garbage buffer before
    deleting its temporary window.  Eventually, I discovered `C-x 4 0' and
    started using that....

    I believe the Right Thing to do when the user kills a temporary buffer
    whose window was created as a side-effect of displaying the buffer in
    question is to restore the old window configuration.  At least when
    the automatically created window hasn't been used for anything else,
    Emacs should take the hint and get the window out of the user's face.

The annoyance you describe is, I think, exacerbated (or perhaps is only
manifest?) when one uses one window per frame by default, as I do. And
commands like `delete-window' and `kill-buffer-and-window' don't help in
this regard, with one-window frames.

FWIW, I customized a few things in my Emacs to deal with this. I mention it
for those who might be interested, not as a proposal to change Emacs itself.
If interested, see the short description at

Wrt various efforts to deal with this and your comments on deleting windows
and killing buffers: Deleting a window should not, in general, delete (kill)
its buffer, but killing a buffer _interactively_ can often reasonably delete
its window too (and frame, if `one-window-p').

 - Drew

reply via email to

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