DiredMode

DiredMode is the mode of a Dired buffer. It shows a directory (folder) listing that you can use to perform various operations on files and subdirectories in the directory. The operations you can perform are numerous, from creating subdirectories to byte-compiling files, searching files, and of course visiting (editing) files.

The closest thing to Dired in MS Windows is Windows Explorer. In Emacs, we sometimes speak of “editing” a directory, not “exploring” it, but the behavior is similar.

The best way to learn about Dired is to try it out: type ‘C-x d’ or ‘C-x 4 d’ and enter a directory name. Then, try various Dired commands. The most important are available on the menu bar menus Operate, Mark, Regexp, Immediate, and Subdir. Use the menu to discover some of what is available; the menu also indicates the key sequences you can use as an alternative.

It’s possible to assign DedicatedKeys keys, such as S-<f1> (shift+F1), to open up a directory listing. For example, adding the following to your InitFile allows S-<f1> to visit your home directory in Dired Mode.

(global-set-key (kbd "S-<f1>")
  (lambda ()
    (interactive)
    (dired "~/")))

You can read more about Dired mode by reading the help displayed using ‘C-h m’ in a Dired buffer. Even more information is available in the EmacsManual: ‘C-h i’, choose Emacs, then choose Dired under Advanced Features. (Or read Dired online.)

Vanilla Dired distributed with Gnu Emacs

Dired tips and additional features

Windows specific tips and additional features

Alternatives to Dired

See also


CategoryDirectories CategoryModes CategoryProgrammerUtils