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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Aaron S. Hawley" <aaron.s.hawley@HIDDEN>; dated Thu, 10 Jan 2013 22:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 13411 <at> debbugs.gnu.org:


Received: (at 13411) by debbugs.gnu.org; 1 Feb 2013 02:41:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 31 21:41:54 2013
Received: from localhost ([127.0.0.1]:58314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U16Zd-0001bm-SC
	for submit <at> debbugs.gnu.org; Thu, 31 Jan 2013 21:41:54 -0500
Received: from mail-qc0-f176.google.com ([209.85.216.176]:48628)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1U16Za-0001bd-OW
	for 13411 <at> debbugs.gnu.org; Thu, 31 Jan 2013 21:41:51 -0500
Received: by mail-qc0-f176.google.com with SMTP id n41so1563694qco.35
	for <13411 <at> debbugs.gnu.org>; Thu, 31 Jan 2013 18:41:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:x-received:in-reply-to:references:date:message-id
	:subject:from:to:cc:content-type;
	bh=qAsXu/F6jvcNkegYBoRHRpEt4Jt9yvXcsp1BaXTDzhg=;
	b=RDfay0KrBktEKy1GB4NU9cuX+VFhVeVtzWyXGoU3fogm8r67jsab7gUu2zJo5eyi0P
	XIM3qmTqZdcE1mtGXk9bZx7uuGj3kI55Svm2/odBk7gBUmANVphTc3qEp7at62T545qV
	ZIUXJnVQaVUAAHu0d+53osVmbpgOGUHDww/EaUSOcIC8DX/z6DvxEBk5guQ7OvqvBpqD
	zrY1yivhFfGIJE12cTNkYR8gZ4yCKsGZP2IpENGR1XADltGxTme5TQA4UDCgoUVNRddz
	T5u4JO9zbydKOPhquXesEQAJApVL4fJzMVVAr+E43gvKRPyXtCgo9B5axN5NQgjMJWbI
	j50Q==
MIME-Version: 1.0
X-Received: by 10.49.2.35 with SMTP id 3mr12768493qer.36.1359686464634; Thu,
	31 Jan 2013 18:41:04 -0800 (PST)
Received: by 10.49.48.42 with HTTP; Thu, 31 Jan 2013 18:41:04 -0800 (PST)
In-Reply-To: <mwquuphvx.fsf@HIDDEN>
References: <CAFw1JJ6Xa_O0v-j_195KyPzrL=1r2gTTrxdwOq2mNNs+-fxevg@HIDDEN>
	<mwquuphvx.fsf@HIDDEN>
Date: Thu, 31 Jan 2013 21:41:04 -0500
Message-ID: <CAFw1JJ6ObWHMu89yxZEvbdJwvvmud=2WA5JgsQf=H=SRbDjcuA@HIDDEN>
Subject: Re: bug#13411: 24.2.91; Sorting in Buffer Menu Mode
From: "Aaron S. Hawley" <aaron.s.hawley@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 13411
Cc: 13411 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.7 (/)

>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13411; Package emacs. Full text available.

Message received at 13411 <at> debbugs.gnu.org:


Received: (at 13411) by debbugs.gnu.org; 30 Jan 2013 19:54:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 30 14:54:03 2013
Received: from localhost ([127.0.0.1]:56237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U0djO-0001RU-WE
	for submit <at> debbugs.gnu.org; Wed, 30 Jan 2013 14:54:03 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:54281)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm@HIDDEN>) id 1U0djN-0001Qz-Gw
	for 13411 <at> debbugs.gnu.org; Wed, 30 Jan 2013 14:54:01 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm@HIDDEN>)
	id 1U0dik-0000FE-Sq; Wed, 30 Jan 2013 14:53:22 -0500
