(when (> (cdr cache-active) (cdr active))
(setcdr active (cdr cache-active))))))))
-(defun gnus-activate-group (group &optional scan dont-check method)
+(defun gnus-activate-group (group &optional scan dont-check method
+ dont-sub-check)
"Check whether a group has been activated or not.
If SCAN, request a scan of that group as well."
(let ((method (or method (inline (gnus-find-method-for-group group))))
(gnus-request-scan group method))
t)
(if (or debug-on-error debug-on-quit)
- (inline (gnus-request-group group dont-check method))
+ (inline (gnus-request-group group (or dont-sub-check dont-check)
+ method))
(condition-case nil
- (inline (gnus-request-group group dont-check method))
+ (inline (gnus-request-group group (or dont-sub-check dont-check)
+ method))
;;(error nil)
(quit
(message "Quit activating %s" group)
(methods-cache nil)
(type-cache nil)
(gnus-agent-article-local-times 0)
+ (archive-method (gnus-server-to-method "archive"))
infos info group active method cmethod
method-type method-group-list)
(gnus-message 6 "Checking new news...")
(unless method-group-list
(setq method-type
(cond
- ((gnus-secondary-method-p method)
+ ((or (gnus-secondary-method-p method)
+ (and (gnus-archive-server-wanted-p)
+ (gnus-methods-equal-p archive-method method)))
'secondary)
((inline (gnus-server-equal gnus-select-method method))
'primary)
'foreign)))
(push (setq method-group-list (list method method-type nil))
type-cache))
- (setcar (nthcdr 2 method-group-list)
- (cons info (nth 2 method-group-list))))
+ ;; 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)))))
;; Sort the methods based so that the primary and secondary
;; methods come first. This is done for legacy reasons to try to
infos (nth 2 (car type-cache)))
(pop type-cache)
- (when method
+ (when (and method
+ infos)
;; See if any of the groups from this method require updating.
- (when (block nil
- (dolist (info infos)
- (when (<= (gnus-info-level info)
- (if (eq method-type 'foreign)
- foreign-level
- alevel))
- (return t))))
- (gnus-read-active-for-groups method infos)
- (dolist (info infos)
- (inline (gnus-get-unread-articles-in-group
- info (gnus-active (gnus-info-group info))))))))
+ (gnus-read-active-for-groups method infos)
+ (dolist (info infos)
+ (inline (gnus-get-unread-articles-in-group
+ info (gnus-active (gnus-info-group info)))))))
(gnus-message 6 "Checking new news...done")))
(defun gnus-method-rank (type method)
(cond
+ ;; Get info for virtual groups last.
+ ((eq (car method) 'nnvirtual)
+ 200)
((eq type 'primary)
1)
;; Compute the rank of the secondary methods based on where they
(let ((i 2))
(block nil
(dolist (smethod gnus-secondary-select-methods)
- (when (equalp method smethod)
+ (when (equal method smethod)
(return i))
(incf i))
i)))
(with-current-buffer nntp-server-buffer
(cond
((gnus-check-backend-function 'retrieve-groups (car method))
+ (when (gnus-check-backend-function 'request-scan (car method))
+ (gnus-request-scan nil method))
(gnus-read-active-file-2
(mapcar (lambda (info)
(gnus-group-real-name (gnus-info-group info)))
(gnus-read-active-file-1 method nil))
(t
(dolist (info infos)
- (gnus-activate-group (gnus-info-group info) nil nil method))))))
+ (gnus-activate-group (gnus-info-group info) nil nil method t))))))
;; Create a hash table out of the newsrc alist. The `car's of the
;; alist elements are used as keys.
(provide 'gnus-start)
;;; gnus-start.el ends here
-
-