🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #45828

Re: slrn: threads

#45828
From: Dawn Owens-Nicholson
Date: Sun, 10 Jan 1999 00:00
57 lines
2603 bytes
Markus Sicheneder wrote:
> When I read news with slrn I just can see the _new_ postings of a thread
> but I would like to see the whole thread (also the _old_ postings).
> Of course threads without any new postings shouldnt be displayed.
>
> How do I configure slrn to do this?

You could do it with an S-Lang macro, or by hand.  Going down the header
list for each new article, hit ESC 1 ESC p (or whatever key you bound to
get_parent_header).  The available thread will be reconstructed in the
display and you'll see the whole thread.

Perhaps something like this will help get you started:

  define retrieve_all_threads ()
  {
     if (is_group_mode ())
       error (_function_name () + " doesn\'t work in group mode!");

     variable
       starting_article = extract_article_header ("Message-ID"),
       starting_thread_was_collapsed = is_thread_collapsed (),
       sorting_method = get_variable_value ("sorting_method");

     set_integer_variable ("sorting_method", 1); % need to collapse threads

     do
       {
	  set_prefix_argument (1);               % ESC 1
	  call ("get_parent_header");            % ESC p
	  collapse_thread ();                    % stow away results
       }
     while (header_down (1));                    % next thread

     % restore state (sorting method, cursor position, collapse status)
     set_integer_variable ("sorting_method", sorting_method);
     set_input_string (starting_article);
     call ("locate_header_by_msgid");
     if (starting_thread_was_collapsed) collapse_thread ();
  }

This needs to be run from your article_mode_hook():

  define article_mode_hook ()
  {
     .
     .
     retreive_all_threads ();
     .
     .
  }

If you run it while reading news in article mode it won't restore the thread
display--threads that weren't collapsed before will be collapsed after the
macro has executed.  In the article_mode_hook() this isn't a problem.

Technical Details
Message-ID: <slrn79i5ht.8po.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
References: <slrn79h3si.e7.guldukat@sichen.wh.uni-stuttgart.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrn79i5ht.8po.bluemoon@ux6.cso.uiuc.edu>
Subject: Re: slrn: threads
Date: Sun, 10 Jan 1999 00:00:00 +0000
From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson)
References: <slrn79h3si.e7.guldukat@sichen.wh.uni-stuttgart.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.mbox.zip!not-for-mail
X-Deja-AN: 430998943
Organization: University of Illinois at Urbana-Champaign
User-Agent: slrn/0.9.5.4 (UNIX)
Newsgroups: news.software.readers