From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Remove all directory listings buffers Date: Fri, 27 Nov 2009 08:37:59 +1100 Organization: Rapt Technologies Message-ID: <878wdtx8zs.fsf@lion.rapttech.com.au> References: <87r5rm950a.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259271787 11866 80.91.229.12 (26 Nov 2009 21:43:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2009 21:43:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 26 22:43:00 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 1NDm7A-0007Sf-Ct for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 22:43:00 +0100 Original-Received: from localhost ([127.0.0.1]:60093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDm7A-0001ro-0u for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 16:43:00 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.kjsl.com!news.alt.net!news.astraweb.com!border1.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:YaPuJlvzeQJsLIFBXbkhhOm8Kho= Original-Lines: 40 Original-NNTP-Posting-Host: 1e85569a.news.astraweb.com Original-X-Trace: DXC=n17Q`[QZ^hRJRMXARXUeW^D8U\dF3`\T3jG8S6WC]D[1?TT9JLP_aY Original-Xref: news.stanford.edu gnu.emacs.help:175095 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:70161 Archived-At: pjb@informatimago.com (Pascal J. Bourguignon) writes: > rotlas writes: > >> I often end up with lots of directory buffers (those buffers with "dired by >> name" mode), after navigating in the filesystem in order to open files. Is >> there an easy way to get rid of all those buffers at once, and leaving the >> other? > > You could write a little emacs command to do that, but it should also > be easy enough to use: > > C-x C-b (or M-x list-buffers RET) > > In the buffer list, you can mark buffers for killing with d (and move > down and up with n and p). When you're done, type x to execute the > orders. Emacs 23 also introduced the new command 'kill-matching-buffers', which may be of help. Personally, I use Pascal's method. I also tend not to worry about lots of buffers hanging around - they are not consuming much resources and I don't really see them unless I need/want to. Personally, I think its good practice to get used to lots of buffers hanging around - I often have more than 100 open buffers. There are things you can configure if you don't want them all showing up in buffer listings etc, depending on whther you use one of the many packages to assist with buffer switching/management or not. I also seem to remember some config setting for dired that wold make it re-use buffers, but maybe I imagined that! Possibly worth a look in the dired and dired-aux config stuff HTH Tim -- tcross (at) rapttech dot com dot au