[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: dired in one buffer
From: |
Bourgneuf Francois |
Subject: |
RE: dired in one buffer |
Date: |
Wed, 16 Aug 2006 13:06:06 +0200 |
I have put this in my .emacs.
There's an other solution, type "a" instead of Enter to visit a directory (or a
file).
(defun dired-follow-file ()
"In dired, visit the file or directory on this line.
If a directory is on the current line, replace the current Dired buffer with
one containing the contents of the directory. Otherwise, invoke
`dired-find-file' on the file."
(interactive)
(let ((filename (dired-get-filename)))
(if (file-directory-p filename)
(find-alternate-file filename)
(dired-find-file))))
(defun dired-setup-follow-file ()
(substitute-key-definition
'dired-find-file 'dired-follow-file dired-mode-map)
(substitute-key-definition
'dired-advertised-find-file 'dired-follow-file dired-mode-map)) (add-hook
'dired-mode-hook 'dired-setup-follow-file)
Bour9
-----Message d'origine-----
De : help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org
[mailto:help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org] De la
part de Peter Dyballa
Envoyé : mercredi 16 août 2006 12:41
À : henning
Cc : Help-gnu-emacs@gnu.org
Objet : Re: dired in one buffer
Am 16.08.2006 um 11:53 schrieb henning:
> Or am I missing something?
C-x k to kill the buffer? or C-x b to first re-enter that obsolete
buffer?
You could bind a kill-buffer action to pressing/choosing .. or any
other entry of type directory. Maybe dired-x allows things like this.
Could be you also miss that warm and very happy feeling of being glad
that this particular directory is still in the list of buffers.
--
Mit friedvollen Grüßen
Pete
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning."
-- Rich Cook
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs