From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.help Subject: Re: Remove all directory listings buffers Date: Wed, 02 Dec 2009 09:23:17 +0100 Message-ID: <87r5rdlr7u.fsf@fh-trier.de> References: <26511405.post@talk.nabble.com> <87skbyb78g.fsf@fh-trier.de> <27E580CCD2774EA58B0656D020C685B8@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259742258 15722 80.91.229.12 (2 Dec 2009 08:24:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Dec 2009 08:24:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 02 09:24:11 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFkVN-0007fb-Oi for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Dec 2009 09:24:10 +0100 Original-Received: from localhost ([127.0.0.1]:44068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFkVN-0003TN-3M for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Dec 2009 03:24:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFkV1-0003TA-KH for help-gnu-emacs@gnu.org; Wed, 02 Dec 2009 03:23:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFkUx-0003SG-WF for help-gnu-emacs@gnu.org; Wed, 02 Dec 2009 03:23:47 -0500 Original-Received: from [199.232.76.173] (port=46585 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFkUx-0003SD-PN for help-gnu-emacs@gnu.org; Wed, 02 Dec 2009 03:23:43 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:37062) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFkUx-0000rD-B7 for help-gnu-emacs@gnu.org; Wed, 02 Dec 2009 03:23:43 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFkUw-0005Vk-CK for help-gnu-emacs@gnu.org; Wed, 02 Dec 2009 03:23:42 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NFkUu-0007TF-8r for help-gnu-emacs@gnu.org; Wed, 02 Dec 2009 09:23:40 +0100 Original-Received: from dslb-088-068-197-224.pools.arcor-ip.net ([88.68.197.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Dec 2009 09:23:40 +0100 Original-Received: from politza by dslb-088-068-197-224.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Dec 2009 09:23:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-088-068-197-224.pools.arcor-ip.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:xep+eJ/PxAdhJEUP5vWR9eA86yA= X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70309 Archived-At: "Drew Adams" 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.)