Say I want to find a directory like:


And I don't know the intermediate directory paths, or the full directory name, but remember that the directory has the word looking in it.

I am using flx-ido like so:

(require 'flx-ido)
(setq ido-enable-flex-matching t)

Which joins very well for when I want to do things like f/b/b/b/d/stuff

Is there a good way to type looking and get a list of suggestions?


I wrote a small script, and then integrated with helm to achieve similar effect. Luckily I wrote about it on my blog (while trying to kickstart my blogging habit). Here it is:


Should work on Linux transparently. On Windows, you can plug in the actual Everything app that I was trying to mimic.

  • Please copy the answer here, or it's just a link-only answer.
    – zck
    Oct 21 '16 at 19:36

Install find-file-in-project, https://github.com/technomancy/find-file-in-project

M-x find-directory-in-project-by-selected


I'm using the standard (icomplete-mode t) in my init-file. Then for

Directories: C-x d /*/*/src -> gives me as a candidate /usr/local/src, with other word it is working for your scenario when you know the depth of the interesting directory and for

Files: C-x C-f /u/l/s/e returns the completion of -> /usr/local/src/emacs, or for

Functions: C-h f a-r-m -> one candidate is e.g. auto-revert-mode. Also for

Buffers: C-x b d.-> returns candidate buffers beginning with d and a file suffix. Finally

Code: a-r-m C-M-i writes the completion auto-r-mod into the buffer and a completion buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.