[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find-file-project
From: |
Dmitry Gutov |
Subject: |
Re: find-file-project |
Date: |
Sat, 9 Jan 2016 02:49:13 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Thunderbird/43.0 |
On 01/08/2016 10:11 PM, Stephen Leake wrote:
Hmm? the doc string of `locate-uniquified-file' says "return an
absolute-filename", not "visit a file".
Sorry, I got confused. I looked for an interactive function to showcase
the logic, and there were only two of them. And only the first one
actually worked interactively.
As written, though, it only lists files at the top-level of load-path,
without recursing.
Yes, that's consistent with `locate-file', and all other uses of
`load-path'.
I suppose so.
It's not how I'd imagine a `project-find-file' command to work.
To add all directories that contain elisp files, you need to build the
path iterator directly:
I would hesitate to ask that of every user.
But once you get used to it, you'll find that you simply don't care
about the directory; you really only need it to disambiguate colliding
names. So the suffix style makes sense.
One drawback of your method is that I don't know what to type, in
advance. The necessary entry might have duplicates (and thus, a
disambiguating prefix/suffix), or it might not. So it's hard to navigate
to a file based on muscle memory alone.
The current project-find-file completion is not ideal, but it already
makes that less of an issue.
How's the performance in the Emacs repository?
There is a noticeable delay, mostly due to computing the partial
completion (before I added that, there was no noticeable delay).
Did you try that using an iterator that visits the whole of Emacs
repo, not just load-path? E.g., I can't visit xdisp.c this way.
Yes; I use a variant of the above path-iterator constructor that adds
the C directories. But that also requires the project code to know about
multiple languages, so it's part of a multi-language project package.
Do you have any performance numbers?
- Re: find-file-project, Dmitry Gutov, 2016/01/05
- Re: find-file-project, Stefan Monnier, 2016/01/06
- Re: find-file-project, Stephen Leake, 2016/01/07
- Re: find-file-project, Dmitry Gutov, 2016/01/07
- Re: find-file-project, Dmitry Gutov, 2016/01/07
- Re: find-file-project, Stephen Leake, 2016/01/07
- Re: find-file-project, Dmitry Gutov, 2016/01/07
- Re: find-file-project, Stephen Leake, 2016/01/08
- Re: find-file-project,
Dmitry Gutov <=
- Re: find-file-project, Stephen Leake, 2016/01/09
- Re: find-file-project, Dmitry Gutov, 2016/01/09
Re: find-file-project, John Wiegley, 2016/01/07
- Re: find-file-project, Dmitry Gutov, 2016/01/07
- Re: find-file-project, Stefan Monnier, 2016/01/08
- Re: find-file-project, Dmitry Gutov, 2016/01/19
- Re: find-file-project, Stefan Monnier, 2016/01/19
- Re: find-file-project, Dmitry Gutov, 2016/01/19