From: Glenn Morris <rgm@HIDDEN>
To: "Aaron S. Hawley" <aaron.s.hawley@HIDDEN>
Subject: Re: bug#13411: 24.2.91; Sorting in Buffer Menu Mode
References: <CAFw1JJ6Xa_O0v-j_195KyPzrL=1r2gTTrxdwOq2mNNs+-fxevg@HIDDEN>
X-Spook: world domination global insurgency Freeh AIMSX credit
X-Ran: [kb{TLQa(*Mx`$&^K/2}]_~?IPqEW7s?ALY:tF;|.[xQK/^]{QUkdAvdl$B8=-sztG8uE|
X-Hue: yellow
X-Attribution: GM
Date: Wed, 30 Jan 2013 14:53:22 -0500
Message-ID: <mwquuphvx.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: 13411
Cc: 13411 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

"Aaron S. Hawley" wrote:

> 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.
There's no UI for that at present AFAICS.

If the list of items is slow to generate, it may be better to cached the
original order and restore it.

> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13411; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Jan 2013 22:10:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 10 17:10:21 2013
Received: from localhost ([127.0.0.1]:54632 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TtQKK-0006cr-VP
	for submit <at> debbugs.gnu.org; Thu, 10 Jan 2013 17:10:21 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33366)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1TtQKJ-0006cf-Ef
	for submit <at> debbugs.gnu.org; Thu, 10 Jan 2013 17:10:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1TtN3X-0003cM-N1
	for submit <at> debbugs.gnu.org; Thu, 10 Jan 2013 13:40:49 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,
	USER_IN_WHITELIST autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:36287)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1TtN3X-0003cH-Fy
	for submit <at> debbugs.gnu.org; Thu, 10 Jan 2013 13:40:47 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47204)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1TtN3V-0004Ql-4k
	for bug-gnu-emacs@HIDDEN; Thu, 10 Jan 2013 13:40:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1TtN3S-0003ZE-3u
	for bug-gnu-emacs@HIDDEN; Thu, 10 Jan 2013 13:40:45 -0500
Received: from mail-qc0-f170.google.com ([209.85.216.170]:60029)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aaron.s.hawley@HIDDEN>) id 1TtN3R-0003Yq-N4
	for bug-gnu-emacs@HIDDEN; Thu, 10 Jan 2013 13:40:41 -0500
Received: by mail-qc0-f170.google.com with SMTP id d42so589561qca.1
	for <bug-gnu-emacs@HIDDEN>; Thu, 10 Jan 2013 10:40:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=H8fT6ecf5thjYGQz5iahvADPP4MZrRkDvNDz307h8iM=;
	b=d+to2hfynnSzb3baS9qDoAYMLtT3sl/y1N9GwZWi+8torCJmb7qkCrh3WY4C2xvgSI
	Givo8j+G2jX15y9gC1zWtKY8IpXyPBdSyXvSyjS7RP/az/c1ewGmgHdy1w63miZCBJPk
	KmsUYnQrFEu6BBRrec8+8S5mHK2nM5Dm8mY7IPNJnsfogi3W2n51ljrURP8/4u/LnrBn
	evnkKu6RpkvqVMNSXhF+EyUH3TnL7lsnIKszNBG1GT3cX46IRUVhDqSszcXPCQXRTyrQ
	c0Cgc3vshFkmSqnN4Vd0XRoIiwfftzESIzypLUnqM8+GvzFqaEcU9LsrqmAt9aJjEyNb
	GQTw==
MIME-Version: 1.0
Received: by 10.49.74.73 with SMTP id r9mr66795541qev.44.1357843239900; Thu,
	10 Jan 2013 10:40:39 -0800 (PST)
Received: by 10.49.48.42 with HTTP; Thu, 10 Jan 2013 10:40:39 -0800 (PST)
Date: Thu, 10 Jan 2013 13:40:39 -0500
Message-ID: <CAFw1JJ6Xa_O0v-j_195KyPzrL=1r2gTTrxdwOq2mNNs+-fxevg@HIDDEN>
Subject: 24.2.91; Sorting in Buffer Menu Mode
From: "Aaron S. Hawley" <aaron.s.hawley@HIDDEN>
To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

The old Buffer Menu Mode would sort only on 4 columns:

 M-x buffer-menu -- sort by display time
 M-2 M-x Buffer-menu-sort -- sort by name
 M-3 M-x Buffer-menu-sort -- sort by size (ascending)
 M-4 M-x Buffer-menu-sort -- sort by mode
 M-5 M-x Buffer-menu-sort -- sort by file name
 M-x Buffer-menu-sort -- go back to sorting by display time

The new Bufer Menu Mode can sort on 7 fields:

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

Repeating any of these twice reverses the order.  If sorting by size
descending, then sorting by size again switches to ascending.

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?  The
only way to do is to kill the buffer for Buffer Menu and run C-x C-b
to reopen it.

 M-x buffer-menu -- update the list, but keep the sort
 C-x k RET M-x buffer-menu -- go back to sorting by display time

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.

Otherwise looking forward to Emacs 24.3!
aaron

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




Acknowledgement sent to "Aaron S. Hawley" <aaron.s.hawley@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#13411; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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