[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make project--find-in-file generic, add interactive filename to proj

From: Dmitry Gutov
Subject: Re: make project--find-in-file generic, add interactive filename to project-find-file
Date: Fri, 29 Jan 2016 00:22:32 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/29/2016 12:11 AM, Stefan Monnier wrote:
But in the current use case, the "filename at point" will almost always
_not_ be in the completion table. And it may even have several expansions,
not just one. Because it's only a part of the file name: maybe it's the base
name, or maybe it doesn't even have an extension.

So, we want to check it only if it's actually returned.  Sounds right.

I don't follow.

Do you mean returned by completing-read? I'd prefer not to allow the user to input it as-is (we call completing-read with REQUIRE-MATCH t).

Or, to put it differently, I'd like to be able to M-x project-find-file, then press RET, and:

- If there's just one match for the filename-at-point, see it opened (the completion must be expanded first).

- Otherwise, be forced to edit the input, to narrow down the matches, or to type something different, if the project has no matching files.

If I pass filename-at-point as DEFAULT, I don't get either of these items.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]