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: Tue, 17 Oct 2023 21:35:07 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> On reflection, I think adding a new option for completions-sort is
> indeed what we should do.  Otherwise, we won't get historical sorting
> for non-programmed completing-read, which is a pretty common kind of
> completing-read.  Here's a patch to do that.

> We can always add display-sort-functions later for buffers and files, if
> that ends up being desirable.

Thanks, this is a nice first step that paves the way to later
additions of display-sort-functions and keys for toggling
sorting in *Completions*.

> Also, tangentially, I think probably we should rework
> minibuffer-complete-history and minibuffer-complete-defaults to be
> persistent - as in, regular TAB afterwards continues to complete history
> or defaults.  And there should be some way to reset back to normal.
> That would be a good complement to this completions-sort change, by
> maybe giving a way to switch on-demand to alphabetical sorting.  (I've
> long thought this would be good and useful, but in particular it's
> relevant for completions-auto-update since that will otherwise nearly
> immediately reset the displayed completions back to normal.)

I think we should choose a key to toggle completion type between
history/default/regular completion.

> Subject: [PATCH] Add a historical option to completions-sort
>
> This causes completion to sort based on history.  This is useful for
> getting, e.g., most-recently-used order from C-x b.

Actually for 'C-x b' I'd prefer to sort buffers by the order of (buffer-list),
not by the order buffers occur in the minibuffer history (that I'd like
to use for everything else).



reply via email to

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