Reputation: 2089
I want to open a file that is somewhere deep in my project tree. I know the name of the file, however I don't want to go searching the tree for it. I would like a way to enter just the file name, and have emacs search for me. I should also be able to enter the base directory I want to start the search from, and emacs should remember that for future searches.
Upvotes: 3
Views: 334
Reputation: 30699
In Icicles you can find files by matching not just the relative file name but any parts of the path. You can use substring, regexp, and fuzzy matching. You can AND together multiple search patterns (progressive completion). See multi-command icicle-locate-file
.
http://www.emacswiki.org/emacs/Icicles_-_File-Name_Input
Upvotes: 1
Reputation: 73274
M-x find-name-dired
is the built-in solution for this. The default directory changes according to the current buffer, but the minibuffer history contains the previous selections.
Upvotes: 3
Reputation: 74440
I happen to like the ifind.el
package which can be downloaded from the emacswiki here.
Upvotes: 2
Reputation: 65952
Sounds like you are looking for the equivalent of Textmate's Command-T
functionality. The closest I have found for emacs is find-file-in-project
. It can be bound to C-t
or a similar key for convenience: (global-set-key "\C-t" 'ido-find-file-in-tag-files)
Upvotes: 3