From: "Drew Adams" <drew.adams@oracle.com>
To: "Denis Bueno" <dbueno@gmail.com>,
"help-gnu-emacs" <help-gnu-emacs@gnu.org>
Subject: RE: Interactively finding file in a list of directories
Date: Fri, 9 Mar 2007 08:20:18 -0800 [thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICCEHHDLAA.drew.adams@oracle.com> (raw)
In-Reply-To: <6dbd4d000703090752q5067f8e3i69d74d07d9cb51fd@mail.gmail.com>
> I would like to be able to visit a file by its name
> but search a set of default directories, rather than having to specify
> the directory...
>
> For example, assume there are 4 different files all named "find.jsp"
> in different directories, and I would like to find a particular one. I
> would do M-x find-resource, type "find", hit TAB, it I would see a
> list that looks something like:
>
> | foobar/find.jsp
> | baz/find.jsp
> | duh/find.jsp
> | blah/find.jsp
I don't have a suggestion for your code, but you can do what you want with
Icicles, if you like, using command `icicle-locate-file'. Just use a regexp
that matches the directories and files you want to find. In this case, use
`find.jsp' (or `/find.jsp$', to be sure not to match files, such as
foofind.jsp or find.jsp2, whose names contain `find.jsp'). You will see
exactly the list of 4 completion choices you show above.
The search for matching files is limited to those under the current
directory (and subdirs etc.) or, if you use `C-u', to those under a
directory you name (which could be the root). See
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_File-Name_Input.
Besides Icicles, there are other packages that let you do something similar.
See http://www.emacswiki.org/cgi-bin/wiki/LocateFilesAnywhere.
next prev parent reply other threads:[~2007-03-09 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 15:52 Interactively finding file in a list of directories Denis Bueno
2007-03-09 16:20 ` Drew Adams [this message]
2007-03-09 20:51 ` Peter Dyballa
2007-03-09 21:25 ` Drew Adams
2007-03-09 22:13 ` Denis Bueno
2007-03-09 22:59 ` Peter Dyballa
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=DNEMKBNJBGPAOPIJOOICCEHHDLAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
--cc=dbueno@gmail.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.