Article View: news.software.readers
Article #43518Re: [slrn] When does article_mode_hook() run? Before or after sorting? (Was [slrn] How to kill all "Re:" articles ...)
From: Ken Keen
Date: Fri, 02 Oct 1998 00:00
Date: Fri, 02 Oct 1998 00:00
129 lines
5740 bytes
5740 bytes
On 2 Oct 1998 02:27:32 GMT, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu>
wrote:
> [group.wildmat(s)]
> Score: =1 % non-Re: articles
> ~Subject: ^Re:
>
> Score: =-1 % everything else
> Subject: .
>
> Actually, I think scoring happens before article_mode_hook() runs, so the
> scorefile would have scored the articles first. Unless you mean to set an
> article's score and have it somehow reflected in the scorefile, in which
> case, that won't happen.
No, not reflected in the scorefile. Just set the score in the header
(set_header_score) before sorting.
> I don't get what you miss by using the scorefile alone, however.
I implemented the above scorefile programming (per your valuable help, of
course) without the =-1 but with only -1 and then followed by interesting
articles Score 1. But two problems occurred:
1. That all of the threaded followups to non-Re: articles are marked
as read. This you knew would happen.
2. Some people, when following up, somehow manage to lack references in
the headers.
*These* follow-ups are naturally not threaded with the non-Re:
articles and its followups. So I could get this unexploded header
list:
Flags Score Number Subject My Notes
----- ----- ------ ------------------- -------------------
! 9999 3 Re: Fascinating This is my must see thread
! 1 3 New thread New thread I want
0 2 Re: Old thread Old thread listed in scorefile
D -1 4 Re: Boring old Ignore boring old threads
D -1 2 Re: New thread New thread follow-ups I want
to see but there are no
reference headers.
My sorting method is 7 and hence threads first but it won't thread the two
last followups with the original and its followups (with proper
references). Then it sorts by score and good bye the last followups.
The point of my design solution was to grab a list of the New Threads' subject
names and then, with this table at hand, be sure I score *all* followups to
them (properly referenced or not) as a score of 1. This would solve both
problems (all followups marked as read *and* the lost followups). My list
would then be:
Flags Score Number Subject My Notes
----- ----- ------ ------------------- -------------------
! 9999 3 Re: Fascinating This is my must see thread
! 1 3 New thread New thread I want
! 1 2 Re: New thread New thread follow-ups I want
to see but there are no
reference headers.
0 2 Re: Old thread Old thread listed in scorefile
D -1 4 Re: Boring old Ignore boring old threads
If scoring occurs before article_mode_hook(), then my macro would have to look
at the score (get_header_score) and not touch it if it is 0 or 9999 as set by
the scorefile already. The scorefile would be:
Score: -1 % everything
Subject: .
Score: 1
Subject: interesting subject
etc.
which would leave the other work of setting New Threads and its followups to
1 to the macro.
> Also, I think using an array for this will get you some errors when you
> enter big groups (forcing you to waste memory by making the array big enough
> to hold the largest group).
Yes, the rough design as written is absurd. Typically I ignore limitations at
this state of design. Later I would either limit this functionality to a small
limited group (as is typical in my reading), say a 100. I could, if I desired
to make this function work without limitation (which I would do in the type of
software we write) is this: if I couldn't anticipate the memory availability,
I would write the list to a temporary file.
> If you can use the scorefile alone, it'll be faster,
Absolutely.
> not error-prone
Absolutely -- KISS lives.
> and far more intuitive when you want to change it.
Well, I'm not too challenged by this relatively simple design and I write well
structured and documented code. But you are correct that this is not as simple
by any means as:
Score: =1 % keep non-Re: articles.
~Subject: ^Re:
Score: -1 % no equal sign here.
Subject: .
Score: 1
Subject: interesting thread
But it has its flaws as noted. And in the software we manufacture, we would
not deliver it in that state.
But as a personal-use functionality, maybe "what they hey" is the proper
response.
My basic curiosity was this: Can I get access to the entire header list at
article_mode_hook or where else would set_header_score be useful?
Thanks again for all the help!
--
Man From Utopia
Technical Details
Message-ID:
<slrn718sdu.p1l.TroubleEveryDay@user2.teleport.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn717vb5.9pd.TroubleEveryDay@user2.teleport.com> <slrn718egi.cih.bluemoon@ux6.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrn718sdu.p1l.TroubleEveryDay@user2.teleport.com> Subject: Re: [slrn] When does article_mode_hook() run? Before or after sorting? (Was [slrn] How to kill all "Re:" articles ...) Date: Fri, 02 Oct 1998 00:00:00 +0000 From: TroubleEveryDay@Dangerous.Kitchen (Ken Keen) References: <slrn717vb5.9pd.TroubleEveryDay@user2.teleport.com> <slrn718egi.cih.bluemoon@ux6.cso.uiuc.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 396956180 Organization: Society for the Preservation of Soft Little Things You Step On Reply-To: TroubleEveryDay@Dangerous.Kitchen Newsgroups: news.software.readers