From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#1432: marked as done (Sorting buffers with ibuffer) Date: Thu, 4 Dec 2008 16:10:05 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1228435805-13321-0" X-Trace: ger.gmane.org 1228435835 14038 80.91.229.12 (5 Dec 2008 00:10:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2008 00:10:35 +0000 (UTC) To: "Juanma Barranquero" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 05 01:11:37 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L8OIC-0000x9-Q4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Dec 2008 01:11:37 +0100 Original-Received: from localhost ([127.0.0.1]:42405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8OH2-0007ns-3h for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Dec 2008 19:10:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8OGx-0007kp-2w for bug-gnu-emacs@gnu.org; Thu, 04 Dec 2008 19:10:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8OGv-0007jD-Sy for bug-gnu-emacs@gnu.org; Thu, 04 Dec 2008 19:10:18 -0500 Original-Received: from [199.232.76.173] (port=46964 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8OGv-0007iv-DE for bug-gnu-emacs@gnu.org; Thu, 04 Dec 2008 19:10:17 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42140) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L8OGu-0003v8-P8 for bug-gnu-emacs@gnu.org; Thu, 04 Dec 2008 19:10:17 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB50ADAo014093; Thu, 4 Dec 2008 16:10:13 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mB50A5fQ013427; Thu, 4 Dec 2008 16:10:05 -0800 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 1432 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22962 Archived-At: This is a multi-part message in MIME format... ------------=_1228435805-13321-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Fri, 5 Dec 2008 01:03:07 +0100 with message-id and subject line=20 has caused the Emacs bug report #1432, regarding Sorting buffers with ibuffer to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 1432: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D1432 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1228435805-13321-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,GMAIL, HAS_PACKAGE,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at quiet) by emacsbugs.donarmstrong.com; 26 Nov 2008 10:28:43 +0000 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAQASeTN017137 for ; Wed, 26 Nov 2008 02:28:41 -0800 Received: by yx-out-2324.google.com with SMTP id 8so196251yxg.31 for ; Wed, 26 Nov 2008 02:28:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=wojRoekgpgq6PX7x43C0Is9Piyj9Viu3reGEWFMlOWo=; b=UzADARILz8LN2c+JB5RHAT4NZuH9x5mrJCWRp9rIqnuKiKVG8ixQrOQ+rV1asQKIUH 4i6ck5MTDm1zxostxTQbQdxAF6sGV3RnTEf4JEBVfyfVtq+neNcVw3FOOgrh5qllixmJ 9i+6Mj8oG3AG5fGiD0hgzbw+ZfZH53zciZmT4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=tWOjE7hSzZhBYmKBot/dk6cqMkTYh9v0meESNZqFUj30Xh9xeGa2S99rsFJd5dJemE hwrjYdzRYS2m+6CEScj5ejDPvYjmGMBcmR1JDprBYrlX8E5RPpKGGE/tDgeGq74zSaJB 2irA+HtdBd78z8pCrWTBw+OORAdzMOpxUgr8c= Received: by 10.100.216.12 with SMTP id o12mr2926483ang.92.1227695319614; Wed, 26 Nov 2008 02:28:39 -0800 (PST) Received: by 10.100.13.13 with HTTP; Wed, 26 Nov 2008 02:28:39 -0800 (PST) Message-ID: Date: Wed, 26 Nov 2008 11:28:39 +0100 From: "Juanma Barranquero" To: z0d Subject: Re: Sorting buffers with ibuffer Cc: help-gnu-emacs@gnu.org, quiet@emacsbugs.donarmstrong.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <868f7753-ea47-4f70-9152-ae1a4ee62a6a@r40g2000yqj.googlegroups.com> <80823b7e-19ca-4522-a20a-de9db9cbc3c8@j38g2000yqa.googlegroups.com> Package: emacs Severity: minor X-Debbugs-CC: jpw@gnu.org On Wed, Nov 26, 2008 at 04:29, z0d wrote: > shell: emacs -q .emacs .ssh/config .Emacs-lisp/init-lisp.el > > M-: (setq-default ibuffer-default-sorting-mode 'major-mode) > M-x ibuffer > > produces: > > MR Name Size Mode Filename/Process > -- ---- ---- ---- ---------------- > [ Default ] > asdf-skeleton.el 1052 Emacs-Lisp ~/.Emacs-Lisp/asdf- > skeleton.el > config 488 Conf[Space] ~/.ssh/config > .emacs 13170 Emacs-Lisp ~/.emacs > *scratch* 191 Lisp Interaction > * *Messages* 142 Fundamental > % *GNU Emacs* 744 Fundamental > > 6 buffers 15787 3 files, no > processes You're right. What's happening is that, in fact, ibuffer is not sorting at all, because there's a variable ibuffer-sorting-functions-alist that is null at that point. That variable is initialized by code in ibuf-ext.el; defaulting to 'recency works because that sorting order is special-cased in ibuffer.el. You can workaround the issue by making sure ibuf-ext is loaded, for example: emacs -q -l ibuf-ext .emacs .ssh/config .Emacs-lisp/init-lisp.el but I think ibuffer should take care that the sorting functions' alist is properly stuffed. John, I've considered the attached patch, which checks in ibuffer-sort-bufferlist. The alternative I see is to require 'ibuf-ext in `ibuffer-mode' if the user modified `ibuffer-default-sorting-mode', like (set (make-local-variable 'ibuffer-sorting-mode) ibuffer-default-sorting-mode) (unless (eq ibuffer-sorting-mode 'recency) (require 'ibuf-ext)) Are you OK with one of these changes? Juanma Index: lisp/ibuffer.el =================================================================== RCS file: /sources/emacs/emacs/lisp/ibuffer.el,v retrieving revision 1.110 diff -u -2 -r1.110 ibuffer.el --- lisp/ibuffer.el 8 Oct 2008 05:02:09 -0000 1.110 +++ lisp/ibuffer.el 26 Nov 2008 09:56:30 -0000 @@ -2192,4 +2192,6 @@ (defun ibuffer-sort-bufferlist (bmarklist) + (unless ibuffer-sorting-functions-alist + (require 'ibuf-ext)) (let* ((sortdat (assq ibuffer-sorting-mode ibuffer-sorting-functions-alist)) ------------=_1228435805-13321-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-2.0 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,TVD_SPACE_RATIO autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1432-done) by emacsbugs.donarmstrong.com; 5 Dec 2008 00:03:11 +0000 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB5037Gx011188 for <1432-done@emacsbugs.donarmstrong.com>; Thu, 4 Dec 2008 16:03:09 -0800 Received: by yx-out-2324.google.com with SMTP id 8so1903159yxg.31 for <1432-done@emacsbugs.donarmstrong.com>; Thu, 04 Dec 2008 16:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=0w3gKgfqKPi8QafkKGICBhGvdmhTwVrH+J4gviJaM58=; b=M1YK/AxzUi9GUepNRaSoBboEOeOWdjamth0Q6qU+c2fChoHFhQlMQ0IFp8nOU6d0lx cBhzm2Ntc/+P9bcSrRsy5wQSBSXkpilGGDlr84QJW3qxfYIfkjc3u5oh3p7hYwfo0WH2 8YQF17ZMnj5Hs56tU852Ha3T2O/mL7wcJz68U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=wUrIJtsj2kyO1pQ4M+MttoT/yu45VgfQUI1o+ddp5dD1GvGo+YMYXpgBmtoZT1re7E iDV+tLIXv7LSDvD/szt+540RcFk4lRiHIz+vet4nSL34ADPuXK0D3SyrxH8rm9GYg2eK P3PuWvgBncMm+JUtaEQbv4ZIzs/BwQPAkCX6M= Received: by 10.90.94.3 with SMTP id r3mr8365399agb.54.1228435387316; Thu, 04 Dec 2008 16:03:07 -0800 (PST) Received: by 10.100.13.13 with HTTP; Thu, 4 Dec 2008 16:03:07 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2008 01:03:07 +0100 From: "Juanma Barranquero" To: 1432-done@emacsbugs.donarmstrong.com Subject: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Fixed. http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ibuffer.el?cvsroot=emacs&r1=1.110&r2=1.111 ------------=_1228435805-13321-0--