all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <Help-gnu-emacs@gnu.org>
Subject: RE: find certain files
Date: Tue, 12 Jun 2007 12:54:16 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICOEGFDNAA.drew.adams@oracle.com> (raw)
In-Reply-To: <11084030.post@talk.nabble.com>

> 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

  reply	other threads:[~2007-06-12 19:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 18:19 find certain files econfreerider
2007-06-12 19:54 ` Drew Adams [this message]
2007-06-12 20:37   ` econfreerider
2007-06-12 20:54     ` Drew Adams
2007-06-12 19:57 ` Eli Zaretskii
2007-06-12 20:24   ` econfreerider
     [not found]   ` <mailman.2056.1181679859.32220.help-gnu-emacs@gnu.org>
2007-06-12 20:38     ` Stefan Monnier
2007-06-12 20:02 ` Dieter Wilhelm
     [not found] <mailman.2048.1181678085.32220.help-gnu-emacs@gnu.org>
2007-06-12 21:05 ` Mark Elston
2007-06-12 22:51   ` Drew Adams
     [not found] <mailman.2060.1181681757.32220.help-gnu-emacs@gnu.org>
2007-06-25  8:39 ` Mathias Dahl

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=DNEMKBNJBGPAOPIJOOICOEGFDNAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.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.