From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John Paul Wallington" Newsgroups: gmane.emacs.devel Subject: Re: [offby1@blarg.net: ibuffer's "s v" doesn't redraw buffer] Date: Sat, 26 Aug 2006 14:13:20 +0100 Message-ID: References: <871wr48n1p.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156598113 20126 80.91.229.2 (26 Aug 2006 13:15:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 26 Aug 2006 13:15:13 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 26 15:15:09 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 1GGy0B-0006K1-Us for ged-emacs-devel@m.gmane.org; Sat, 26 Aug 2006 15:15:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGy0A-00081X-L6 for ged-emacs-devel@m.gmane.org; Sat, 26 Aug 2006 09:15:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGxzu-0007ve-QQ for emacs-devel@gnu.org; Sat, 26 Aug 2006 09:14:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGxzr-0007mU-Ma for emacs-devel@gnu.org; Sat, 26 Aug 2006 09:14:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGxzr-0007lj-FU for emacs-devel@gnu.org; Sat, 26 Aug 2006 09:14:47 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GGy8M-0000kK-Oc for emacs-devel@gnu.org; Sat, 26 Aug 2006 09:23:34 -0400 Original-Received: from [66.249.92.168] (helo=ug-out-1314.google.com) by mx20.gnu.org with esmtp (Exim 4.52) id 1GGxzR-00070l-Kr for emacs-devel@gnu.org; Sat, 26 Aug 2006 09:14:21 -0400 Original-Received: by ug-out-1314.google.com with SMTP id u2so1222586uge for ; Sat, 26 Aug 2006 06:13:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Ll+dQVOHA+BPcvd+bkHz2uOix0XbmYW0qxXz8XBTONQ89M8X8U/31JlHOXuGa94r9QZs9v2DMghigW3heTIRUW0XHeoWY47ObKJMK5QGzAGblgCXI+yjhiIQZogSWP0FkR6Oxm0x3MrvL4aGsy2a9lUYjh7+5fJu7rBx7GmyMMk= Original-Received: by 10.66.221.19 with SMTP id t19mr2502449ugg; Sat, 26 Aug 2006 06:13:20 -0700 (PDT) Original-Received: by 10.66.236.7 with HTTP; Sat, 26 Aug 2006 06:13:20 -0700 (PDT) Original-To: "Chong Yidong" In-Reply-To: <871wr48n1p.fsf@stupidchicken.com> Content-Disposition: inline X-Google-Sender-Auth: dba891a16c6bac09 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:58916 Archived-At: On 8/25/06, Chong Yidong wrote: > > * 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) That change looks good, although I haven't tested it. Could you please install it?