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

From: Daniel Mendler <[email-masked]>
Date: Sun, 23 May 2021 13:10:00 +0200

On 5/23/21 11:37 AM, João Távora wrote:
> Can you give a visual example of what it looks like for a given completion
> table, ...

I attached two screenshots:

- M-x
- `describe-symbol` if `completions-detailed` is set

The layout is the same as in the usual *Completions* buffer, when
`completions-format` is set to `one-column`.

> ...along with the changes to the completion table code to take
> advantage of the new interface?

See for example `help--symbol-completion-table-affixation` in
help-fns.el or `read-extended-command--affixation` in simple.el.

There are more `annotation-function`s/`affixation-function`s present in
the Emacs code base if you grep.

See also minibuffer.el for the implementation for the *Completions* buffer.

> It seems that neither affixation or annotation were present in non-vertical
> icomplete.el before your patch.  Do you have an idea why?  Should they
> be added there, too?

There is not enough space in the vertical display. The only
annotations/affixations which would make sense are single character
annotations, maybe icons. But people who like the compact Ido/Icomplete
horizontal style probably would not want this additional noise.
Furthermore it makes the completions harder to read since you get
prefix-completion-suffix, prefix-completion-suffix, where everything is
mixed up. This is different from the vertical mode, where annotations
and candidates are visually separate and easier to distinguish.

Daniel