all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Remove all directory listings buffers
Date: Wed, 02 Dec 2009 09:23:17 +0100	[thread overview]
Message-ID: <87r5rdlr7u.fsf@fh-trier.de> (raw)
In-Reply-To: 27E580CCD2774EA58B0656D020C685B8@us.oracle.com

"Drew Adams" <drew.adams@oracle.com> writes:

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

kill-buffer-and-window fulfills your initially stated requirements.
This was the basis of my judgement.

-ap

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





  parent reply	other threads:[~2009-12-02  8:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 11:55 Remove all directory listings buffers rotlas
2009-11-28 18:40 ` andrea
2009-11-28 19:46   ` Drew Adams
2009-11-28 22:43     ` Andreas Politz
2009-11-29  2:41       ` Drew Adams
2009-11-29  2:55         ` Drew Adams
2009-12-02  8:23         ` Andreas Politz [this message]
     [not found] ` <mailman.11729.1259433914.2239.help-gnu-emacs@gnu.org>
2009-11-29 16:17   ` Colin S. Miller
     [not found] <mailman.11453.1259150170.2239.help-gnu-emacs@gnu.org>
2009-11-25 12:13 ` Pascal J. Bourguignon
2009-11-25 13:09   ` Thierry Volpiatto
2009-11-25 13:20   ` aartist
2009-11-25 14:13     ` Andreas Politz
     [not found]     ` <mailman.11468.1259158466.2239.help-gnu-emacs@gnu.org>
2009-12-01 18:14       ` Dmitry Dzhus
2009-12-04 21:25       ` B. T. Raven
2009-12-05  7:37         ` Andreas Politz
2009-11-26 21:37   ` Tim X
2009-11-25 14:16 ` harven
2009-11-25 14:23 ` Colin S. Miller
2009-11-26  1:13   ` David Hodge

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=87r5rdlr7u.fsf@fh-trier.de \
    --to=politza@fh-trier.de \
    --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.