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: Daniel Mendler
Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations
Date: Mon, 24 May 2021 01:04:03 +0200

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
augmented `annotation-function` is actually a less "flawed" design, in
particular if one has to use a weird specification to retain the
compatibility (prefix string attached as text property to the returned
suffix string).

You can see the `affixation-function` as the successor of the
`annotation-function`, with the long term goal of replacing it entirely.
But given that, I would probably prefer a design where the function only
takes a single candidate as argument and returns a plist of annotations,
with :prefix, :suffix, and maybe more to allow extensions.

But regarding merging or not merging the patch, I don't agree with your
argument of taking this as leverage which makes the discussion more or
less difficult. The status quo is that the `affixation-function` is part
of the current `completing-read` definition and default completion UI in
Emacs master, so it should be okay to merge this. Corrections to the
definition are a separate discussion. In any case, if it comes to a
change of definition I am willing to help out with patches.

Daniel



reply via email to

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