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: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13411 <at> debbugs.gnu.org
Subject: bug#13411: 24.2.91; Sorting in Buffer Menu Mode
Date: Thu, 31 Jan 2013 21:41:04 -0500
>> How do I disable sorting so that it goes back to the default order of
>> buffer-list?
>
> This is a tabulated list mode issue.
> Maybe you can just (setq tabulated-list-sort-key nil); followed by g.

Nice hack!  I also noticed another hack where you can reset the buffer
list by doing M-0 M-x Bufer-menu-sort RET and then followed by g as
well.

>> Maybe it could with the M-0 argument since it's not being used.  Or
>> maybe a M-- argument since negative columns don't exist?  Although,
>> with 7 columns to remember now, maybe sorting the second to last
>> column with M-- M-2 should be available.
>
> Maybe 0 S is a good suggestion.

Agreed.  Unfortunately, tabulated-list-mode is 0-based.  So other
modes based on t-l-m might want to sort on the first column (in my
last email I pointed out at the sorting on the current buffer is
pointless).  I'd suggest making it 1-based.  This would affect Buffer
Menu

 M-x buffer-menu -- sort by display time
 M-1 M-x Buffer-menu-sort -- sort by current buffer (there is none!)
 M-2 M-x Buffer-menu-sort -- sort by read-only
 M-3 M-x Buffer-menu-sort -- sort by modification flag
 M-4 M-x Buffer-menu-sort -- sort by name
 M-5 M-x Buffer-menu-sort -- sort by size (descending)
 M-6 M-x Buffer-menu-sort -- sort by mode
 M-7 M-x Buffer-menu-sort -- sort by file name
 M-x Buffer-menu-sort -- sort by the column at point

I forgot to mention the `tabulated-list-sort' command doesn't even
understand a bare C-u argument.  Just numeric ones.  That should be
fixed as well.

I can work on a patch for all this if it sounds good.
/a




-- 
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember!  Poor computer.  -- Guy Lewis Steele Jr.




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.