Matt Lundin | 30 Sep 2010 02:41

[emacs-w3m:11377] nnshimbun-request-scan fetches unsubscribed server groups

With the most recent nognus (44e4398abd1f2d11b3f32d64c54a6366104cf485),
all nnshimbun groups in a server are fetched at startup, regardless of
whether one has subscribed to them or not. For instance, I subscribe to
a single group in sb-nytimes, but, at startup, the nognus fetches and
generates nov databases for all the rss feeds for all groups defined in
the module (quite a few).

I asked about this on the gnus development list and I have been advised
that the "new" gnus calls nnshimbun-request-scan without a group
parameter:

http://permalink.gmane.org/gmane.emacs.gnus.general/72202

Note: a previous fix for this problem in gnus-start.el was reverted
because it seems to have caused problems for other backends:

http://permalink.gmane.org/gmane.emacs.gnus.general/72195

Looking at nnshimbun-request-scan, I see that if the group parameter is
nil, nnshimbun calls shimbun-groups to find *all* groups defined in the
server rather than only subscribed groups. Would it be possible for
nnshimbun-request-scan to generate nov databases only for the server's
subscribed groups?

I.e., instead of using...

(shimbun-groups nnshimbun-shimbun)

...to generate the list of groups (line 529 in nnshimbun.el), is there a
function that might return only the subscribed groups on the server?
(Continue reading)

Katsumi Yamaoka | 30 Sep 2010 13:26
X-Face
Favicon
Gravatar

[emacs-w3m:11378] Re: nnshimbun-request-scan fetches unsubscribed server groups

Matt Lundin <mdl <at> imapmail.org> wrote:
> With the most recent nognus (44e4398abd1f2d11b3f32d64c54a6366104cf485),
> all nnshimbun groups in a server are fetched at startup, regardless of
> whether one has subscribed to them or not.
[...]

