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

Juri Linkov <juri@linkov.net> writes:

>> Why does the function use `with-selected-window`?  I can't see why it
>> would need to mess with windows.  As for switching buffer, the only
>> reason I can see to switch buffer is for `where-is-internal`, which
>> could be fixed by pre-computing the set of keymaps (see patch below)
>> which also makes sure we use the right buffer whereas
>> `minibuffer-selected-window` could theoretically return another active
>> minibuffer than "ours".
>>[...]
>> +         (let ((keymaps (current-active-maps overriding-local-map)))
>> +           `(metadata
>> +             (affixation-function
>> +              . ,(lambda (arg)
>> +                   (read-extended-command--affixation keymaps arg)))
>
> I tried it out, but it doesn't work, because the above code is executed
> in the minibuffer instead of the original buffer.
>
> It doesn't need to select another window indeed,
> but still needs to switch buffers,

And why not do this switch in minibuffer.el, in
minibuffer-completion-help?  If the minibuffer to switch to is indeed
the the one in the selected minibuffer window, then it makes sense to
me.  This would, in principle, remove the argument for having the
affixation-function.

João



reply via email to

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