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: Tue, 25 May 2021 00:52:00 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> 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, maybe current-active-maps
in the above wrapped with something like

  (with-current-buffer (window-buffer (minibuffer-selected-window))
    (current-active-maps ...))



reply via email to

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