[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How delete Dired buffer automatically when select a file in Dired?
From: |
Xah Lee |
Subject: |
Re: How delete Dired buffer automatically when select a file in Dired? |
Date: |
Mon, 8 Dec 2008 16:00:56 -0800 (PST) |
User-agent: |
G2/1.0 |
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/
☄