|
From: | Dmitry Gutov |
Subject: | Re: project--completing-read-strict breaks ada-mode project completion table |
Date: | Fri, 18 Jan 2019 05:19:18 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0 |
On 17.01.2019 16:55, Stefan Monnier wrote:
I actually think his approach is interesting and maybe we should think how our completion system could provide support for these kinds of "styles".
Sure, but in some different way. Having some wrapper middleware could work, but I'm afraid it might stumble against the same problem the current project-find-file does: completion tables are too flexible.
So it's hard to make a universal wrapper which would modify them all the same.
Indeed, an important design constraint I followed for the completion styles is that the user should be able to choose the style (hence the indirection through completion-category-overrides).
Yup.
I think part of Stephen's argument is that the same comment applies to the new completion behavior of M-x project-find-file you installed in 8f9d93f3054.
Like already said, nobody's stopping you or him or anyone else from adding a new command that shows file names in a different way (e.g. uniquified/abbreviated).
As long as both project-find-file and the new command work the same across all project backends, I'm happy.
And again, it doesn't have to be a separate command, the behavior could be customizable and dispatched inside the one command's implementation.
We can't do that if the said behavior already lives inside the completion table, however.
Far be it from me to criticize the exact "uniquified" look for the entries, but I don't think it's a good place to produce them. If it's not possible to implement them via a completion style or something like that, that would apply to all project backends and their completion tables if the user so chooses, maybe it should just be a different command.I'm not sure if it currently can work for any project backend, but its design definitely aims for it to be backend-agnostic
By "it", do you mean uniquify-files.el?
so it can be used for any (flat) completion table (I don't think it'll work well with completion-file-name-table).
Would you agree that a "flat completion table" is basically always a list of files?
[Prev in Thread] | Current Thread | [Next in Thread] |