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

more...

gnu.emacs.help Profile…
 Up
RE: Showing and hiding files in Dired         


Author: Drew Adams
Date: Sep 18, 2008 15:42

> From: Corey Foote Sent: Thursday, September 18, 2008 2:48 PM
> Is there away to filter the directory list provided by
> Dired by showing or hiding all files which match a regular
> expression? Say I just wanted to see files in the current
> directory which ended with .html.

[Please use plain-text, not HTML, for mail to the mailing list.]

Yes, there are several ways to do that. Here are a few. Other people will
perhaps add others.

1. You can open Dired on just the files that match a shell globbing pattern. For
example, `C-x d f*.html' opens Dired on only files that start with `f' and end
with `.html'. This is not using a regexp, but it is sufficient for your
particular request.

2. The rest of the items here work with the marked files in Dired. So first use
`%% m' to mark the files you want using a regexp. `%% m' acts on all files in the
Dired buffer, including files in inserted subdirectories.

3. Library `dired-aux.el' gives you command `dired-do-kill-lines', which is
bound to `k'. It hides (omits, "kills") the (lines for the) files that are
marked. Use `l' or `g' to show the (hidden) marked files again. Again, marked
files in included subdirs are omitted too.
Show full article (2.43Kb)
no comments