unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Clemens <clemens.radermacher@posteo.de>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, Juri Linkov <juri@linkov.net>,
	emacs-devel@gnu.org
Subject: Re: Sorting command completions by recency
Date: Wed, 17 Feb 2021 15:58:33 -0500	[thread overview]
Message-ID: <jwvo8gie7mg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9720b886-39aa-9a52-8c74-144fc7600175@posteo.de> (Clemens's message of "Wed, 17 Feb 2021 21:03:57 +0100")

>>>> This code puts the recent commands at the top as well,
>>>> but probably it needs to be opt-in:
>>> Makes sense to me, and, yes.
>> FWIW, the minibuffer.el code already uses this kind of sorting for the
>> list of completions used in things like `icomplete` and
>> `completion-cycle-threshold`.
>> For *Completions* the sort was kept alphabetical so far because that's
>> also useful (for example in the case of M-x completion, it makes it
>> easier to skip over blocs of commands sharing the same prefix).
>> So, while I think it can be useful to sort by some kind of "guessed
>> usefulness" such as presence in the history, I don't think this should
>> be forced by the completion table of commands.
> Maybe it would make sense to have a general option to configure this history
> sorting. When the table doesn't specify its own sorting one could opt in to
> always sort base on history.

Agreed.
It'd make sense to have it as a global option, like
`completion-cycle-threshold` and it would also make sense to be able to
override it individually via `completion-category-overrides` (which is
also the case for the cycling behavior).


        Stefan




  reply	other threads:[~2021-02-17 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 17:53 Sorting command completions by recency Juri Linkov
2021-02-17 18:33 ` Lars Ingebrigtsen
2021-02-17 19:55   ` Stefan Monnier
2021-02-17 20:03     ` Clemens
2021-02-17 20:58       ` Stefan Monnier [this message]
2021-02-18 17:34         ` Juri Linkov
2021-02-17 20:09     ` Juri Linkov
2021-02-17 22:02       ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvo8gie7mg.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=clemens.radermacher@posteo.de \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).