I've introduced `nnshimbun-retrieve-groups' that's the new back
end function, and also modified `nnshimbun-request-scan' so as
to do nothing unless a group to scan is specified.  Could you try
it?

Matt Lundin | 30 Sep 2010 14:26

[emacs-w3m:11379] Re: nnshimbun-request-scan fetches unsubscribed server groups

Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> Matt Lundin <mdl <at> imapmail.org> wrote:
>> With the most recent nognus (44e4398abd1f2d11b3f32d64c54a6366104cf485),
>> all nnshimbun groups in a server are fetched at startup, regardless of
>> whether one has subscribed to them or not.
> [...]
>
> I've introduced `nnshimbun-retrieve-groups' that's the new back
> end function, and also modified `nnshimbun-request-scan' so as
> to do nothing unless a group to scan is specified.  Could you try
> it?

Thank you. While nnshimbun no longer activates all groups at startup, it
now does not activate any groups. It works as expected (i.e., activates
only subscribed groups at startup) if I replace nnshimbun-request-group
with nnshimbun-request-scan in nnshimbun-retrieve-groups.

Attachment (retrieve-groups.patch): text/x-patch, 433 bytes

Best,
Matt
Katsumi Yamaoka | 1 Oct 2010 09:34
X-Face
Favicon
Gravatar

[emacs-w3m:11380] Re: nnshimbun-request-scan fetches unsubscribed server groups

In [emacs-w3m : No.11379] Matt Lundin wrote:
> It works as expected (i.e., activates only subscribed groups at
> startup) if I replace nnshimbun-request-group with
> nnshimbun-request-scan in nnshimbun-retrieve-groups.

> --- nnshimbun.el	2010-09-30 07:38:47.825664151 -0400
> +++ nnshimbun-fix.el	2010-09-30 08:21:01.153141306 -0400
>  <at>  <at>  -531,7 +531,7  <at>  <at> 
>  (deffoo nnshimbun-retrieve-groups (groups &optional server)
>    (when (nnshimbun-possibly-change-group nil server)
>      (dolist (group groups)
> -      (nnshimbun-request-group group server))
> +      (nnshimbun-request-scan group server))
>      t))

Hmm, for me -group works but -scan doesn't.  Anyway I need to
learn more how the most recent Gnus works...

Matt Lundin | 1 Oct 2010 14:35

[emacs-w3m:11381] Re: nnshimbun-request-scan fetches unsubscribed server groups

Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> In [emacs-w3m : No.11379] Matt Lundin wrote:
>> It works as expected (i.e., activates only subscribed groups at
>> startup) if I replace nnshimbun-request-group with
>> nnshimbun-request-scan in nnshimbun-retrieve-groups.
>
>> --- nnshimbun.el	2010-09-30 07:38:47.825664151 -0400
>> +++ nnshimbun-fix.el	2010-09-30 08:21:01.153141306 -0400
>>  <at>  <at>  -531,7 +531,7  <at>  <at> 
>>  (deffoo nnshimbun-retrieve-groups (groups &optional server)
>>    (when (nnshimbun-possibly-change-group nil server)
>>      (dolist (group groups)
>> -      (nnshimbun-request-group group server))
>> +      (nnshimbun-request-scan group server))
>>      t))
>
> Hmm, for me -group works but -scan doesn't.  Anyway I need to
> learn more how the most recent Gnus works...

You are right. With nnshimbun-request-scan, the groups are updated but
not displayed at startup (i.e., no data about the groups is provided to
Gnus).

On the other hand, with nnshimbun-request-group, the groups are
displayed but not updated.

I believe that nnshimbun-request-group only updates the nov database
(and article count) if the group is ephemeral and an .overview file does
not already exist (lines 510-513). Thus, both at startup and when
(Continue reading)

Matt Lundin | 1 Oct 2010 15:57

[emacs-w3m:11382] Re: nnshimbun-request-scan fetches unsubscribed server groups

Matt Lundin <mdl <at> imapmail.org> writes:

> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>
>> Hmm, for me -group works but -scan doesn't.  Anyway I need to
>> learn more how the most recent Gnus works...
>
> You are right. With nnshimbun-request-scan, the groups are updated but
> not displayed at startup (i.e., no data about the groups is provided to
> Gnus).
>
> On the other hand, with nnshimbun-request-group, the groups are
> displayed but not updated.
>
> I believe that nnshimbun-request-group only updates the nov database
> (and article count) if the group is ephemeral and an .overview file does
> not already exist (lines 510-513). Thus, both at startup and when
> calling gnus-group-get-new-news, preexisting nnshimbun groups are not
> updated.
>
> Would it be possible to have nnshimbun-retrieve-groups call
> nnshimbun-request-scan *and* nnshimbun-request-group in succession?

On further review, I find that this does not work either, as it returns
data to Gnus on only one group per server. E.g., only one group in
rss-blogs is displayed, even though I have subscribed to multiple
groups. (This is also the case if nnshimbun-retrieve-groups only calls
nnshimbun-request-group.)

Per the gnus documentation, an nnchoke-retrieve-groups function needs to
(Continue reading)

Katsumi Yamaoka | 6 Oct 2010 07:30
X-Face
Favicon
Gravatar

[emacs-w3m:11384] Re: nnshimbun-request-scan fetches unsubscribed server groups

In [emacs-w3m : No.11382] Matt Lundin wrote:
> Matt Lundin <mdl <at> imapmail.org> writes:
>> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

>>> Hmm, for me -group works but -scan doesn't.  Anyway I need to
>>> learn more how the most recent Gnus works...

>> You are right. With nnshimbun-request-scan, the groups are updated but
>> not displayed at startup (i.e., no data about the groups is provided to
>> Gnus).

Oh, I see at last!  You meant groups newly subscribed to, not
Gnus' startup.  I verified that groups appear with zero unread
articles at startup.

[...]
> On further review, I find that this does not work either, as it returns
> data to Gnus on only one group per server. E.g., only one group in
> rss-blogs is displayed, even though I have subscribed to multiple
> groups. (This is also the case if nnshimbun-retrieve-groups only calls
> nnshimbun-request-group.)

> Per the gnus documentation, an nnchoke-retrieve-groups function needs to
> provide data on all the groups in the server.[1] With the following
> patch, all subscribed nnshimbun groups are both updated and displayed at
> startup:

I've applied your patch.  Thank you very much!

(Continue reading)


Gmane