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: Juri Linkov
Subject: Re: Updating *Completions* as you type
Date: Wed, 18 Oct 2023 20:32:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> Actually there is already a nil value in completions-sort with the tag
>> "No sorting".  This works nicely for 'C-x b'.  The remaining need is
>> to be able to set it only for 'C-x b', not for other completion types.
>
> I feel quite strongly that we should not extend completions-sort to be
> able to affect different completion types differently.  Instead I think
> we should leave completions-sort as a blanket configuration for what to
> do if the completion metadata does not specify display-sort-function,
> and if we want to allow customizing an individual completion type, that
> completion type should specify a display-sort-function which can be
> customized.
>
> If we do extend completions-sort to affect different completion types
> differently, I expect we'll see lots of silly things, like packages with
> new completion types which automatically install changes to
> completions-sort instead of just specifying their own
> display-sort-function.

Probably different completion types should provide separate options
such as e.g. 'read-char-by-name-sort' defines 'display-sort-function'
for 'read-char-by-name'.

The same could be added for 'C-x b'.  But unfortunately currently
it's hard-coded in 'internal-complete-buffer':

#+begin_src c
  else if (EQ (flag, Qmetadata))
    return list3 (Qmetadata,
                  Fcons (Qcategory, Qbuffer),
                  Fcons (Qcycle_sort_function, Qidentity));
#+end_src



reply via email to

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