unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Enselic" <enselic@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: A quick way of opening any file with given extension within adirectory hierarchy?
Date: Tue, 5 Jun 2007 10:22:29 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICGECNDNAA.drew.adams@oracle.com> (raw)
In-Reply-To: <1181061564.502427.153140@g4g2000hsf.googlegroups.com>

> 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
>    written.
> 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:
>
> root/file.cpp
> root/gtk/gtk.cpp
> root/msw/file2.cpp
>
> 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")

or

2) Define your own command, based on `icicle-locate-file', which would take
care of that.

http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_File-Name_Input

  reply	other threads:[~2007-06-05 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 16:39 A quick way of opening any file with given extension within a directory hierarchy? Enselic
2007-06-05 17:22 ` Drew Adams [this message]
     [not found] ` <mailman.1584.1181064234.32220.help-gnu-emacs@gnu.org>
2007-06-05 19:14   ` A quick way of opening any file with given extension within adirectory hierarchy? Peter Tury
2007-06-05 20:07     ` Eli Zaretskii
2007-06-05 20:30     ` Lennart Borgman (gmail)
2007-06-05 20:43     ` A quick way of opening any file with given extension withinadirectory hierarchy? Drew Adams
2007-06-05 21:00 ` A quick way of opening any file with given extension within a directory hierarchy? Kim F. Storm
2007-06-05 21:17   ` Dieter Wilhelm
2007-06-06  8:20     ` Kim F. Storm
2007-06-07  1:40       ` Dieter Wilhelm
2007-06-14 18:31 ` Enselic

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICGECNDNAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=enselic@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).