*** /usr/share/emacs/site-lisp/gnus/lisp/gnus-sum.el 2003-06-07 19:40:22.000000000 +0200 --- ./gnus-sum.el 2003-06-09 16:44:28.000000000 +0200 *************** *** 1092,1097 **** --- 1092,1106 ---- :type 'boolean :group 'gnus-article-mime) + (defcustom gnus-count-articles-in-groups nil + "*Regexp to match groups whose article count should be determined + accurately upon entering the group. Non-matching groups are conventionally + looked up in the active info. + + If t, matches all groups, if nil, matches none." + :type '(choice regexp (const t) (const nil)) + :group 'gnus-summary) + ;;; Internal variables (defvar gnus-summary-display-cache nil) *************** *** 5226,5231 **** --- 5235,5261 ---- (memq article gnus-newsgroup-recent)) (t t)))) + (defun gnus-get-group-articles (group) + "Return a list of group articles if `gnus-count-articles-in-groups' + matches GROUP as a regexp. Otherwise return nil." + (when (and gnus-count-articles-in-groups + (or (eq gnus-count-articles-in-groups t) + (string-match gnus-count-articles-in-groups group))) + (let ((article-list)) + (save-excursion + (gnus-request-group-articles group) + (set-buffer nntp-server-buffer) + (goto-char (point-max)) + (forward-line -2) ; skip "." + (while (not (looking-at "^211 Article list follows$")) + (setq article-list + (cons (string-to-number (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))) + article-list)) + (forward-line -1))) + article-list))) + (defun gnus-articles-to-read (group &optional read-all) "Find out what articles the user wants to read." (let* ((display (gnus-group-find-parameter group 'display)) *************** *** 5242,5247 **** --- 5272,5278 ---- ;; articles in the group, or (if that's nil), the ;; articles in the cache. (or + (gnus-get-group-articles group) (gnus-uncompress-range (gnus-active group)) (gnus-cache-articles-in-group group)) ;; Select only the "normal" subset of articles. *** /usr/share/emacs/site-lisp/gnus/lisp/nnml.el 2003-05-01 16:23:15.000000000 +0200 --- ./nnml.el 2003-06-09 16:10:57.000000000 +0200 *************** *** 1007,1012 **** --- 1007,1029 ---- (nnml-save-marks group server) (nnheader-message 7 "Bootstrapping marks for %s...done" group))))) + (deffoo nnml-request-group-articles (group &optional server) + "Return the list of existing articles in GROUP." + (let ((article-list (sort (nnheader-directory-articles + (nnheader-group-pathname + (gnus-group-real-name group) + nnml-directory)) + '<))) + (condition-case () + (save-excursion + (set-buffer nntp-server-buffer) + (erase-buffer) + (insert "211 Article list follows\n") + (mapcar '(lambda (x) (insert (number-to-string x) "\n")) article-list) + (insert ".\n") + t) + (error nil)))) + (provide 'nnml) ;;; nnml.el ends here