[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small bug in wl-summary.el?



Hi,

I noticed that when opening folders WL sometimes spends a bit of time
“Re-scanning...” Looking at the code, this didn’t seem to be right. I
noticed that the function wl-summary-view-old-p sometimes returns true
when perhaps it shouldn’t.

It seems that the variable wl-summary-buffer-number-list is sometimes
set (at least in my buffers) to '(nil) (not plain old nil). (Perhaps
this is because I sometimes interrupt opening a folder with C-g.) When
the Summary buffer is empty and the value of
wl-summary-buffer-number-list is '(nil), wl-summary-view-old-p will
return t, necessitating a rescan when opening a buffer. Here is a
modified version of wl-summary-view-old-p which checks for this
situation.

Am I wrong to make this change? Any thoughts? Thank you!

best, Erik

  (defun wl-summary-view-old-p ()
    "Return non-nil when summary view cache has old format."
    (if (equal wl-summary-buffer-number-list '(nil))
        (setq wl-summary-buffer-number-list nil))
    (save-excursion
      (goto-char (point-min))
      (and wl-summary-buffer-number-list
  	 (not (re-search-forward "\r-?[0-9]+" (point-at-eol) t)))))

Attachment: pgpqth9qZ0Afy.pgp
Description: PGP signature