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:37:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

>> I also don't understand why :affixation-function is given a full list of
>> completions, when it is presumably meant to return a list of exactly the
>> same length.
>
> This has the advantage in functions like read-extended-command--affixation,
> where minibuffer-selected-window is selected only once with 
> with-selected-window,
> then all completions are processed in the same buffer, without the need
> to switch buffers for every completion in a long list, as annotation-function
> would require to do. 

I've seen this in read-extended-command--affixation.el indeed. I don't
understand:

- the need for this window switch, but I might be missing something;
- if the need is to process in the same buffer, why one switches
  windows;
- why it can't and shouldn't be done in the funcall locus by the frontend
  (in this case minibuffer-completion-help)

>> Seems like a potential hazard to allow this function to do filtering.
>
> OTOH, not allowing the function to do filtering is too much hand-holding
> for users who want the freedom to transform the completions to their
> likings.

But if they exercise this freedom fully they're going to break the
layout of the frontend, like icomplete.el, which potentially does layout
calculations.  Probably company.el or any other frontend is the same.
So not so much holding hands, more like saving feet from being shot :-).

João



reply via email to

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