Next: Local Variables, Previous: Installation, Up: Top [Contents][Index]

## 3 Omitting Files in Dired

Omitting a file means removing it from the directory listing. Omitting is useful for keeping Dired buffers free of “uninteresting” files (for instance, auto-save, auxiliary, backup, and revision control files) so that the user can concentrate on the interesting files. Like hidden files, omitted files are never seen by Dired. Omitting differs from hiding in several respects:

- Omitting works on individual files, not on directories; an entire directory cannot be omitted (though each of its files could be).
- Omitting is wholesale; if omitting is turned on for a Dired buffer, then all uninteresting files listed in that buffer are omitted. The user does not omit (or unomit) files one at a time.
- Omitting can be automatic; uninteresting file lines in the buffer can be removed before the user ever sees them.
- Marked files are never omitted.

`C-x M-o`

  (`dired-omit-mode`) Toggle between displaying and omitting “uninteresting” files.

`* O`

  (`dired-mark-omitted`) Mark “uninteresting” files.

In order to make Dired Omit work you first need to load `dired-x.el` inside `dired-load-hook` (see Installation) and then evaluate `(dired-omit-mode 1)` in some way (see Omitting Variables).