[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37174: 26.2; Stabilize tabulated-list reversed sort
From: |
Johan Claesson |
Subject: |
bug#37174: 26.2; Stabilize tabulated-list reversed sort |
Date: |
Sun, 22 Sep 2019 11:26:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Hi Lars,
I am willing to sign myself but the company i work for also need to sign
and the last time i asked they refused. If this will become a problem
in the future i might ask them again.
Regards,
/Johan
On Sat, Sep 21 2019, Lars Ingebrigtsen wrote:
> Johan Claesson <johanclaesson@bredband.net> writes:
>
>> Sorting with S multiple times in a tabulated-list buffer should be
>> stable but will sometimes reorder entries with the same value. When the
>> sort order is reversed the function tabulated-list--get-sorter will
>> transform the sort function to sort the other way around by negating. I
>> think this is what cause the needless reordering and that it should be
>> changed something like the following:
>
> [...]
>
>> (if (cdr tabulated-list-sort-key)
>> - (lambda (a b) (not (funcall sorter a b)))
>> + (lambda (a b) (funcall sorter b a))
>
> That looks like the correct solution, so I've applied it to the trunk.
>
> If I read the logs correctly, I think that cumulatively you've now had
> the number of lines committed to Emacs that's allowed without signing
> copyright assignment papers. For future patches, would you be willing
> to sign such paperwork?