Article View: news.software.readers
Article #159719Re: [slrn] Unread message count doesn't take scoring into account?
From: J.B. Nicholson-Owens
Date: Sat, 25 Dec 2004 22:41
Date: Sat, 25 Dec 2004 22:41
62 lines
2739 bytes
2739 bytes
On 2004-12-22, Toby <google@asktoby.com> wrote:
> However, the number of unread messages, whilst accurate, does not take
> into account the scoring of the messages.
If you're using S-Lang 1.x, try the following:
#v+
define my_cleanup_article_counts ()
{
!if (is_group_mode ()) { return; }
call ("bob");
do
{
% In S-Lang 1.x, we need to clear the error explicitly. We don't
% care that an error was raised, we just want to keep on going.
ERROR_BLOCK { _clear_error (); }
% This might raise an error if all the articles are killed.
if (group_unread ()) { () = select_group (); }
% Back out from article mode to group mode.
!if (is_group_mode ()) { call ("quit"); }
}
while (group_down_n (1));
}
#v-
or if you're using S-Lang 2.x, try the following:
#v+
define my_cleanup_article_counts ()
{
!if (is_group_mode ()) { return; }
call ("bob");
do
{
try
{
% This might raise an exception if all the articles are killed.
if (group_unread ()) { () = select_group (); }
}
% In S-Lang 2.x, AnyError is the error at the top of the exception
% hierarchy. We don't care what exception is raised, we just want
% to keep on going.
catch AnyError:
{
% This is just a placeholder to clear the error. According to
% S-Lang 2.x docs, we don't _clear_error() anymore; clearing
% the error is automatic when the error is caught.
}
% Back out from article mode to group mode.
!if (is_group_mode ()) { call ("quit"); }
}
while (group_down_n (1));
}
#v-
Both of them should help you learn the true article counts for all
newsgroups in the group list. This will require time and bandwidth to run
and doesn't scale up well (the more groups you want to check, the more time
it takes to run).
Technical Details
Message-ID:
<slrncsrr46.m7l.jbn@forestfield.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<slrncsj7cn.sq1.google@ID-171443.user.uni-berlin.de>Show Full Headers
Complete Article Headers
Message-ID: <slrncsrr46.m7l.jbn@forestfield.org> Subject: Re: [slrn] Unread message count doesn't take scoring into account? Date: Sat, 25 Dec 2004 22:41:10 +0000 From: "J.B. Nicholson-Owens" <jbn@forestfield.org> References: <slrncsj7cn.sq1.google@ID-171443.user.uni-berlin.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Lines: 62 X-Trace: individual.net hBvuA4f/ecp4KW3TkrUMUQTd3tjaoLz8a91hgJbjt6lCE2Dso= User-Agent: slrn/0.9.8.1 (Linux)