🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #58911

Re: [slrn] Go to next thread

#58911
From: 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>

Technical Details
Message-ID: <slrn8c2tmm.4t6.tststs@starflower.tststs.ddns.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.mbox.zip!not-for-mail
References: <89ph83$a71$1@gxsn.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8c2tmm.4t6.tststs@starflower.tststs.ddns.org>
Subject: Re: [slrn] Go to next thread
Date: Sat, 04 Mar 2000 00:00:00 +0000
From: tststs@gmx.de (Thomas Schultz)
References: <89ph83$a71$1@gxsn.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-mail
X-Deja-AN: 593188466
X-Server-Date: 4 Mar 2000 20:56:01 GMT
X-Complaints-To: abuse@cityweb.de
Organization: Pinguin online.
User-Agent: slrn/0.9.6.2+ (Linux)
NNTP-Posting-Date: 4 Mar 2000 20:59:28 GMT
Newsgroups: news.software.readers