GNU bug report logs - #37174
26.2; Stabilize tabulated-list reversed sort

Previous Next

Package: emacs;

Reported by: Johan Claesson <johanclaesson <at> bredband.net>

Date: Sat, 24 Aug 2019 14:28:02 UTC

Severity: minor

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Johan Claesson <johanclaesson <at> bredband.net>
Cc: 37174 <at> debbugs.gnu.org
Subject: bug#37174: 26.2; Stabilize tabulated-list reversed sort
Date: Sat, 21 Sep 2019 00:09:27 +0200
Johan Claesson <johanclaesson <at> 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?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.