Discussion:
How to stop Agent from fetching headers of uninteresting Groups?
N. Jackson
2017-11-14 15:58:39 UTC
Permalink
I use the Agent for reading news offline (because I don't have an
Internet connection for many hours of the day). I only read a
handful of news groups offline, but the Agent downloads the
headers for every single group on my agentised servers. This takes
about fifteen or twenty minutes every time I do `J s' because I
have very many groups on those servers (most of which I only read
about once a year). Downloading the actual news for the groups I'm
interested in reading offline only takes about a minute, so it
seems insane to download all these headers that I don't want.

How can I tell the Agent to not download even the headers for a
group?

Currently I have one Agent category for each of my agentised
groups. That is the "default" category and it is set to 0 (by the
Agent when it first set itself up). For the groups I want to read
offline I have group parameters that tell the Agent to retrieve
all messages (I have a `true' predicate).

It seems I need an Agent predicate that is more strongly negative
than `false', something like `not-even-headers'.

I suppose I might be asking the wrong question, since the Agent
predicates are to tell the Agent which articles to get, it must
have already retrieved the unwanted headers before it even starts
applying the predicates. So I need a way of telling the Agent at a
higher level not to even get the headers. But I don't see anything
useful in the documentation.

What am I missing?

Thanks.

Regards,
N.
Eric Abrahamsen
2017-11-30 21:57:49 UTC
Permalink
Post by N. Jackson
I use the Agent for reading news offline (because I don't have an
Internet connection for many hours of the day). I only read a
handful of news groups offline, but the Agent downloads the
headers for every single group on my agentised servers. This takes
about fifteen or twenty minutes every time I do `J s' because I
have very many groups on those servers (most of which I only read
about once a year). Downloading the actual news for the groups I'm
interested in reading offline only takes about a minute, so it
seems insane to download all these headers that I don't want.
How can I tell the Agent to not download even the headers for a
group?
Currently I have one Agent category for each of my agentised
groups. That is the "default" category and it is set to 0 (by the
Agent when it first set itself up). For the groups I want to read
offline I have group parameters that tell the Agent to retrieve
all messages (I have a `true' predicate).
It seems I need an Agent predicate that is more strongly negative
than `false', something like `not-even-headers'.
I suppose I might be asking the wrong question, since the Agent
predicates are to tell the Agent which articles to get, it must
have already retrieved the unwanted headers before it even starts
applying the predicates. So I need a way of telling the Agent at a
higher level not to even get the headers. But I don't see anything
useful in the documentation.
What am I missing?
I don't think it's possible to do this presently -- looking at
`gnus-agent-fetch-group-1', the headers are indeed fetched before the
predicate is examined. In principle, however, there's no reason why this
wouldn't be possible: we could retrieve the predicate higher up in the
function, and ignore the group altogether (unless some articles had been
marked specifically for downloading).

I suggest using `gnus-bug' to report this and describe the situation;
hopefully someone will get to it!

Eric
N. Jackson
2017-12-07 14:55:14 UTC
Permalink
Post by Eric Abrahamsen
Post by N. Jackson
How can I tell the Agent to not download even the headers for a
group?
It seems I need an Agent predicate that is more strongly
negative than `false', something like `not-even-headers'.
I don't think it's possible to do this presently -- looking at
`gnus-agent-fetch-group-1', the headers are indeed fetched
before the predicate is examined. In principle, however, there's
no reason why this wouldn't be possible: we could retrieve the
predicate higher up in the function, and ignore the group
altogether (unless some articles had been marked specifically
for downloading).
I suggest using `gnus-bug' to report this and describe the
situation; hopefully someone will get to it!
Eric
Hi Eric, thank you for the response.

Today I discovered `gnus-agent-handle-level' which I think I can
use to do what I want.

gnus-agent-handle-level is a variable defined in
`gnus-agent.el'. Its value is 5

Documentation: Groups on levels higher than this variable will
be ignored by the Agent.

You can customize this variable.

All my news groups are currently at a subscribedness level of 3
(the default), so I'll bump up the subscribedness of the groups I
want the agent to retrieve anything for to level 2 and set
`gnus-agent-handle-level' to 2 as well. This should solve my
problem in a tidy way.

In fact, this seems to be such a natural solution that I'm not
sure that there is a need for a new feature, so I won't file a
feature request unless this plan doesn't work out for some reason.

N.
Eric Abrahamsen
2017-12-07 17:13:53 UTC
Permalink
Post by N. Jackson
Post by Eric Abrahamsen
Post by N. Jackson
How can I tell the Agent to not download even the headers for a
group?
It seems I need an Agent predicate that is more strongly
negative than `false', something like `not-even-headers'.
I don't think it's possible to do this presently -- looking at
`gnus-agent-fetch-group-1', the headers are indeed fetched
before the predicate is examined. In principle, however, there's
no reason why this wouldn't be possible: we could retrieve the
predicate higher up in the function, and ignore the group
altogether (unless some articles had been marked specifically
for downloading).
I suggest using `gnus-bug' to report this and describe the
situation; hopefully someone will get to it!
Eric
Hi Eric, thank you for the response.
Today I discovered `gnus-agent-handle-level' which I think I can
use to do what I want.
Glad you got that sorted! I should have known there'd be an option like
that...

Eric
N. Jackson
2017-12-11 18:08:16 UTC
Permalink
Post by N. Jackson
All my news groups are currently at a subscribedness level of 3
(the default), so I'll bump up the subscribedness of the groups I
want the agent to retrieve anything for to level 2 and set
`gnus-agent-handle-level' to 2 as well. This should solve my
problem in a tidy way.
Following up for completeness, this worked brilliantly. Now it takes
about 20 seconds to bring down all the news I want for offline reading,
compared to the 20 minutes or so I was suffering from previously!

N.

Loading...