From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Remove all directory listings buffers Date: Sat, 28 Nov 2009 18:41:25 -0800 Message-ID: <27E580CCD2774EA58B0656D020C685B8@us.oracle.com> References: <26511405.post@talk.nabble.com> <87skbyb78g.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259462682 20998 80.91.229.12 (29 Nov 2009 02:44:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Nov 2009 02:44:42 +0000 (UTC) To: "'Andreas Politz'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 29 03:44:35 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 1NEZm5-000728-05 for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Nov 2009 03:44:33 +0100 Original-Received: from localhost ([127.0.0.1]:54919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEZm4-0006Pc-G5 for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Nov 2009 21:44:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEZld-0006O4-BI for help-gnu-emacs@gnu.org; Sat, 28 Nov 2009 21:44:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEZlY-0006MW-P4 for help-gnu-emacs@gnu.org; Sat, 28 Nov 2009 21:44:05 -0500 Original-Received: from [199.232.76.173] (port=43585 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEZlY-0006MT-II for help-gnu-emacs@gnu.org; Sat, 28 Nov 2009 21:44:00 -0500 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:37238 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NEZlY-0008J9-5u for help-gnu-emacs@gnu.org; Sat, 28 Nov 2009 21:44:00 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id nAT2hBRk028576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 29 Nov 2009 02:43:15 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id nAT1u8kh018447; Sun, 29 Nov 2009 02:43:21 GMT Original-Received: from abhmt001.oracle.com by acsmt353.oracle.com with ESMTP id 664352131259462493; Sat, 28 Nov 2009 18:41:33 -0800 Original-Received: from dradamslap1 (/24.5.185.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 28 Nov 2009 18:41:33 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87skbyb78g.fsf@fh-trier.de> Thread-Index: AcpwfGNvG/ELR1eSQpmB+cLOOP5oBgAHoT/A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4B11DFC4.003F:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:70219 Archived-At: > >> 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.)