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

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

RE: Dired narrowing?


From: Drew Adams
Subject: RE: Dired narrowing?
Date: Sun, 3 Oct 2004 10:51:18 -0700

Shortcut:

Command dired-mark-extension is bound to `* .'.
Use it to mark all files with a particular extension (such as txt).

 - Drew

-----Original Message-----
From: Bill White

On Sun Oct 03 2004 at 01:22, bgm-rao@ieee.org said:

> How do I narrow a dired buffer to see only files with a regexp name?

I someone has a shorter sequence for this, please post it.  I use a
three-command sequence:

'% m' to mark the files you want.  To mark .txt files, the regexp
would be "\.txt" or perhaps "\.txt$" (without the quotes).  ^ matches
the beginning of a file name, not the beginning of a dired line.  To
mark temp* you might do "^temp".

't' to invert the marks, so the ones you *don't* want are marked.

'k' to kill the marked lines (this doesn't delete files, it just
removes listings temporarily from the dired listing).

----------------------------------------------------------------------

'% m' is dired-mark-files-regexp

,----[ C-h f dired-mark-files-regexp RET ]
| dired-mark-files-regexp is an interactive compiled Lisp function in
`dired'.
| (dired-mark-files-regexp REGEXP &optional MARKER-CHAR)
|
| Mark all files matching REGEXP for use in later commands.
| A prefix argument means to unmark them instead.
| `.' and `..' are never marked.
|
| REGEXP is an Emacs regexp, not a shell wildcard.  Thus, use `\.o$' for
| object files--just `.o' will mark more than you might think.
`----

't' is dired-toggle-marks

,----[ C-h f dired-toggle-marks RET ]
| dired-toggle-marks is an interactive compiled Lisp function in `dired'.
| (dired-toggle-marks)
|
| Toggle marks: marked files become unmarked, and vice versa.
| Files marked with other flags (such as `D') are not affected.
| `.' and `..' are never toggled.
| As always, hidden subdirs are not affected.
`----

'k' is dired-do-kill-lines

,----[ C-h f dired-do-kill-lines RET ]
| dired-do-kill-lines is an interactive compiled Lisp function in
`dired-aux'.
| (dired-do-kill-lines &optional ARG FMT)
|
| Kill all marked lines (not the files).
| With a prefix argument, kill that many lines starting with the current
line.
| (A negative argument kills backward.)
| If you use this command with a prefix argument to kill the line
| for a file that is a directory, which you have inserted in the
| Dired buffer as a subdirectory, then it deletes that subdirectory
| from the buffer as well.
| To kill an entire subdirectory (without killing its line in the
| parent directory), go to its directory header line and use this
| command with a prefix argument (the value does not matter).
`----





reply via email to

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