From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53053 Path: main.gmane.org!not-for-mail From: Hanak David Newsgroups: gmane.emacs.gnus.general Subject: emacs.gnus Date: Sun, 08 Jun 2003 15:04:33 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1055095713 24363 80.91.224.249 (8 Jun 2003 18:08:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2003 18:08:33 +0000 (UTC) Original-X-From: ding-owner+M1598@lists.math.uh.edu Sun Jun 08 20:08:31 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19P4al-0006KZ-00 for ; Sun, 08 Jun 2003 20:08:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19P4cd-00021a-00; Sun, 08 Jun 2003 13:10:27 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19Ozqp-00014x-00 for ding@lists.math.uh.edu; Sun, 08 Jun 2003 08:04:47 -0500 Original-Received: (qmail 58441 invoked by alias); 8 Jun 2003 13:04:47 -0000 Original-Received: (qmail 58436 invoked from network); 8 Jun 2003 13:04:47 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by sclp3.sclp.com with SMTP; 8 Jun 2003 13:04:47 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 19P07u-0007ov-00 for ; Sun, 08 Jun 2003 15:22:26 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 116 Original-NNTP-Posting-Host: 62-77-248-31.vnet.hu Original-X-Trace: quimby.gnus.org 1055078546 30064 62.77.248.31 (8 Jun 2003 13:22:26 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 8 Jun 2003 13:22:26 GMT User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:2m51Nx6xMBqrYDrDRTw2gDM3jIg= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53053 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53053 --=-=-= Content-Transfer-Encoding: quoted-printable Greetings, I find it annoying that Gnus cannot determine the exact article count for nnml groups. Since I often move messages from one group to another, or expire articles, the active range is full of holes. Therefore, when I ask Gnus for, say, 50 articles, it might happen that I only get 5. And the estimate for the number of artciles can also become very wild. I've hacked this for myself quite a while ago, but very recently I've joined the Gnus newsgroups, and decided to send a patch that would solve the problem for others, too. The patches are up to date, they are based on the CVS version. Please feel free to modify them. I modified two files, gnus-sum.el and nnml.el. The patches follow. David ---------- cut here ---------- *** /usr/share/emacs/site-lisp/gnus/lisp/gnus-sum.el 2003-06-07 19:40:22.00= 0000000 +0200 --- ./gnus-sum.el 2003-06-08 14:35:43.000000000 +0200 *************** *** 5226,5231 **** --- 5226,5241 ---- (memq article gnus-newsgroup-recent)) (t t)))) =20=20 + (defun gnus-group-article-list (group) + "Return a list of all article numbers in GROUP. If + -group-article-list exists and returns non-nil, returns that valu= e, + otherwise returns the range stored in the active info." + (let* ((method (symbol-name (car (gnus-find-method-for-group group)))) + (listf (intern (concat method "-group-article-list")))) + (or (and (functionp listf) + (funcall listf group)) + (gnus-uncompress-range (gnus-active group))))) +=20 (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,5248 **** ;; articles in the group, or (if that's nil), the ;; articles in the cache. (or ! (gnus-uncompress-range (gnus-active group)) (gnus-cache-articles-in-group group)) ;; Select only the "normal" subset of articles. (gnus-sorted-nunion --- 5252,5258 ---- ;; articles in the group, or (if that's nil), the ;; articles in the cache. (or ! (gnus-group-article-list group) (gnus-cache-articles-in-group group)) ;; Select only the "normal" subset of articles. (gnus-sorted-nunion *** /usr/share/emacs/site-lisp/gnus/lisp/nnml.el 2003-05-01 16:23:15.000000= 000 +0200 --- ./nnml.el 2003-06-08 14:32:27.000000000 +0200 *************** *** 84,89 **** --- 84,96 ---- (defvoo nnml-use-compressed-files nil "If non-nil, allow using compressed message files.") =20=20 + (defvoo nnml-ignore-active-file nil + "If non-nil or matches the group name as a regexp, the active file is + ignored. This causes nnml to do some extra work in order to determine the + true active ranges of a group. Note that the active file is still saved, + but its values are not used. This costs some extra time when scanning a + group when opening it.") +=20 =0C =20=20 (defconst nnml-version "nnml 1.0" *************** *** 1007,1012 **** --- 1014,1031 ---- (nnml-save-marks group server) (nnheader-message 7 "Bootstrapping marks for %s...done" group))))) =20=20 + (deffoo nnml-group-article-list (group) + "Return a list of all article numbers in group if + `nnml-ignore-active-file' is t or matches the group name as a regexp, + otherwise return nil. Called from `gnus-group-article-list'." + (if (or (eq nnml-ignore-active-file t) + (and (stringp nnml-ignore-active-file) + (string-match nnml-ignore-active-file group))) + (sort (nnheader-directory-articles + (nnheader-group-pathname (gnus-group-real-name group) + nnml-directory)) + '<))) +=20 (provide 'nnml) =20=20 ;;; nnml.el ends here --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA+4zRqy9xilSZrxF8RAh8zAKDMkLGr7jONggLyN7KPC5CRKRR9vACgue2v qmb38q7BRTpOCPjxyOswhfc= =IBNv -----END PGP SIGNATURE----- --=-=-=--