From 56158c870ad063a563d685d23aebca18cf61652f Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 9 Sep 2010 06:09:53 +0000 Subject: [PATCH] gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened. --- lisp/ChangeLog | 6 ++++++ lisp/gnus-start.el | 20 +++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f55d58b81..b74f4e4f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-09-09 Katsumi Yamaoka + + * gnus-start.el (gnus-get-unread-articles): Set the number of unread + articles of every unchecked group to t, which means unknown since the + server has never been opened. + 2010-09-08 Lars Magne Ingebrigtsen * gnus-html.el (gnus-html-show-alt-text): New command. diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 2af55fc7a..891777d86 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1692,7 +1692,7 @@ If SCAN, request a scan of that group as well." (gnus-agent-article-local-times 0) (archive-method (gnus-server-to-method "archive")) infos info group active method cmethod - method-type method-group-list) + method-type method-group-list entry) (gnus-message 6 "Checking new news...") (while newsrc @@ -1737,12 +1737,18 @@ If SCAN, request a scan of that group as well." (push (setq method-group-list (list method method-type nil)) type-cache)) ;; Only add groups that need updating. - (when (<= (gnus-info-level info) - (if (eq (cadr method-group-list) 'foreign) - foreign-level - alevel)) - (setcar (nthcdr 2 method-group-list) - (cons info (nth 2 method-group-list))))) + (if (<= (gnus-info-level info) + (if (eq (cadr method-group-list) 'foreign) + foreign-level + alevel)) + (setcar (nthcdr 2 method-group-list) + (cons info (nth 2 method-group-list))) + ;; The group is inactive, so we nix out the number of unread articles. + ;; It leads `(gnus-group-unread group)' to return t. See also + ;; `gnus-group-prepare-flat'. + (unless active + (when (setq entry (gnus-group-entry group)) + (setcar entry t))))) ;; Sort the methods based so that the primary and secondary ;; methods come first. This is done for legacy reasons to try to -- 2.34.1