From 9faa3a430df504cf4e090821710b6638d87758c0 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 27 Dec 2023 08:20:08 +0100 Subject: [PATCH] ; Document 'completions-sort' value 'historical' in the manual --- doc/emacs/mini.texi | 9 ++++++--- etc/NEWS | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 49983a411cf..f51682e86f6 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -825,9 +825,12 @@ will use just one column. The @code{completions-sort} user option controls the order in which the completions are sorted in the @samp{*Completions*} buffer. The default is @code{alphabetical}, which sorts in alphabetical order. -The value @code{nil} disables sorting. The value can also be a -function, which will be called with the list of completions, and -should return the list in the desired order. +The value @code{historical} sorts completion candidates according to +their position in the minibuffer history, so candidates that you used +recently appear first in the completions list. The value @code{nil} +disables sorting altogether. The value can also be a function, which +will be called with the list of completions, and should return the +list in the desired order. @vindex completions-max-height When @code{completions-max-height} is non-@code{nil}, it limits the diff --git a/etc/NEWS b/etc/NEWS index afc59520dd4..c67628caa0e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -711,11 +711,13 @@ the minibuffer contents instead. This deselection behavior can be controlled with the new user option 'completion-auto-deselect', which is t by default. ++++ *** New value 'historical' for user option 'completions-sort'. When 'completions-sort' is set to 'historical', completion candidates will be first sorted alphabetically, and then re-sorted by their order in the minibuffer history, with more recent candidates appearing first. ++++ *** New commands for narrowing (restricting) minibuffer completions list. You can now use 'C-x n n' ('minibuffer-narrow-completions-to-current') in the minibuffer to restrict the list of possible completions to only -- 2.39.5