[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: dired in one buffer
From: |
Jay Bingham |
Subject: |
RE: dired in one buffer |
Date: |
Wed, 16 Aug 2006 16:19:50 GMT |
On Wednesday, August 16, 2006 4:53 AM henning wrote:
> I would like dired to stay in the same buffer, e.g. when I go up
> one directory I would like the present buffer to just clear and
> be replaced by the content in the parent folder instead of
> opening a new buffer. If find it quite annoying to have a stack
> of dired buffers open after looking around in the directory
> tree... Does anyone know how to implement that? Or am I missing
> something?
Missing something. :-)
The functionality is mostly already present in emacs. The function
dired-find-alternate-file (normally assigned to the 'a' key in dired-
mode) replaces the current buffer (the dired buffer) with the
file/directory that the cursor is on. When the function exits the
dired buffer containing the original directory has been killed and
the active buffer contains the file/directory that was opened.
Going down in the directory tree is intuitive. Going up the
directory tree requires that the cursor be on the '..' entry in the
dired buffer.
If you are used to using the '^' to navigate up the directory tree
then you will either need to retrain yourself or will need to do some
elisp programing to attach the functionality to the '^' key. I
looked at the function dired-up-directory (in dired.el) which is
associated with the '^' key, it does not look like it would be too
difficult to create your own function based on it and assign it to
the '^' key in dired mode.
Good luck,
__
J_)
C_)ingham
_____________________________________________________________________
PrivatePhone - FREE telephone number & voicemail.
A number so private, you can make it public.
http://www.privatephone.com