[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: ibuffer's "s v" doesn't redraw buffer]
From: |
Chong Yidong |
Subject: |
Re: address@hidden: ibuffer's "s v" doesn't redraw buffer] |
Date: |
Fri, 25 Aug 2006 18:31:46 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> * I started emacs with "emacs -Q"
> * I loaded ibuffer: M-x load-library<return>ibuffer<return>
> * I ran ibuffer: M-x ibuffer<return>
> * 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)