2008-08-30 dired

I’ve grown to like dired. I used to hate it, coming from a Norton Commander background. I haven’t used NortonCommanderMode, Sunrise Commander or any related modes. You want to recommend one?

Here’s what I use for dired:

(setq dired-recursive-deletes 'top
      dired-recursive-copies 'top
      dired-dwim-target t)
(add-hook 'dired-mode-hook (lambda ()
			     (local-set-key (kbd "C-c C-r")

Wdired really beats mmv and all the other tools I thought I should learn but never did. Or if I did I’d forget everything about them until I needed them again. Rename files in an Emacs buffer. Look at the result, and the press C-c C-c to make the changes. It doesn’t get any better than that. JohnWiegley also mentioned that you can use C-x C-s, which fits the model of “save my changes” very well. Personally I use C-c C-c because that’s what I use to “commit” changes when writing VersionControl log messages...

I also like recursive deletes and copies, but I see that they can be tricky, which is why I want to be asked. Once.

And the DWIM option allows dired to guess the target of your copy and rename operations by looking at the other dired buffers visible right now. Thus, open location A, split screen using C-x 2, open location B, and Emacs will know that you want to copy from A to B.

Some people really like to keep the number of dired buffers down. I used to worry about it, too. But then I learned to ignore it. Just make sure that your buffer switching doesn’t show you all the dired buffers unless you want to. Remember, I use bs-show.



Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Just say HELLO