Skip to content

Examples of Omitting Various File Types

  • If you wish to avoid seeing RCS files and the RCS directory, then use

    emacs-lisp
    (setq dired-omit-files
          (concat dired-omit-files "\\|^RCS$\\|,v$"))

    after loading dired-x (see Installation). This assumes dired-omit-localp has its default value of no-dir to make the ^-anchored matches work. As a slower alternative, with dired-omit-localp set to nil, you can use / instead of ^ in the regexp.

  • If you use tib, the bibliography program for use with TeX and LaTeX, and you want to omit the INDEX and the *-t.tex files, then use

    emacs-lisp
    (setq dired-omit-files
          (concat dired-omit-files "\\|^INDEX$\\|-t\\.tex$"))

    after loading dired-x (see Installation).

  • If you do not wish to see ‘dot’ files (files starting with a .), then use

    emacs-lisp
    (setq dired-omit-files
          (concat dired-omit-files "\\|^\\..+$"))

    after loading dired-x (see Installation). (Of course, a better way to achieve this particular goal is simply to omit ‘-a’ from dired-listing-switches.)