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: too many buffers Date: Thu, 21 Jan 2010 11:22:11 -0800 Message-ID: <0AFF3EEB5FC24AA4A86C6E03301D6FC3@us.oracle.com> References: <4B575419.7050908@gnu.org> <87d414qyiv.fsf@tux.homenetwork><4B578116.5070204@gmail.com> <87eilkbe2l.fsf@tux.homenetwork> <4B588448.1040206@gmail.com> 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 1264101782 19961 80.91.229.12 (21 Jan 2010 19:23:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2010 19:23:02 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 21 20:22:55 2010 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 1NY2cH-0007Gd-NQ for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 20:22:54 +0100 Original-Received: from localhost ([127.0.0.1]:50958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY2cI-0003jQ-8G for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 14:22:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NY2bo-0003ea-I4 for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 14:22:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NY2bj-0003TV-HB for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 14:22:24 -0500 Original-Received: from [199.232.76.173] (port=56240 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY2bj-0003TA-CQ for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 14:22:19 -0500 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:21751) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NY2bj-0005sA-0t for help-gnu-emacs@gnu.org; Thu, 21 Jan 2010 14:22:19 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o0LJMDlW020691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Jan 2010 19:22:15 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o0LHoGwA007199 for ; Thu, 21 Jan 2010 19:22:12 GMT Original-Received: from abhmt017.oracle.com by acsmt355.oracle.com with ESMTP id 1389801411264101731; Thu, 21 Jan 2010 11:22:11 -0800 Original-Received: from dradamslap1 (/24.5.185.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Jan 2010 11:22:11 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4B588448.1040206@gmail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcqauRStrbbssGyLQQGcupvcgR5wMAAEJEng X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4B58A965.00A8:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:71351 Archived-At: > > I didn't get this, I try to open a dired buffer but I see the normal > > dired. > > Every time you open something with `a' in dired, it replaces the > original dired buffer. So you don't end up opening numerous dired > buffers while trying to find some file. :) `a' is command `dired-find-alternate-file', which simply calls `find-alternate-file', which replaces the current buffer with the new, target buffer. That might or might not be what you want. I'm a big fan of `find-alternate-file' (which is bound globally to `C-x C-v') - I use it very often. But I use it only when I explicitly want it. Be aware that `a' in Dired always replaces (kills) the current Dired buffer. IOW, it will not only replace one Dired buffer with another Dired buffer - it will also replace a Dired buffer with a file buffer. It does not distinguish between visiting a file and visiting a directory. That is, if you use `a' on a directory line then it replaces the current Dired buffer and opens a new one for the line's directory. But if you use `a' on a file line then it does the same thing: it replaces the current Dired buffer with a buffer visiting the line's file. So if you do not want to kill the current Dired buffer then do not use `a' on a file line. An alternative approach is to load `dired+.el' and use command `toggle-dired-find-file-reuse-dir'. That makes the usual Dired file/directory access keys replace (kill) the current Dired buffer, but only when you visit another directory. IOW, it makes `RET', `mouse-2', `e', and `f' reuse (replace) Dired buffers, just like `a' does. But unlike `a', these keys will not kill the Dired buffer when you visit a file. In sum, if you want to always reuse Dired buffers, then turn this on and forget about it - just use the usual Dired keys. To cancel this behavior, use the toggle command again. To set this behavior by default, put this in your .emacs: (toggle-dired-find-file-reuse-dir 1) http://www.emacswiki.org/emacs/DiredPlus