help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Showing and hiding files in Dired


From: Tassilo Horn
Subject: Re: Showing and hiding files in Dired
Date: Fri, 19 Sep 2008 10:24:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Corey Foote <coreyfoote@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]