emacs-devel
[Top][All Lists]
Advanced

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

Re: Recommendation for CAPF setup when you don't know completion string


From: Stefan Monnier
Subject: Re: Recommendation for CAPF setup when you don't know completion string in advance
Date: Tue, 11 May 2021 12:54:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> I think the answer depends on the completion-style.  IIRC some
>> completion styles do that on purpose (in order to preserve/reproduce
>> the behavior of earlier completion code), whereas I seem to remember
>> a few cases where we may do something like that not on purpose (rather
>> because of a bug, or out of laziness).
>
> I see. There is some code in `choose-completion-string` which checks if
> the length of the resulting string equals the car of the
> `completion-boundaries`. When choosing a directory, the minibuffer is
> not automatically exited. But the suffix string after the directory is
> still thrown away. I don't see where the completion style is involved here.

Sounds like a bug then.

> The problem is probably that when appending the suffix the resulting
> choice is not necessarily a valid candidate. This is at least how I
> thought about it when replicating the behavior in Vertico/Corfu.

Something like that, yes.

> We could adjust the `choose-completion` behavior such that the suffix is
> never thrown away and completion is never automatically exited when a
> suffix exists. Would that make sense or did I miss something?

I think it makes sense.

> Is this worth a bug report/patch?

Yes.


        Stefan




reply via email to

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