emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating *Completions* as you type


From: John Yates
Subject: Re: Updating *Completions* as you type
Date: Tue, 21 Nov 2023 07:54:26 -0500

Sharing this insight in the associated documentation will aid users.

On Tue, Nov 21, 2023 at 3:31 AM Juri Linkov <juri@linkov.net> wrote:
> I expect some disagreement about the following question: should
> completion-category-overrides override the display-sort-function
> returned by the completion table?  That is, should it instead be:
>
> (or
>  (alist-get 'display-sort-function (alist-get category completion-category-overrides))
>  (alist-get 'display-sort-function metadata)
>  (alist-get 'display-sort-function (alist-get category completion-category-defaults))
>  completions-sort)

I think this is the most correct precedence since the users should be
able to override the function call metadata.  We have an analogous
priority levels for 'display-buffer':

1. display-buffer-overriding-action
2. display-buffer-alist
3. function call arguments that correspond to completion metadata
4. display-buffer-base-action
5. display-buffer-fallback-action

Since completion-category-overrides is a user option
it corresponds to display-buffer-alist.
And completion-category-defaults looks like
display-buffer-base-action.



--
John Yates
505 Tremont St, #803
Boston, MA 02116

reply via email to

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