help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Remove all directory listings buffers


From: Drew Adams
Subject: RE: Remove all directory listings buffers
Date: Sat, 28 Nov 2009 18:41:25 -0800

> >> But I also always end up having too many buffers, I need a better
> >> strategy for killing them when I don't need them anymore..
> >
> > I think some people are in the habit of using `C-x 0' to 
> > remove the current window, even when they no longer need
> > the window's buffer.
> >
> > I use this as a replacement for `kill-buffer' interactively (only): 
> 
> No need for a library: C-h f kill-buffer-and-window RET

Not the same, is it? Take a look at the code.
If you prefer that, go right ahead and use it.

* I prefer that it be usable for any buffer, not just the current one (default).

* I prefer that all of the windows showing the buffer be deleted, not just the
selected one.

* I prefer not to have to confirm by typing `y e s RET' instead of `RET'.

* I prefer that the window not be deleted if `kill-buffer' doesn't kill the
buffer (e.g. if it was modified and I said not to kill it after all).

* I prefer that no error be raised if not interactive and the buffer is not
live. (Yes, I do use this non-interactively also.)

Don't judge things only by their names. `kill-buffer-and-window' and
`kill-buffer-and-its-windows' look like they might do the same thing, but what
counts is the behavior.

(FWIW, I also use a version of `delete-window' that deletes the frame if has
only one window, so this same command blows the frame away for me.)





reply via email to

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