Thread View: news.software.readers
7 messages
7 total messages
Started by Uwe Schuerkamp
Tue, 12 May 1998 00:00
Help with slrn, please
Author: Uwe Schuerkamp
Date: Tue, 12 May 1998 00:00
Date: Tue, 12 May 1998 00:00
27 lines
1375 bytes
1375 bytes
Hi all, I downloaded and installed both slang and slrn from the author's web site today. In an effort to switch from trn I tried to get an idea of how to re-map keys, and one of the most important keys for me in trn was "k", meaning mark entire thread as read and display next article". A similar command in slrn seems to be "esc d", but I cannot remap it to "k" because I cannot find the command in the .slrnrc file. Also, Esc d doesn't show the next unread article but requires another keypress like space or Enter. the second thing I'm missing from trn is the ability to automatically mark all the articles that were posted in reply to the stuff I posted myself. Is a similar feature available with slrn? Thanks very much in advance for your time, Uwe
Re: Help with slrn, please
Author: Heikki Kantola
Date: Tue, 12 May 1998 00:00
Date: Tue, 12 May 1998 00:00
44 lines
2308 bytes
2308 bytes
Uwe Schuerkamp <hoover@no.spam.please.telemedia.de> informed
news.software.readers with the following:
>I downloaded and installed both slang and slrn from
>the author's web site today. In an effort to switch from
>trn I tried to get an idea of how to re-map keys, and one
>of the most important keys for me in trn was "k", meaning
>mark entire thread as read and display next article".
>A similar command in slrn seems to be "esc d", but I cannot
>remap it to "k" because I cannot find the command in the
>.slrnrc file. Also, Esc d doesn't show the next unread
>article but requires another keypress like space or Enter.
Use following slang-macro:
define mark_whole_thread_unread ()
{
collapse_threads ();
call ("undelete");
}
definekey ("mark_whole_thread_unread", "k", "article");
>the second thing I'm missing from trn is the ability to
>automatically mark all the articles that were posted in
>reply to the stuff I posted myself. Is a similar feature available
>with slrn?
The following score-file entry works for messages posted with slrn,
except in cases where some lame newsreader has stripped References:-
header.
Score: 9000
References: hoover@.*\.bertelsmann\.de
On weak sides of that solution is also the fact it will be scoring
followups to your followups ad infinitium... :-/
--
Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI>
L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Re: Help with slrn, please
Author: Dr Ivan D Reid, muSR Facility
Date: Tue, 12 May 1998 00:00
Date: Tue, 12 May 1998 00:00
22 lines
1289 bytes
1289 bytes
In article <slrn6lgf0g.hc4.hoover@ente.highway.bertelsmann.de>,
Uwe Schuerkamp wrote:
>the second thing I'm missing from trn is the ability to
>automatically mark all the articles that were posted in
>reply to the stuff I posted myself. Is a similar feature available
>with slrn?
This seems to work for me, as long as the following posters
preserve the References: line (it also flags my own posts...).
[*]
Score:: 200
From: reid@psi\.ch (Dr Ivan D Reid, muSR Facility)
References: reid@PSW
--
Ivan Reid, Paul Scherrer Institute, CH. reid@psi.ch
Support Jayne Hitchcock: http://www.geocities.com/hollywood/6172/helpjane.htm
Re: Help with slrn, please
Author: Dawn Owens-Nicholson
Date: Tue, 12 May 1998 00:00
Date: Tue, 12 May 1998 00:00
135 lines
5523 bytes
5523 bytes
Uwe Schuerkamp wrote:
> [I want to duplicate trn's `k' in slrn. Trn's `k' means] mark
> entire thread as read and display next article
By "entire thread" did you mean the unread visible parent and children
articles of the current articles or just the unread visible children
articles? I'll assume you meant the former. By "next article" did
you mean next read or unread article? I'll assume you meant unread
article to remain compatible with scoring and how slrn usually does
things.
I'm not familiar with trn's behavior, so I've tested the trn_style_k
macro only a little bit.
Heikki Kantola replied:
> Use following slang-macro:
>
> define mark_whole_thread_unread ()
> {
> collapse_threads ();
> call ("undelete");
> }
> definekey ("mark_whole_thread_unread", "k", "article");
Actually, that won't mark anything as read or display the next
article. I believe the code I've included below is one way to do it.
It's long because I included a macro to fix a bug in slrn's
locate_header_by_msgid intrinsic. I've tried to preserve the thread
collapse display as well as mark the current thread (parent articles
included) read and read the next (unread) article.
> A similar command in slrn seems to be "esc d", but I cannot
> remap it to "k" because I cannot find the command in the
> .slrnrc file. Also, Esc d doesn't show the next unread
> article but requires another keypress like space or Enter.
ESC-d is bound to delete_thread. Also, it marks the current article
plus all (visible) child articles as read, not the parent articles.
> Score: 9000
> References: hoover@.*\.bertelsmann\.de
>
> On weak sides of that solution is also the fact it will be scoring
> followups to your followups ad infinitium... :-/
Maybe a more restrictive regex would work:
References: ^<[^>]+my@posting\.address\.goes\.here> <[^>]+>$
This should only match direct followups (and it won't match your own
articles unless you followup to yourself). In case anyone reading
doesn't know S-Lang regular expressions, I'm using "[^>]+" instead of
".+" for minimal matching. The ".+" part of "<.+>" would match way
too much because ".+" is greedy.
% You need both bugfix_locate_header_by_msgid and trn_style_k macros for
% trn_style_k to work.
define bugfix_locate_header_by_msgid ()
{
% With collapsed threads, the intrinsic locate_header_by_msgid will
% unnecessarily uncollapse a thread (or collapse other uncollapsed
% threads). This function fixes that and only uses the non-buggy
% portions of locate_header_by_msgid. The bugs have been reported.
variable sought_message_ID = read_mini ("Enter Message-Id", "", "");
!if (strlen (sought_message_ID)) return ();
variable starting_header = extract_article_header ("Message-ID");
call ("header_bob"); % go to top of article list
% The do-while loop moves the pointer from thread to thread while the
% inner for loop checks the articles in each thread. The collapse
% status of the display is only disturbed when the desired message-ID
% is found inside a thread.
do
{
variable
thread_was_collapsed = is_thread_collapsed (),
t_size = thread_size (),
position;
for (position = 1; position <= t_size; position++)
{
if (sought_message_ID == extract_article_header ("Message-ID"))
return ();
if (position == 1) uncollapse_thread ();
else if (andelse
{ position == t_size } % at end of thread
{ thread_was_collapsed })
collapse_thread ();
if (position != t_size) () = header_down (1);
}
}
while (header_down (1));
set_input_string (starting_header); % moving to starting place
call ("locate_header_by_msgid");
set_input_string (sought_message_ID); % calling the non-buggy part
call ("locate_header_by_msgid");
}
define trn_style_k ()
{
variable % save some state
thread_was_collapsed = is_thread_collapsed (),
starting_point = extract_article_header ("Message-ID");
% "mark entire thread as read..."
collapse_thread ();
call ("delete"); % "delete_thread" is OK here too
set_input_string (starting_point); % go to read thread
bugfix_locate_header_by_msgid ();
if (thread_was_collapsed) % restore thread collapse
collapse_thread ();
else
uncollapse_thread ();
call ("next");
if (andelse
{ is_group_mode () == 0 } % are we in article mode
{ is_article_visible () == 0 }) % AND article is invisible?
call ("hide_article"); % unhide it
}
definekey ("trn_style_k", "k", "article");
Re: Help with slrn, please
Author: Heikki Kantola
Date: Wed, 13 May 1998 00:00
Date: Wed, 13 May 1998 00:00
29 lines
1788 bytes
1788 bytes
Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> informed
news.software.readers with the following:
>Heikki Kantola replied:
>> Use following slang-macro:
>>
>> define mark_whole_thread_unread ()
>> {
>> collapse_threads ();
>> call ("undelete");
>> }
>> definekey ("mark_whole_thread_unread", "k", "article");
>
>Actually, that won't mark anything as read or display the next
>article.
Oops, I clearly copied the wrong macro from my .slrn.sl�, the correct
one would have been mark_whole_thread_read(), which differs from above
very little as it calls delete instead undelete...
� If somebody wants to see it in its full glory, it can be found at
<URL:http://www.ling.helsinki.fi/%7Ehkantola/slrn.sl>.
--
Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI>
L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Re: Help with slrn, please
Author: Dawn Owens-Nicholson
Date: Wed, 13 May 1998 00:00
Date: Wed, 13 May 1998 00:00
33 lines
1929 bytes
1929 bytes
Dawn Owens-Nicholson wrote:
> References: ^<[^>]+my@posting\.address\.goes\.here> <[^>]+>$
I should correct this--the above will only match second-level
followups (what I'll call followups to followups). For first-level
followups, take off " <[^>]+>" to make:
References: ^<[^>]+my@posting\.address\.goes\.here>$
For each level of followups to allow, add " <[^>]+>":
% Only first-level followups to my posts
References: ^<[^>]+my@posting\.address\.goes\.here>$
% Only second-level followups to my posts
References: ^<[^>]+my@posting\.address\.goes\.here> <[^>]+>$
% Only third-level followups to my posts
References: ^<[^>]+my@posting\.address\.goes\.here> <[^>]+> <[^>]+>$
and so on. You could use these together in a slrn score file to stop
tracking articles after the nth level of followup (or-ing these
together would let you easily track 1st through 3rd level followups).
Perhaps someday, the repeated part can be parenthesized and repeated
more elegantly in a single regex:
% Only 1st through 3rd level followups to my posts
References: ^<[^>]+my@posting\.address\.goes\.here>\( <[^>]+>\)\{0,2\}$
Happy scoring!
Re: Help with slrn, please
Author: Heikki Kantola
Date: Sat, 16 May 1998 00:00
Date: Sat, 16 May 1998 00:00
35 lines
2278 bytes
2278 bytes
Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> informed news.software.readers with the following: >I should correct this--the above will only match second-level >followups (what I'll call followups to followups). For first-level >followups, take off " <[^>]+>" to make: > > References: ^<[^>]+my@posting\.address\.goes\.here>$ > >For each level of followups to allow, add " <[^>]+>": > > % Only first-level followups to my posts > References: ^<[^>]+my@posting\.address\.goes\.here>$ > > % Only second-level followups to my posts > References: ^<[^>]+my@posting\.address\.goes\.here> <[^>]+>$ > > % Only third-level followups to my posts > References: ^<[^>]+my@posting\.address\.goes\.here> <[^>]+> <[^>]+>$ > >and so on. You could use these together in a slrn score file to stop >tracking articles after the nth level of followup (or-ing these >together would let you easily track 1st through 3rd level followups). Yes, that works (infact I had few times thought about writing such regexps myself, but felt too lazy :)). Now just remove the initial '^' to make it possible to score also threads not started by you. -- Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI> L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta tunnilta.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads