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: Juri Linkov
Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations
Date: Mon, 24 May 2021 02:39:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> and it seems one purported advantage of having `affixation-function` see
>> all the candidates is to be able to do layout decisions since it knows
>> the longest and shortest candidate.
>
> Indeed, that was the point. Unfortunately it turns out that having
> layout decisions based on all the currently visible candidates will give
> bad results when scrolling. So I am never using that capability in my
> packages.
>
> You may have seen the Marginalia package by Omar Antolín Camarena and
> myself, where we add rich annotations to many commands using the
> `annotation/affixation-function` (https://github.com/minad/marginalia).
> We are doing manual alignment there.

This is valuable experience.  It looks like you render rich annotations
depending on the available candidates, and reformat the output
when the number of candidates and their sizes are changing,
like the horizontal completions format in the default frontend
tries to fit as many as possible completions on the same line.

But it seems this works only for limited cases like simple and short
prefix/suffix strings.  I can't imagine how such design could handle
multi-columnar rich annotations.



reply via email to

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