From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: How delete Dired buffer automatically when select a file in Dired? Date: Mon, 8 Dec 2008 16:00:56 -0800 (PST) Organization: http://groups.google.com Message-ID: <4480bbfa-cb9b-4f45-b255-5d7485f7ab22@a29g2000pra.googlegroups.com> References: <6a632726-cf28-4acf-b78b-94fb68a0f278@d36g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1228801125 16285 80.91.229.12 (9 Dec 2008 05:38:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Dec 2008 05:38:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 09 06:39:47 2008 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 1L9vJy-0007S0-IT for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Dec 2008 06:39:47 +0100 Original-Received: from localhost ([127.0.0.1]:48196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9vIn-0004jd-K6 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Dec 2008 00:38:33 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!a29g2000pra.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 42 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1228780856 1080 127.0.0.1 (9 Dec 2008 00:00:56 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 9 Dec 2008 00:00:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a29g2000pra.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:165155 comp.emacs:97433 X-Mailman-Approved-At: Tue, 09 Dec 2008 00:38:13 -0500 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:60486 Archived-At: On Dec 8, 11:04 am, "seber...@spawar.navy.mil" wrote: > When I select a file in Dired, it opens in a new buffer. > > The old Dired buffer still exists. > > How automatically delete the Dired buffer when I open a new buffer > with a new file from Dired? in dired, you can use the shortcut =E2=80=9Ca=E2=80=9D (which invokes dired= -find- alternate-file). Or, you can use this code: (put 'dired-find-alternate-file 'disabled nil) (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map (kbd "") 'dired-find-alternate-file) ; was dired-advertised-find-file (define-key dired-mode-map (kbd "^") (lambda () (interactive) (find-alternate-file ".."))) ; was dired-up-directory )) you might make it 'enabled ... i don't recall since i stopped using the above. I hope emacs developers makes the above into a dired preference setting. Your question is a recurring question. For some other dired faq, see bottom: =E2=80=A2 File Management with Emacs http://xahlee.org/emacs/file_management.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84