Re: Showing and hiding files in Dired
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Showing and hiding files in Dired         

Group: gnu.emacs.help · Group Profile
Author: Tassilo Horn
Date: Sep 19, 2008 01:24

Corey Foote hotmail.com> writes:

Hi Corey,
> Is there away to filter the directory list provided by Dired by
> showing or hiding all files which match a regular expression?

Sure, it's emacs. You can use `dired-omit-mode' which in in
dired-x.el. Here's my setup:

--8<---------------cut here---------------start------------->8---
(require 'dired-x)
(setq dired-omit-files
(rx (or (seq bol (? ".") "#") ;; emacs autosave files
(seq bol "." (not (any "."))) ;; dot-files
(seq "~" eol) ;; backup-files
(seq bol "CVS" eol) ;; CVS dirs
)))

(setq dired-omit-extensions
(append dired-latex-unclean-extensions
dired-bibtex-unclean-extensions
dired-texinfo-unclean-extensions))

(add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1)))
--8<---------------cut here---------------end--------------->8---

With `M-o' you cat toggle the mode.

Hope that helps,
Tassilo
no comments
diggit! del.icio.us! reddit!