From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bill White Newsgroups: gmane.emacs.help Subject: Re: Dired narrowing? Date: Sun, 03 Oct 2004 15:18:34 GMT Organization: MediaCom High Speed Internet Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1096817023 13727 80.91.229.6 (3 Oct 2004 15:23:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2004 15:23:43 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 03 17:23:29 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CE8Cu-0005o7-00 for ; Sun, 03 Oct 2004 17:23:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CE8JS-0007Gf-2t for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Oct 2004 11:30:14 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wns13feed!worldnet.att.net!attbi_s52.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:t34z7K82QFM7ofziLJNSDIoxNrI= Original-Lines: 66 Original-NNTP-Posting-Host: 12.214.236.108 Original-X-Complaints-To: abuse@mchsi.com Original-X-Trace: attbi_s52 1096816714 12.214.236.108 (Sun, 03 Oct 2004 15:18:34 GMT) Original-NNTP-Posting-Date: Sun, 03 Oct 2004 15:18:34 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:125669 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21028 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21028 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). `---- bw -- Bill White . billw@mchsi.com . http://members.wri.com/billw