From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55016 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: two agent nits Date: Mon, 01 Dec 2003 17:46:50 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070298078 21877 80.91.224.253 (1 Dec 2003 17:01:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2003 17:01:18 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M3556@lists.math.uh.edu Mon Dec 01 18:01:15 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AQrQA-0007mQ-00 for ; Mon, 01 Dec 2003 18:01:15 +0100 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 1AQrPW-0005Q0-00; Mon, 01 Dec 2003 11:00:34 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AQrCS-0005PN-00 for ding@lists.math.uh.edu; Mon, 01 Dec 2003 10:47:04 -0600 Original-Received: from yxa.extundo.com (178.230.13.217.in-addr.dgcsystems.net [217.13.230.178]) by justine.libertine.org (Postfix) with ESMTP id F02583A0025 for ; Mon, 1 Dec 2003 10:47:00 -0600 (CST) Original-Received: from latte (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.10/8.12.10) with ESMTP id hB1Gkxrh009692 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Mon, 1 Dec 2003 17:46:59 +0100 Original-To: Kevin Greiner Mail-Copies-To: nobody X-Payment: hashcash 1.2 0:031201:kgreiner@xpediantsolutions.com:05f2278a7576a1f5 X-Hashcash: 0:031201:kgreiner@xpediantsolutions.com:05f2278a7576a1f5 X-Payment: hashcash 1.2 0:031201:ding@gnus.org:d9f06910d216986d X-Hashcash: 0:031201:ding@gnus.org:d9f06910d216986d In-Reply-To: (Kevin Greiner's message of "Mon, 01 Dec 2003 09:56:16 -0600") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55016 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55016 Kevin Greiner writes: > Simon Josefsson writes: > >> Kevin Greiner writes: >> >>> Simon Josefsson writes: >>> >>>> * I can't seem to get the agent to fetch read articles. >>>> gnus-agent-consider-all-articles's value is t >>>> The default agent category predicate is 'true'. >>>> `J s' and `J u' just download unread or ticked articles. >>> >>> Have to tried setting gnus-agent-consider-all-articles to nil? That >>> seems to work for me. >> >> I tried, but still the same. Pressing `J u' on groups just say it is >> finished, but only the unread/ticked articles are in my local cache. >> >> Hm. The manual and the docstring for the variable doesn't seem to be >> in sync. I thought the variable did what the docstring said, but the >> manual just discuss missing headers. Which one is correct? > > The variable gnus-agent-consider-all-articles appears in > gnus-agent-fetch-headers but NOT gnus-agent-fetch-articles. However, > gnus-agent-fetch-group-1 calls gnus-agent-fetch-headers to get the > list of new articles so gnus-agent-consider-all-articles may, by > modifying the return value of gnus-agent-fetch-headers, effect the > list of articles being fetched by gnus-agent-fetch-articles. Thanks for the pointers, I think I isolated the problem, from g-a-f-a: (let* ((fetch-all (and gnus-agent-consider-all-articles ;; Do not fetch all headers if the predicate ;; implies that we only consider unread articles. (not (gnus-predicate-implies-unread (gnus-agent-find-parameter group 'agent-predicate))))) Fetch-all evaluate to nil for me, causing the function to only return a list of unread articles. Since g-a-c-a-a is t, the reason fetch-al is nil is because of the second statement. (gnus-predicate-implies-unread 'true) => ignore (not (gnus-predicate-implies-unread 'true)) => nil Reading the docstring: (gnus-predicate-implies-unread PREDICATE) Say whether PREDICATE implies unread articles only. It is okay to miss some cases, but there must be no false positives. That is, if this function returns true, then indeed the predicate must return only unread articles. The 'ignore return value is not documented, and because it is non-nil it is treated as true by the caller in this case. If I apply this change, everything works, but I can't tell if it is the right thing. --- gnus-agent.el.~6.180.~ 2003-12-01 12:35:54.000000000 +0100 +++ gnus-agent.el 2003-12-01 17:39:06.000000000 +0100 @@ -2455,7 +2455,7 @@ ((not function) nil) ((functionp function) - 'ignore) + nil) ((memq (car function) '(or and not)) (apply (car function) (mapcar 'gnus-function-implies-unread-1 (cdr function)))) Now, continuing, I found that most of my groups had .agentviews looking like: ((731544 66) (731540 64 . 65) ... 2 I.e., they have large integers in them, which look like corruption. If I remove the .agentview, and then J u, it works completely. I'm removing all .agentview's and restarting Gnus, I'll see if I can reproduce getting the large integers.