From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: find certain files Date: Tue, 12 Jun 2007 12:54:16 -0700 Message-ID: References: <11084030.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181678101 27191 80.91.229.12 (12 Jun 2007 19:55:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2007 19:55:01 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 12 21:55:00 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HyCSB-0005od-Gm for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 21:54:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyCSB-0001AA-1M for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 15:54:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyCRw-00016B-C7 for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 15:54:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyCRu-00012X-Oe for Help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 15:54:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyCRu-00011r-H2 for Help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 15:54:42 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HyCRu-0005L1-30 for Help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 15:54:42 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l5CJscui016772 for ; Tue, 12 Jun 2007 14:54:38 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l5CGFh1p000706 for ; Tue, 12 Jun 2007 13:54:37 -0600 Original-Received: from dhcp-amer-csvpn-gw1-141-144-66-98.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 2891308201181678061; Tue, 12 Jun 2007 12:54:21 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <11084030.post@talk.nabble.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Importance: Normal X-Whitelist: TRUE X-Whitelist: TRUE X-Brightmail-Tracker: AAAAAQAAAAI= X-detected-kernel: Linux 2.4-2.6 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44965 Archived-At: > I use Ctrl-f to find files in a directory, but...I want to > limit it to certain files...for example, only sas files, *.sas. > If if do Ctrl-f /projects/a/*.sas, it will open all the sas files. > I want to do Ctrl-f /projects/a/, and only display .sas files, > so I can choose one. How do I do that? Use Icicles apropos completion: C-x C-f \.sas$ S-TAB, if the current directory is /projects/a, or C-x C-f /projects/a/.*\.sas$ S-TAB, otherwise. You match the file extension using the regular expression `\.sas$'. You need to escape the `.' preceding the `sas' file-extension with a backslash, or else it will match any character (except a newline) - as in the `.*', which matches any character any number of times. The `$' matches the end of the file name. When the list of matching file-name candidates is displayed, click `mouse-2' on the one you want. If you want to open multiple files, click `C-mouse-2' on each one you want. You can also cycle through the matching candidates with the `next' key, and use `RET' to choose the current one (or `C-RET' to choose more than one). You can also type a more specific match pattern, to match only certain SAS files. For example, `C-x C-f foo.*bar\.sas$ S-TAB' matches file names that start with `foo', contain also `bar', and end with `.sas'. You can also save a set of completions - for example, if you often use the same set of project files. Just use `C-M->' to save the current matches in a variable, or `C-u C-M->' to save them persistently in a cache file. Later, when you want to retrieve them for completion with `C-x C-f', use `C-M-<' (retrieve from a variable) or `C-u C-M-<' (retrieve from a cache file). You are prompted for the cache file name. You can have any number of variables or files that hold completion sets. http://www.emacswiki.org/cgi-bin/wiki/Icicles: doc http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Apropos_Completions: about apropos completion