🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by Thomas Schultz Sat, 04 Mar 2000 00:00
Re: [slrn] Go to next thread
#58911
Author: Thomas Schultz
Date: Sat, 04 Mar 2000 00:00
48 lines
2029 bytes
On 03 March 2000 at 23:18 GMT, NJ Lieckfeldt <n@lieckfeldt.org.uk> wrote:

> I have worked quite hard in the last few days to get slrn for Win32,
> using it on Win2000. Still, there is a small niggle in that I can't
> seem to find the command to take me to the next unread thread,[...]

You could do this with a slang macro. I just wrote the following code
and it worked in the few tests I did; there may be a more elegant way
to do it:

#v+
define next_thread()
{
   if (is_group_mode ())
     error (_function_name () + " doesn't work in group mode!");
   
   variable
     starting_article = extract_article_header ("Message-ID"),
     was_collapsed = is_thread_collapsed ();

   collapse_thread();
   
   variable
     next_thread_exists = (andelse {header_down(1)}
			     {orelse {not (get_header_flags() & HEADER_READ)}
				{header_next_unread()}}),
     new_article = extract_article_header ("Message-ID");
   
   () = locate_header_by_msgid (starting_article, 0);
   !if (was_collapsed)
     uncollapse_thread();
   
   if (next_thread_exists)
     {
	() = locate_header_by_msgid (new_article, 0);
	if (_is_article_visible() == 1)
	  call ("article_lineup");
     }
   else
     {
	message ("No following unread threads.");
     }
}
#v-
-- 
Thomas Schultz <tststs@gmx.de>

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