From: hmurata Date: Sat, 19 Jan 2002 16:20:31 +0000 (+0000) Subject: * wl-folder.el (wl-folder-check-one-entity): Fixed problem; X-Git-Tag: wl-2_9_6~37 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=80eb0514a723f45d04b352b663bdb8fa7895baa2;p=elisp%2Fwanderlust.git * wl-folder.el (wl-folder-check-one-entity): Fixed problem; The number of the messages of new and unread does not count correctly. * wl-summary.el (wl-summary-count-unread): Changed to return `(new . unread)' instead of total. (wl-summary-sync-update): Follow the change above. * wl-score.el (wl-summary-score-update-all-lines): Likewise. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 73b5aaf..eec592c 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,15 @@ +2002-01-19 Hiroya Murata + + * wl-folder.el (wl-folder-check-one-entity): Fixed problem; + The number of the messages of new and unread does not count + correctly. + + * wl-summary.el (wl-summary-count-unread): Changed to return + `(new . unread)' instead of total. + (wl-summary-sync-update): Follow the change above. + + * wl-score.el (wl-summary-score-update-all-lines): Likewise. + 2002-01-20 Yoichi NAKAYAMA * wl-address.el (wl-address-make-completion-list): Do not enclose diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 523f7b1..7464e65 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -815,44 +815,38 @@ Optional argument ARG is repeart count." (not (elmo-folder-exists-p folder))) (wl-folder-create-subr folder) (signal (car err) (cdr err)))))) - (new (elmo-diff-new nums)) - (nums (cons (elmo-diff-unread nums) (elmo-diff-all nums))) - unread unsync nomif) + (new (elmo-diff-new nums)) + (unread (elmo-diff-unread nums)) + (all (elmo-diff-all nums)) + unsync nomif) (if (and (eq wl-folder-notify-deleted 'sync) - (car nums) - (or (> 0 (car nums)) (> 0 (cdr nums)))) + (or (and new (> 0 new)) + (and unread (> 0 unread)) + (and all (> 0 all)))) (progn (wl-folder-sync-entity entity) - (setq nums (elmo-folder-diff folder))) + (setq nums (elmo-folder-diff folder) + new (elmo-diff-new nums) + unread (elmo-diff-unread nums) + all (elmo-diff-all nums))) (unless wl-folder-notify-deleted - (setq unsync (if (car nums) - (max 0 (car nums)) - nil)) - (setq nomif (if (cdr nums) - (max 0 (cdr nums)) - nil)) - (setq nums (cons unsync nomif))) + (setq new (and new (max 0 new)) + unread (and unread (max 0 unread)) + all (and all (max 0 all)))) (setq unread (or ;; If server diff, All unreads are ; treated as unsync. - (if (elmo-folder-use-flag-p folder) - (car nums)) + (and (elmo-folder-use-flag-p folder) + (- unread (or new 0))) (elmo-folder-get-info-unread folder) - (wl-summary-count-unread (elmo-msgdb-mark-load - (elmo-folder-msgdb-path - folder))))) - (when new (setq unread (- unread new))) + (cdr (wl-summary-count-unread + (elmo-msgdb-get-mark-alist + (elmo-folder-msgdb folder)))))) (wl-folder-entity-hashtb-set wl-folder-entity-hashtb entity - (list (or new (car nums)) - unread - (cdr nums)) + (list new unread all) (get-buffer wl-folder-buffer-name))) (setq wl-folder-info-alist-modified t) (sit-for 0) - (list (if wl-folder-notify-deleted - (or new (car nums) 0) - (max 0 (or new (car nums) 0))) - unread - (cdr nums)))) + (list new unread all))) (defun wl-folder-check-entity-async (entity &optional auto) (let ((elmo-nntp-groups-async t) diff --git a/wl/wl-score.el b/wl/wl-score.el index 1826640..b6bb3fe 100644 --- a/wl/wl-score.el +++ b/wl/wl-score.el @@ -1262,8 +1262,10 @@ Set `wl-score-cache' nil." ;; Update Folder mode (wl-folder-set-folder-updated (wl-summary-buffer-folder-name) (list 0 - (wl-summary-count-unread - mark-alist) + (let ((pair + (wl-summary-count-unread + mark-alist))) + (+ (car pair) (cdr pair))) (length num-db))) (wl-summary-update-modeline))) (message "Updating score...done") diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 74c637e..61f3039 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -562,7 +562,7 @@ (if (eq major-mode 'wl-summary-mode) (setq wl-summary-buffer-new-count new wl-summary-buffer-unread-count unread)) - (+ new unread))) + (cons new unread))) (defun wl-summary-message-string (&optional use-cache) "Return full body string of current message. @@ -2170,9 +2170,10 @@ If ARG is non-nil, checking is omitted." (wl-folder-set-folder-updated (elmo-folder-name-internal folder) (list 0 - (wl-summary-count-unread - (elmo-msgdb-get-mark-alist - (elmo-folder-msgdb folder))) + (let ((pair (wl-summary-count-unread + (elmo-msgdb-get-mark-alist + (elmo-folder-msgdb folder))))) + (+ (car pair) (cdr pair))) (elmo-folder-messages folder))) (wl-summary-update-modeline) (wl-summary-buffer-number-column-detect t)