[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: A quick way of opening any file with given extension within adirecto
RE: A quick way of opening any file with given extension within adirectory hierarchy?
Tue, 5 Jun 2007 10:22:29 -0700
> I am wondering if this functionality has been written by someone.
> 1. I call func-i-look-for.
> 2. The mini buffer switches to "What file do you want?: "
> 3. When I start typing, there is a buffer that shows all files within
> a given directory hierarchy whose filenames start with what I have
> 4. I can cycle between available completions with C-n C-p (without
> messing up what I have written in the minibuffer) and <return> takes
> me to chosen buffer.
> Let's clarify with an example. I have the following source tree:
> And call (after requred setup is made) func-i-look-for, then type "fi"
> I would now have file.cpp and file2.cpp listed in the buffer, and C-n
> <return> would get me to file2.cpp.
> Does anyone know if there is elisp code that does this somewhere?
Icicles does what you want. Specifically, command `icicle-locate-file'.
Your input matches any part of the complete file name, however, including
the directory part, so if you didn't want that, you would either:
1) Type a regexp such as "/fi" (or, to be rigorous, "/fi[^/]*$", because
that prohibits matches against subdirectory names that start with "fi")
2) Define your own command, based on `icicle-locate-file', which would take
care of that.