all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Corey Foote'" <coreyfoote@hotmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Showing and hiding files in Dired
Date: Thu, 18 Sep 2008 15:42:01 -0700	[thread overview]
Message-ID: <017701c919df$c4520200$c2b22382@us.oracle.com> (raw)
In-Reply-To: <BLU105-W16D0294A478915BFA784E3DA4F0@phx.gbl>

> 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.

4. If you use library `dired+.el', then `dired-do-kill-lines' is also available
in the `Mark' menu as item `Omit Marked'. You can also use item `Omit Unmarked'
to omit all except the marked files (same as `t k t': toggle marked/unmarked,
then omit marked, then toggle again).

5. `dired+.el' also provides command `diredp-marked', which lets you open a
Dired buffer on just the marked files. In the menu, this is `Dired Marked Files'
or `Dired Marked Files in Other Window'. The other-window form is bound to
`C-M-*'. With this command, only the files that were marked will be present in
the new Dired buffer.
http://www.emacswiki.org/cgi-bin/wiki/DiredPlus

6. If you use Icicles, you can easily open Dired on a set of files from any
directories (not necessarily in the same directory tree). This is handy for
working on a project that spans directories. Define your project files once,
save that definition persistently, then open the project in Dired at any time.
You can also use combinations of Emacs filesets to define such a project.
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Dired_Enhancements

BTW, `dired-do-grep' (also in `dired+.el'), bound to `M-g' in Dired, lets you
`grep' just the marked files or all of the files present in Dired.






  parent reply	other threads:[~2008-09-18 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 21:47 Showing and hiding files in Dired Corey Foote
2008-09-18 22:40 ` Peter Dyballa
2008-09-18 22:42 ` Drew Adams [this message]
2008-09-19  8:24 ` Tassilo Horn
     [not found] <mailman.19503.1221774483.18990.help-gnu-emacs@gnu.org>
2008-09-18 22:10 ` Andreas Politz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='017701c919df$c4520200$c2b22382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=coreyfoote@hotmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.