[Top][All Lists]

[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: Sat, 14 Oct 2023 19:58:33 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>> It would be nice if there was a built-in customization which caused
>>> *Completions* to update as you type, as long as that buffer is visible.
>>> I imagine such a request has been made before, so what is the obstacle
>>> to adding it?
>> I don't remember what was the obstacle, but here is the previous patch
>> that implements the behavior of zsh and is based on icomplete-mode.
> Nice! Although again this is more features than I want - I just want
> *Completions* to automatically update after it opens.

Probably it's possible to pare it down to less code with less features
that could basically do the same after toggling a new option.

> That being said, yes this may be nice.  But minibuffer-completion-help
> already does sort the completions using display-sort-function, just like
> completion-all-sorted-completions, so what's causing the difference in
> behavior?

It seems this is implementable in minibuffer-completion-help
by copying this code from completion-all-sorted-completions:

              (setq all (minibuffer--sort-by-position
                          (substring string 0 base-size))

> Honestly the main place I find myself wanting different sorting of
> completions is for buffer completion - I'd prefer buffers to be sorted
> by most-recently-used.  Maybe we can just add such an option?

Such an option would be nice.  Maybe the right way to support it
is to add a new sort function with the code above.  Then the caller
could provide such a function in the completion metadata.

reply via email to

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