[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: Thu, 28 Jan 2016 22:32:26 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/28/2016 04:14 PM, Stefan Monnier wrote:

Details of whether completing-read checks the validity of DEFAULT
against the completion table shouldn't determine whether we use DEFAULT
or INITIAL-INPUT.  After all, if we want it to be checked, we can
perform that check manually.

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.

Oh! Should we use minibuffer-default-add-function instead?

This would also allow users to replace this function with one which
handles DEFAULT differently (e.g. inserting it as initial-input but
pre-selected so that delete-selection-mode deletes it in many cases).

I'm not sure that delete-selection-mode is the answer: the user might have to type some additional characters, to disambiguate the initial-input.

reply via email to

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