On 2022-01-19, 15:27 +0200, Eli Zaretskii wrote: >> From: Protesilaos Stavrou >> Cc: 53362@debbugs.gnu.org >> Date: Wed, 19 Jan 2022 15:17:13 +0200 >> >> >> +(defcustom completions-sort 'lexicographic >> >> + "Sort candidates in the *Completions* buffer. >> >> + >> >> +The value can be nil to disable sorting altogether, >> >> +`alphabetical' for alphabetical sorting, `lexicographic' for >> >> +lexicographic sorting >> > >> > Here you expect everyone to understand the subtle difference between >> > these two sorting orders. I don't think this expectation is >> > reasonable. >> >> Perhaps it is better to reference string-lessp and string-version-lessp >> directly? > > That'd be a step backward, IMO. > >> > Doesn't string-version-lessp do stuff that is only appropriate with >> > version numbers like 1.2.3beta? >> >> It also helps when the string starts with a number: >> >> (sort '("1 test" "21 test" "11 test" "2 test") #'string-lessp) >> ;; => ("1 test" "11 test" "2 test" "21 test") > > Yes, and how does that match the "alphabetical order" description? In the revised patch (see attached), I follow the example of completions-group-sort. -- Protesilaos Stavrou https://protesilaos.com