[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53362: 29.0.50; [PATCH] Make Completions sorting a user option
From: |
Protesilaos Stavrou |
Subject: |
bug#53362: 29.0.50; [PATCH] Make Completions sorting a user option |
Date: |
Wed, 19 Jan 2022 16:09:05 +0200 |
User-agent: |
Notmuch/0.34.2 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
On 2022-01-19, 15:27 +0200, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Protesilaos Stavrou <info@protesilaos.com>
>> 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
0001-Make-Completions-sorting-a-user-option.patch
Description: Text Data
bug#53362: [External] : bug#53362: 29.0.50; [PATCH] Make Completions sorting a user option, Drew Adams, 2022/01/19