From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15466 Path: main.gmane.org!not-for-mail From: Mike McEwan Newsgroups: gmane.emacs.gnus.general Subject: Re: Garbled .overviews with 5.6.11? Date: 30 Jun 1998 01:28:56 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035154492 22214 80.91.224.250 (20 Oct 2002 22:54:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:54:52 +0000 (UTC) Return-Path: Original-Received: from gwyn.tux.org (gwyn.tux.org [207.96.122.8]) by altair.xemacs.org (8.9.0/8.9.0) with ESMTP id RAA04174 for ; Mon, 29 Jun 1998 17:34:56 -0700 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id UAA03216 for ; Mon, 29 Jun 1998 20:32:43 -0400 Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id TAT31564; Mon, 29 Jun 1998 19:06:14 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 29 Jun 1998 19:30:37 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id TAA17946 for ; Mon, 29 Jun 1998 19:30:29 -0500 (CDT) Original-Received: (qmail 23629 invoked by uid 504); 30 Jun 1998 00:30:07 -0000 Original-Received: (qmail 23626 invoked from network); 30 Jun 1998 00:30:07 -0000 Original-Received: from post-11.mail.demon.net (HELO post.mail.demon.net) (194.217.242.40) by claymore.vcinet.com with SMTP; 30 Jun 1998 00:30:06 -0000 Original-Received: from (lotusland.demon.co.uk) [158.152.62.156] by post.mail.demon.net with smtp (Exim 1.82 #2) id 0yqoJ9-0002YO-00; Tue, 30 Jun 1998 00:30:04 +0000 Original-Received: from mike by lotusland.demon.co.uk with local (Exim 1.92 #1) for ding@gnus.org id 0yqoJ9-0000Uk-00; Tue, 30 Jun 1998 01:30:03 +0100 Original-To: ding@gnus.org In-Reply-To: Lars Magne Ingebrigtsen's message of "27 Jun 1998 04:28:29 +0200" X-Mailer: Gnus v5.6.21/XEmacs 20.4 - "Emerald" Original-Lines: 114 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:15466 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:15466 Lars Magne Ingebrigtsen writes: > Yes -- all NOV lines that are older than the newest expirable > article and have no downloaded article are removed. Well my `old' NOV lines still didn't appear to be getting deleted. I think I may have discovered the problem. At least I reckon I'm getting something like the desired effect now, but, with my elisp still being a little on the simple side, I'm not entirely sure I'm tackling things in the right way. Here's the text of an earlier posting I made to the list: "I have a secondary server `(nntp "sunsite.auc.dk")' covered under the agent. However, when conducting a `gnus-agent-expire' I get: File error: "Opening output file", "No such file or directory", "/home/mike/News/agent/nntp/sunsite.auc.dk/gnu/emacs/gnus/.overview" It would appear that, having finished expiring articles for my primary select method (via which I subscribe to gnu.emacs.gnus), a variable's value is perhaps not being reset to an appropriate value. I've tried to track it down, but I can only verify that `sym' evaluates to `gnu\.emacs\.gnus' at the time of the error in `gnus-agent-expire'. I only subscribe to this group on my primary server, which, at the time of error, has already had its articles successfully expired." I think what I'm accomplishing in the patch below is to create a fresh `expiry-hashtb' when (and if) `(setq gnus-command-method (pop methods))' moves on to another select method as is the case with me. Gnus certainly doesn't barf as before when moving on to the secondary server I have covered by the Agent. A second problem, for me at least, was that the NOV lines in my .overview files were not always in sequence (not really sure why yet, apart from whatever headers are downloaded appear to simply be appended to the end of a .overview file, regardless of their article numbers). This means that `gnus-agent-expire' could not always delete "all NOV lines that are older than the newest expirable article" as it was not encountering old articles before new. Anyways, to remedy this I've stuck in a `sort-numeric-fields' before the NOV lines are expired. This is what I'm least sure about. could this be accomplished in a more efficient way? Do I indeed, want to do it? Despite the above, old NOV lines without articles were still *not* being deleted, and so, after a spell with edebug, I reckoned the the line: (if (file-exists-p (gnus-agent-article-name (number-to-string article) group)) (forward-line 1) ;; Remove old NOV lines that have no articles. (gnus-delete-line))) was never resulting in a non-existent article file. Shouldn't it perhaps be `(number-to-string art) group))'. Seems to work for me. Anyways, see what you think of the patch below. Still get one or two of those `partial' NOV lines though :-(. P.S. What's with this new paragraph fill mode - `M-q' doesn't seem to let me indent the first line of a paragraph anymore? -- Mike. --- /usr/lib/xemacs/site-lisp/gnus/lisp/gnus-agent.el.orig Mon Jun 1 03:30:14 1998 +++ /usr/lib/xemacs/site-lisp/gnus/lisp/gnus-agent.el Mon Jun 29 23:31:49 1998 @@ -1254,13 +1254,13 @@ (interactive) (let ((methods gnus-agent-covered-methods) (day (- (gnus-time-to-day (current-time)) gnus-agent-expire-days)) - (expiry-hashtb (gnus-make-hashtable 1023)) gnus-command-method sym group articles history overview file histories elem art nov-file low info unreads marked article) (save-excursion (setq overview (get-buffer-create " *expire overview*")) (while (setq gnus-command-method (pop methods)) + (let ((expiry-hashtb (gnus-make-hashtable 1023))) (gnus-agent-open-history) (set-buffer (setq gnus-agent-current-history @@ -1303,6 +1303,8 @@ (erase-buffer) (when (file-exists-p nov-file) (insert-file-contents nov-file)) + ;;; Make sure article nov lines are in sequence + (sort-numeric-fields 1 1 (buffer-size)) (goto-char (point-min)) (setq article 0) (while (setq elem (pop articles)) @@ -1319,7 +1321,7 @@ (< art article))) (if (file-exists-p (gnus-agent-article-name - (number-to-string article) group)) + (number-to-string art) group)) (forward-line 1) ;; Remove old NOV lines that have no articles. (gnus-delete-line))) @@ -1362,7 +1364,7 @@ (gnus-delete-line)) (gnus-agent-save-history) (gnus-agent-close-history)) - (gnus-message 4 "Expiry...done"))))) + (gnus-message 4 "Expiry...done")))))) ;;;###autoload (defun gnus-agent-batch ()