[Top][All Lists]

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

Re: project--completing-read-strict breaks ada-mode project completion t

From: Stefan Monnier
Subject: Re: project--completing-read-strict breaks ada-mode project completion table
Date: Thu, 17 Jan 2019 08:55:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> I can understand the motivation behind removing common prefixes, but the
>> proper way to do that is to implement a completion style and/or table
>> that does that, and make that style/table the default for projects.
> How exactly would you propose to do that?

His completion style relies on an advice to the completing-read code
which re-adds the text that was stripped during the completion.
Clearly, that won't work when used for completion-at-point.

I actually think his approach is interesting and maybe we should think
how our completion system could provide support for these kinds of

>> The ada-mode completion style and table eliminates all directories from
>> the visible completion string, except the minimum needed to make the
>> string unique. I think this is a better solution to the problem;
>> project.el should allow the user to choose their prefered solution, by
>> choosing a completion style and table.
> The user is not choosing a table. The project backend does, and in your case
> it presents an entirely different look for file names from the other
> backends, with no way for the user to change it.
> I think that's bad.

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).

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.

> 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 so it can be used
for any (flat) completion table (I don't think it'll work well with


reply via email to

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