all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How delete Dired buffer automatically when select a file in  Dired?
Date: Mon, 8 Dec 2008 16:00:56 -0800 (PST)	[thread overview]
Message-ID: <4480bbfa-cb9b-4f45-b255-5d7485f7ab22@a29g2000pra.googlegroups.com> (raw)
In-Reply-To: 6a632726-cf28-4acf-b78b-94fb68a0f278@d36g2000prf.googlegroups.com

On Dec 8, 11:04 am, "seber...@spawar.navy.mil"
<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 “a” (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 "<return>")
    '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:

• File Management with Emacs
  http://xahlee.org/emacs/file_management.html

  Xah
∑ http://xahlee.org/

  parent reply	other threads:[~2008-12-09  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 19:04 How delete Dired buffer automatically when select a file in Dired? seberino
2008-12-08 19:54 ` Andy Stewart
2008-12-09  0:00 ` Xah Lee [this message]
2008-12-10  3:47   ` seberino
2008-12-10 10:58     ` Leo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4480bbfa-cb9b-4f45-b255-5d7485f7ab22@a29g2000pra.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.