emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and,


From: João Távora
Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations
Date: Mon, 24 May 2021 23:54:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Daniel Mendler [2021-05-24 01:04:03] wrote:
>> On 5/23/21 11:54 PM, João Távora wrote:
>>> I'd prefer if we wait a bit.  For one, adding this to
>>> icomplete-vertical-mode would encourage more backend writers to use what
>>> we both seem to agree is a flawed API, thus making the effort we are
>>> discussing more difficult.
>> I thought a minute bit about this, therefore another mail. While I agree
>> with you that the status quo of having both an `annotation-function` and
>> an `affixation-function` is not beautiful API-wise, I am not sure if an
>
> I don't have a strong preference between re-using `annotation-function`
> and adding a new method.  I think we should first figure out what is the
> "ideal" API for that, and only once we have it can we see whether it can be
> retro-fitted into `annotation-function`.

The ideal API for backends to say what they would like to annotation
completions with:

- would not allow the annotator backend to affect the cardinality or
  order of completions being annotated.

- would allow the the annotator backend to perform one-time setup and
  teardown for the whole set of completions.

annotation-function provides the first but not the second,
affixation-function provides the second but not the first.

I think the second may not be that useful for the use cases we have
right now, but let's say I'm wrong and it is.  In that case, I think
we're better giving another optional endpoint to the backend to perform
this setup teardown.  For example, a function of a lambda.

João



reply via email to

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