From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [offby1@blarg.net: ibuffer's "s v" doesn't redraw buffer] Date: Fri, 25 Aug 2006 18:31:46 -0400 Message-ID: <871wr48n1p.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156545069 9074 80.91.229.2 (25 Aug 2006 22:31:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2006 22:31:09 +0000 (UTC) Cc: John Paul Wallington , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 26 00:31:04 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGkCd-0006SV-0P for ged-emacs-devel@m.gmane.org; Sat, 26 Aug 2006 00:31:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGkCc-00035I-GL for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2006 18:31:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGkBy-0002S4-Kc for emacs-devel@gnu.org; Fri, 25 Aug 2006 18:30:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGkBv-0002Pp-PR for emacs-devel@gnu.org; Fri, 25 Aug 2006 18:30:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGkBv-0002Pd-DM for emacs-devel@gnu.org; Fri, 25 Aug 2006 18:30:19 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GGkKD-0005Yh-OP; Fri, 25 Aug 2006 18:38:53 -0400 Original-Received: by cyd (Postfix, from userid 1000) id 797944E2C2; Fri, 25 Aug 2006 18:31:46 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Fri, 25 Aug 2006 16:24:56 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58887 Archived-At: > * I started emacs with "emacs -Q" > * I loaded ibuffer: M-x load-libraryibuffer > * I ran ibuffer: M-x ibuffer > * I sorted the buffer by major mode: s m > > I note that after I type the "m", the buffer is immediately redrawn, > with the entries in their new order. > > * I sorted the buffer by recency: s v > > I note that the buffer hasn't changed. The problem was that ibuffer-do-sort-by-recency is not defined with define-ibuffer-sorter, for some reason obscure to me. Therefore it is not on ibuffer-sorting-functions-alist, so the call to ibuffer-sort-bufferlist in ibuffer-redisplay-engine fails (the error is caught by an unwind-protect). This hack will remove the bug, but I'm not familiar enough with ibuffer to know if it's the right approach. *** emacs/lisp/ibuffer.el.~1.83.~ 2006-07-24 11:48:53.000000000 -0400 --- emacs/lisp/ibuffer.el 2006-08-25 18:22:00.000000000 -0400 *************** *** 1972,1983 **** (not (eq ibuffer-buf buf)))))) ;; This function is a special case; it's not defined by ! ;; `ibuffer-define-sorter'. (defun ibuffer-do-sort-by-recency () "Sort the buffers by last view time." (interactive) (setq ibuffer-sorting-mode 'recency) ! (ibuffer-redisplay t)) (defun ibuffer-update-format () (when (null ibuffer-current-format) --- 1972,1983 ---- (not (eq ibuffer-buf buf)))))) ;; This function is a special case; it's not defined by ! ;; `define-ibuffer-sorter'. (defun ibuffer-do-sort-by-recency () "Sort the buffers by last view time." (interactive) (setq ibuffer-sorting-mode 'recency) ! (ibuffer-update nil t)) (defun ibuffer-update-format () (when (null ibuffer-current-format)