🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #70307

Re: [slrn] Function for a thread's first article

#70307
From: J.B. Nicholson-Owens
Date: Tue, 09 Jan 2001 01:57
40 lines
2475 bytes
Guenter Resch wrote:
> is there any slang function to move to the first article (either the
> very first one or the first one displayed) of the current thread?

If by 'thread' you mean logical threads (the arrangement of articles linked
by message-IDs listed in the References: header), this might be what you're
looking to do:

define move_to_first_logical_article_in_thread ()
{
   variable references = extract_article_header ("References");
   if (references = "") return ();

   variable parent = "";
   while (parent = strchop (extract_article_header ("References"), ' ', 0)[-1],
          parent != "")
     {
        !if (locate_header_by_msgid (parent, 0))
          error ("This article's parent is not in the header list.");
     }
}

A small modification is necessary if you want slrn to attempt to retreive
articles not present in slrn's header list (change the second argument of
locate_header_by_msgid() to 1).  This function assumes the last message-ID
in the References: header is that article's parent article.  No other
message-ID in the References: header is used because the code for
determining if an article has a truncated list of message-IDs in the
References: header is not brief.

If you meant visual threads (the arrangement of articles by how they're
displayed), http://forestfield.org/slrn/#jump_to_thread will allow you to
use:

  Jump_To_Thread->beginning ();

to place the cursor at the start of a thread.  I plan to expand the Jump to
Thread macro set to include logical thread navigation (right now it only
really navigates visual threads).
Technical Details
Message-ID: <slrn95krto.66l.jbn@next.forestfield.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!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
References: <lq5d39.ql1.ln@rpc1.imb.oeaw.ac.at>

Show Full Headers
Complete Article Headers
Message-ID: <slrn95krto.66l.jbn@next.forestfield.org>
Subject: Re: [slrn] Function for a thread's first article
Date: Tue, 09 Jan 2001 01:57:29 +0000
From: jbn@forestfield.org (J.B. Nicholson-Owens)
References: <lq5d39.ql1.ln@rpc1.imb.oeaw.ac.at>
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!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
Newsgroups: news.software.readers
Organization: Forest Field OmniMedia
Lines: 39
NNTP-Posting-Host: forestfield.org (208.216.67.173)
X-Trace: fu-berlin.de 979005449 10502975 208.216.67.173 (16 [35848])
User-Agent: slrn/0.9.6.4 (Unix)