From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47367 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: Agent gone mad? Date: Wed, 23 Oct 2002 08:11:15 +0200 Organization: University of Dortmund, Germany Sender: owner-ding@hpc.uh.edu Message-ID: <841y6helbw.fsf@crybaby.cs.uni-dortmund.de> References: <874rbicfno.fsf@enberg.org> <847kgcrj6z.fsf@crybaby.cs.uni-dortmund.de> <878z0slk92.fsf@enberg.org> <84bs5os371.fsf@crybaby.cs.uni-dortmund.de> <87u1jfadtb.fsf@enberg.org> <84r8ej7gij.fsf@crybaby.cs.uni-dortmund.de> <87elaj7fko.fsf@enberg.org> <84znt7vx85.fsf@crybaby.cs.uni-dortmund.de> <87k7kanvb8.fsf@enberg.org> <847kgautjo.fsf@crybaby.cs.uni-dortmund.de> <87lm4qb470.fsf@enberg.org> 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 1035359431 16723 80.91.224.249 (23 Oct 2002 07:50:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 07:50:31 +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 184GHc-0004LG-00 for ; Wed, 23 Oct 2002 09:50:28 +0200 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 184GFN-0006Qu-00; Wed, 23 Oct 2002 02:48:09 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 23 Oct 2002 02:48:54 -0500 (CDT) 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 CAA23580 for ; Wed, 23 Oct 2002 02:48:39 -0500 (CDT) Original-Received: (qmail 12941 invoked by alias); 23 Oct 2002 07:47:37 -0000 Original-Received: (qmail 12935 invoked from network); 23 Oct 2002 07:47:35 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 23 Oct 2002 07:47:35 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 184GFP-0008IG-00 for ; Wed, 23 Oct 2002 09:48:11 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 83 Original-NNTP-Posting-Host: crybaby.uni-duisburg.de Original-X-Trace: quimby.gnus.org 1035359291 31860 134.91.30.116 (23 Oct 2002 07:48:11 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 23 Oct 2002 07:48:11 GMT User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:uYsPy3BzTC4vA2ANxyD1fJEHeME= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47367 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47367 Henrik Enberg writes: > kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes: > >> Henrik Enberg writes: >> >>> Running the below function to mimic the behaviour in the above code, I >>> always get "high" as 1 less than "low", so the when clause will never >>> be executed. >>> >>> (defun high/low () >>> (interactive) >>> (let ((low (1+ (caar (last gnus-agent-article-alist)))) >>> (high (cdr (gnus-active gnus-newsgroup-name)))) >>> (message "high = %s, low = %s" high low))) >> >> Gah? > > Hmm, what do you get? > > [...] I didn't try the function, but I also got low = high + 1 when I used the debugger. The "gah" meant that I don't know why the original code works for you. It should fail! >> Okay, so to summarize: when you remove the when condition, Gnus is >> quick again. >> >> But that's because it retrieves no articles, because >> gnus-list-range-intersection returns nil. >> >> So I'm not sure it's a good idea to remove the condition. > > No, Gnus _does_ retrive articles when I remove the condition. It even > works as I think you intended it. Old style behaviour when > gnus-agent-consider-all-articles is nil, and all articles when it is t. Strange. >> But I don't believe you were happy with the previous agent behavior >> if it never retrieved any articles. So how about you go back to the >> gnus-agent version before my messing around with it and see if that >> retrieves any articles at all, and also examine the situation in the >> code we're talking about. > > Ok, I tried to check out the version from the 17th. It works just like > it always has, retrieving only new articles and headers. > >> Maybe I did something wrong when changing the code. > > It just might me my Gnus that is screwed up, but I tried to subscribe > to a new group I've never subscribed to before. And it gave me the > same behaviour as all my other groups. Okay, now we need to verify: Usually, low is greater than high. You verified this already, check. When this happens, gnus-list-range-intersection returns nil. Right? So then `articles' will be nil. Right? So Gnus only fetches articles which are explicitly marked for download. Right? Since we have now reached a contradiction, one of the checks above must fail. But which one? > A final note. I may have to turn in my geek badge, but I can't work > out how to edebug a Gnus function. Say I instrument > gnus-agent-retrieve-headers, how do I step through it? With point inside the function, hit M-x edebug-defun RET. Then you should either arrange for the buffer to be well visible in a frame, or you should bury the buffer (then edebug will display it in the current frame). Then you just do something that invokes the function. Then you can use SPC to step through it and e to eval Lisp expressions (and the menu). kai -- ~/.signature is: umop ap!sdn (Frank Nobis)