[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find-file-project
From: |
Stephen Leake |
Subject: |
Re: find-file-project |
Date: |
Wed, 16 Sep 2015 16:11:40 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Dmitry Gutov <address@hidden> writes:
> On 09/16/2015 04:31 PM, Stephen Leake wrote:
>
>> Except that 'completing-read' does require exactly that. I did try to
>> prepend directories for uniquification; it doesn't work. Or at least it
>> would require major surgery on completing-read to make it work.
>
> You might have to use a different `category' and set up a
> `completion-category-overrides' entry that would only use
> `partial-completion' as its style.
>
> You'll be able input "/file", and it'll match "foo/bar/file.el". The
> completion table will have to handle the `boundaries' action properly,
> though.
Is there documentation on this? The doc strings and elisp manual are not
helpful.
Or a working example?
>> Can you be more specific? What is the file name you are trying to
>> complete to?
>
> Suppose I have ./test/unit/foo_test.rb and ./test/functional/foo_test.rb.
>
> Typing 'unit/foo' or 'functional/foo' would return one or the other.
> Note that trying to uniquify the paths automatically might create
> abbreviations where the user would try to input a path segment fully
> (not in this example, though).
Yes, that's a good use case. I'll add it to the file completion tests.
I'll leave discussion of how to deal with the completing-read result to
the other thread.
>> And in the global case, the elisp code has no idea what path global is
>> using; it must always call global to get an absolute path.
>
> I don't understand. Can't Global return absolute file paths?
Yes, it can. But they don't get returned from completing-read.
You deleted too much context here, so I don't know what you are really
asking.
>> It would make sense to modify completing-read to be able to return
>> meta-information with the completion. I looked at that briefly, and I
>> have no idea how to go about it.
>
> It must be doable, but we can manage without it.
Please provide code that shows how; I have no idea.
--
-- Stephe
- Re: find-file-project, (continued)
- Re: find-file-project, Stephen Leake, 2015/09/16
- Re: find-file-project, Stephen Leake, 2015/09/16
- Re: find-file-project, Dmitry Gutov, 2015/09/16
- Re: find-file-project, Stephen Leake, 2015/09/16
- Re: find-file-project, Dmitry Gutov, 2015/09/17
- project.el semantics, Stephen Leake, 2015/09/18
- Re: project.el semantics, Dmitry Gutov, 2015/09/18
- Re: find-file-project, Dmitry Gutov, 2015/09/16
- Re: find-file-project,
Stephen Leake <=
- Re: find-file-project, Dmitry Gutov, 2015/09/17
- Re: find-file-project, Stefan Monnier, 2015/09/16
- Re: find-file-project, Dmitry Gutov, 2015/09/17
- Re: find-file-project, Stefan Monnier, 2015/09/18
- Re: find-file-project, Dmitry Gutov, 2015/09/18
- Re: find-file-project, Stefan Monnier, 2015/09/19
Re: find-file-project, Eli Zaretskii, 2015/09/16