[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing open file buffer handling
From: |
Ehud Karni |
Subject: |
Re: Changing open file buffer handling |
Date: |
Wed, 5 Mar 2003 18:34:44 +0200 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 5 Mar 2003 12:15:28 +0100 (MET), Niclas Blomqvist <niclas-b@dsv.su.se>
wrote:
>
> When I use C-x C-f to open a directory buffer and then use Enter key to
> navigate through directories until I finally find the desired file, Emacs
> leaves me with a buffer list containing every directory buffer I have
> visited on the way. Is there a setting that can be changed so that walking
> through directories updates the current buffer until I reach my file
> instead of creating a new buffer for every new directory?
You can press `i' to add the subdirectory in the current buffer as was
suggested by Jeffery B. Rancier <jeff.rancier@softechnics.com>, or you
can write few elisp lines and have a "real" subdirectory replacement.
Add this to your .emacs:
(defun dired-find-alternate-file
"In dired, visit this file or directory instead of dired buffer."
(interactive "P")
(find-alternate-file (dired-get-filename)))
(eval-after-load "dired"
'(define-key dired-mode-map "a" 'dired-find-alternate-file))
Now, when you press `a' you'll edit the file or brows the subdirectory
instead of the parent directory.
Ehud.
- --
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:ehud@unix.mvs.co.il Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)
iD8DBQE+ZickLFvTvpjqOY0RAhgCAJ4/2vSbzCdQGt0w0oEEEZoR4QE2ogCfdAcV
Wty33ABAte7FgMQZtU4oa3c=
=QPO5
-----END PGP SIGNATURE-----