From: Katsumi Yamaoka Date: Mon, 15 Nov 2004 05:31:51 +0000 (+0000) Subject: * nntp.el (nntp-request-update-info): Return nil if nntp-marks-is-evil is true X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=83537dc91ed2f0ea7186fd95b92b9f458565c4ae;hp=7504d3b6645a763f68da03ff1ef9251d26ce7d3f;p=gnus * nntp.el (nntp-request-update-info): Return nil if nntp-marks-is-evil is true so that gnus-get-unread-articles-in-group may not call gnus-activate-group which uselessly issues the GROUP commands for all nntp groups and wastes time. Reported by Romain Francoise. * gnus-start.el (gnus-get-unread-articles): Remove redundant test. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2285eb6d1..49241a9e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2004-11-15 Katsumi Yamaoka + + * nntp.el (nntp-request-update-info): Return nil if + nntp-marks-is-evil is true so that gnus-get-unread-articles-in-group + may not call gnus-activate-group which uselessly issues the GROUP + commands for all nntp groups and wastes time. Reported by Romain + Francoise . + + * gnus-start.el (gnus-get-unread-articles): Remove redundant test. + 2004-11-15 Simon Josefsson * gnus-art.el (gnus-header-button-alist): Handle URLs in OpenPGP: diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 7edace251..c158c7be3 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1688,8 +1688,7 @@ If SCAN, request a scan of that group as well." (cond ((and method (eq method-type 'foreign)) ;; These groups are foreign. Check the level. (if (<= (gnus-info-level info) foreign-level) - (when (and (<= (gnus-info-level info) foreign-level) - (setq active (gnus-activate-group group 'scan))) + (when (setq active (gnus-activate-group group 'scan)) ;; Let the Gnus agent save the active file. (when (and gnus-agent active (gnus-online method)) (gnus-agent-save-group-info diff --git a/lisp/nntp.el b/lisp/nntp.el index e3d240a82..7646676f2 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -1052,29 +1052,29 @@ command whose response triggered the error." (deffoo nntp-request-update-info (group info &optional server) (unless nntp-marks-is-evil - (nntp-possibly-create-directory group server)) - (when (and (not nntp-marks-is-evil) (nntp-marks-changed-p group server)) - (nnheader-message 8 "Updating marks for %s..." group) - (nntp-open-marks group server) - ;; Update info using `nntp-marks'. - (mapc (lambda (pred) - (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nntp-marks)) - (gnus-info-marks info)) - t))) - gnus-article-mark-lists) - (let ((seen (cdr (assq 'read nntp-marks)))) - (gnus-info-set-read info - (if (and (integerp (car seen)) - (null (cdr seen))) - (list (cons (car seen) (car seen))) - seen))) - (nnheader-message 8 "Updating marks for %s...done" group)) - info) + (nntp-possibly-create-directory group server) + (when (nntp-marks-changed-p group server) + (nnheader-message 8 "Updating marks for %s..." group) + (nntp-open-marks group server) + ;; Update info using `nntp-marks'. + (mapc (lambda (pred) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nntp-marks)) + (gnus-info-marks info)) + t))) + gnus-article-mark-lists) + (let ((seen (cdr (assq 'read nntp-marks)))) + (gnus-info-set-read info + (if (and (integerp (car seen)) + (null (cdr seen))) + (list (cons (car seen) (car seen))) + seen))) + (nnheader-message 8 "Updating marks for %s...done" group)) + info))