Article View: news.software.readers
Article #241758Re: [slrn] True offline mode
From: ernobe
Date: Tue, 20 Jul 2010 01:49
Date: Tue, 20 Jul 2010 01:49
60 lines
3425 bytes
3425 bytes
>> when I set sorting_method to 12 ( custom ), custom_sort_by_threads to 1 (
>> do threading ), and put bodies first ( rather bodiless first ) in
>> custom_sort_order, I'm left with header only threads and individual messages
>> first, before the threads with bodies. What I'd like it do is apply a score
>> so that subjects beginning with Re: that appear in the first, header only
>> section are killed. But it doesn't seem possible, because if I kill such
>> subjects it will kill them all, including the ones in threads that already
>> have articles with bodies. In other words, I'd like to see only new subject
>> messages or threads in the header only section.
>>
> The following could work if all article subjects beginning with Re: had a
> parent on the server.Could someone tell me why it doesn't delete the articles
> that have a parent, please?
>
> define make_clean_threads ()
> {
> call ("header_bob");
> do
> {
> if (1 == has_parent ()) call ("delete_thread");
> }
> while (header_down (1));
> }
> () = register_hook ("article_mode_startup_hook",
> "make_clean_threads" );
This does it:
define make_clean_threads ()
{
call ("header_bob");
do
{
if (not ("" == extract_article_header ("References")))
{
call ("delete");
header_up (1);
}
}
while (header_down (1));
call ("expunge");
}
() = register_hook ("article_mode_startup_hook",
"make_clean_threads" );
For some reason, call ("delete"); moves the cursor down to the next header, so
it is necessary to call header_up (1) after it. This code does not delete any
messages that don't have a references line, after threading ( so it does not
affect their "children" ), so hopefully all that is left are new subject
messages or threads. Will have to see if there is a problem with replies to
messages that don't have a references line, and what to do with them.
--
"The world of existence is an emanation of the merciful attribute of God."
Abdu'l-Baha
http://www.costarricense.cr/pagina/ernobe
Technical Details
Message-ID:
<i22vbu$qm4$1@news.eternal-september.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!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mailReferences:
<i1fnkv$c3i$1@news.eternal-september.org> <i22han$4uk$1@news.eternal-september.org>Show Full Headers
Complete Article Headers
Message-ID: <i22vbu$qm4$1@news.eternal-september.org> Subject: Re: [slrn] True offline mode Date: Tue, 20 Jul 2010 01:49:50 +0000 From: ernobe <ernobe@yahoo.com> References: <i1fnkv$c3i$1@news.eternal-september.org> <i22han$4uk$1@news.eternal-september.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!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail Newsgroups: news.software.readers Organization: Baha'i Faith Lines: 60 Injection-Date: Tue, 20 Jul 2010 01:49:50 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="Q91/9pHQc4495fR8Rd6wLg"; logging-data="27332"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lxjx+heb16ONvj3a58DzliwFSMa44EdY=" User-Agent: slrn/pre1.0.0-18 (Linux) Cancel-Lock: sha1:yweBJDkNBpTI9dKCH3nuv8ErCcU= X-Original-Bytes: 3159