From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47447 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Regenerate .agentview files? Date: Mon, 28 Oct 2002 11:06:35 +0100 Organization: University of Dortmund, Germany Sender: owner-ding@hpc.uh.edu Message-ID: <847kg2ho7o.fsf@crybaby.uni-duisburg.de> References: <84d6pvc9b5.fsf@crybaby.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035799631 24669 80.91.224.249 (28 Oct 2002 10:07:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 28 Oct 2002 10:07:11 +0000 (UTC) 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 1866ne-0006Pl-00 for ; Mon, 28 Oct 2002 11:07:10 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1866nl-0004Wu-00; Mon, 28 Oct 2002 04:07:17 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 28 Oct 2002 04:08:02 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA07104 for ; Mon, 28 Oct 2002 04:07:43 -0600 (CST) Original-Received: (qmail 19074 invoked by alias); 28 Oct 2002 10:06:40 -0000 Original-Received: (qmail 19067 invoked from network); 28 Oct 2002 10:06:39 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 28 Oct 2002 10:06:39 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 1866q3-0002Um-00 for ; Mon, 28 Oct 2002 11:09:39 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 43 Original-NNTP-Posting-Host: crybaby.uni-duisburg.de Original-X-Trace: quimby.gnus.org 1035799779 8728 134.91.30.116 (28 Oct 2002 10:09:39 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 28 Oct 2002 10:09:39 GMT User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:nBE5u3YfFmJ3/kEJDd3GjiJ2Tqw= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47447 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47447 kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes: > I have a group which has a lot of superfluous entries in .agentview: > there are downloaded articles 30208 through 30969 (and undownloaded > articles 30970 and 30971), but .agentview contains entries (112032) > through (112897)... I've now concocted the following abomination which appears to have been effective, if not efficient. (defun kai-gnus-agent-iterate-groups (function) "Iterate over all available groups and call FUNCTION for each." (let ((methods gnus-agent-covered-methods) groups group gnus-command-method) (while methods (message "doing method %s" (car methods)) (setq gnus-command-method (car methods)) (setq groups (gnus-groups-from-server (car methods))) (gnus-agent-with-fetch (while (setq group (pop groups)) (when (<= (gnus-group-level group) gnus-agent-handle-level) (funcall function group)))) (pop methods)))) (defun kai-gnus-agent-prune-agentview (group) (message "group: %s" group) (gnus-agent-load-alist group) (let ((articles (copy-sequence gnus-agent-article-alist)) art) (while articles (setq art (pop articles)) (unless (file-exists-p (gnus-agent-article-name (format "%s" (car art)) group)) (setq gnus-agent-article-alist (delete art gnus-agent-article-alist)))) (gnus-agent-save-alist group)) (message "group: %s...done" group)) (kai-gnus-agent-iterate-groups 'kai-gnus-agent-prune-agentview) kai -- ~/.signature is: umop ap!sdn (Frank Nobis)