help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired mode or norton commander


From: Robert Thorpe
Subject: Re: dired mode or norton commander
Date: 7 Dec 2006 04:03:21 -0800
User-agent: G2/1.0

bcochofel wrote:
> Hi, I'm using emacs 22.0.90.2 (compiled from cvs)...
>
> I don't like the way dired opens several buffers each time I visited a
> new dir so I put:
>
> (put 'dired-find-alternate-file 'disabled nil)

That should be ...

 (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)


>From some code posted by Bourgneuf Francois a couple of months ago.
I'm sure there's a simpler way to do it, but I can't think of it right
now.

> Still the same, I've tried dired-single and I always get several
> buffers...
>
> How can I do this?

If you press return on a directory name in dired then it will open a
new dired buffer.  If you press "a" on a directory name it will replace
the current buffer with that buffer.

I use a combination of these commands to navigate directories.  I also
use "o" - open file/dir in other window and "i" which means insert
subdirectory into this dired window.

> Also, I'd like to try nc.el (norton commander emulation) but I get
> compile the file under my emacs version.
> Where can I get mc.el (can't find it anywhere...)

Don't know, sorry.  But once you've mastered the keys above you should
be OK with Dired.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]