GNU bug report logs - #13411
24.2.91; Sorting in Buffer Menu Mode

Previous Next

Package: emacs;

Reported by: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>

Date: Thu, 10 Jan 2013 22:11:02 UTC

Severity: normal

Found in version 24.2.91

Fixed in version 28.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: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
Cc: 13411 <at> debbugs.gnu.org
Subject: bug#13411: 24.2.91; Sorting in Buffer Menu Mode
Date: Thu, 15 Jul 2021 17:37:43 +0200
"Aaron S. Hawley" <aaron.s.hawley <at> gmail.com> writes:

> I can live with these changes except for one:  How do I disable
> sorting so that it goes back to the default order of buffer-list?

This is a general issue with tabulated-list-mode -- there's no way to
get back to the original order after sorting.

That is, the caller will put the data in `tabulated-list-entries', and
it'll be displayed in that order.  When sorting, tabulated-list-mode
will then sort on the data in a column, and that destructively modifies
`tabulated-list-entries'.

So to get back to the original order, we can't rely on re-sorting -- we
really have to know what the original order was, which means that we
have to store that somewhere.  I've now done so in Emacs 28 (stashing it
in a hash table instead of making a copy of the list itself, in case
that has had elements removed in the meantime).

It takes up some extra memory, but it's not done until the user issues a
sorting command, so I think it should be OK.

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




This bug report was last modified 4 years and 30 days ago.

Previous Next


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