Gnus development mailing list
 help / color / mirror / Atom feed
From: kai.grossjohann@uni-duisburg.de (Kai Großjohann)
Subject: Re: Agent gone mad?
Date: Wed, 23 Oct 2002 08:11:15 +0200	[thread overview]
Message-ID: <841y6helbw.fsf@crybaby.cs.uni-dortmund.de> (raw)
In-Reply-To: <87lm4qb470.fsf@enberg.org>

Henrik Enberg <henrik@enberg.org> writes:

> kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
>
>> Henrik Enberg <henrik@enberg.org> 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)



  reply	other threads:[~2002-10-23  6:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-19 20:55 Henrik Enberg
2002-10-19 21:01 ` Henrik Enberg
2002-10-20 16:35 ` Kai Großjohann
2002-10-21  0:12   ` Henrik Enberg
2002-10-20 19:42 ` Kai Großjohann
2002-10-21  0:15   ` Henrik Enberg
2002-10-21  6:42     ` Kai Großjohann
2002-10-21 17:42       ` Henrik Enberg
2002-10-21 19:12         ` Kai Großjohann
2002-10-21 19:32           ` Henrik Enberg
2002-10-22  5:50             ` Kai Großjohann
2002-10-22 19:10               ` Henrik Enberg
2002-10-22 20:07                 ` Kai Großjohann
2002-10-22 20:37                   ` Henrik Enberg
2002-10-23  6:11                     ` Kai Großjohann [this message]
2002-10-22  9:48   ` Simon Josefsson
2002-10-22 10:02     ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=841y6helbw.fsf@crybaby.cs.uni-dortmund.de \
    --to=kai.grossjohann@uni-duisburg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).