🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #69826

Moving to the next thread in slrn

#69826
From: J.B. Nicholson-Owens
Date: Fri, 29 Dec 2000 21:53
41 lines
2443 bytes
Sebastian Helms wrote:
> Any hints for starters - where do I find help in doing so, who has one
> ready to keep me from doing so [...]

Try <URL:http://forestfield.org/slrn/#jump_to_thread>.  In that macro, you
should find a function called thread_down() you could use like this:

  implements ("my");
  define move_to_next_thread ()
  {
     () = Jump_To_Thread->thread_down (1);
  }

You would stick that code in a file, say my_macros.sl in your home directory
(or somewhere in slrn's macro path), then load it from your slrnrc with:

  interpret "my_macros.sl"

then bind that to some key in your slrnrc, say ^N:

  setkey article my->move_to_next_thread "^N"

Then quit slrn (if you're running it) and run it again.  Now ^N will move
the cursor from the current thread to the next thread (or not move at all if
you're on the last thread).

If you want to do something special (like message yourself when you try to
move below the last thread) you could make a conditional from the return
value of Jump_To_Thread->thread_down() like this:

  !if (Jump_To_Thread->thread_down (1))
     {
        message ("You can\'t move past the last thread!");
     }

or make that more noticed by using message_now() instead of message().  You
could increase the severity with error() instead of message() or
message_now().

Good luck.
Technical Details
Message-ID: <slrn94q1ta.1l3.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!204.127.161.2.MISMATCH!wn2feed!wn4feed!worldnet.att.net!128.230.129.106!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
References: <slrn94nq5t.rk8.sebastian@ip217.fortytwo.uni-oldenburg.de> <2000-12-29T05-06-41@guckes.net> <slrn94ouqm.c0.sebastian@ip217.fortytwo.uni-oldenburg.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrn94q1ta.1l3.jbn@next.forestfield.org>
Subject: Moving to the next thread in slrn
Date: Fri, 29 Dec 2000 21:53:59 +0000
From: jbn@forestfield.org (J.B. Nicholson-Owens)
References: <slrn94nq5t.rk8.sebastian@ip217.fortytwo.uni-oldenburg.de> <2000-12-29T05-06-41@guckes.net> <slrn94ouqm.c0.sebastian@ip217.fortytwo.uni-oldenburg.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!supernews.google.com!sn-xit-02!supernews.com!204.127.161.2.MISMATCH!wn2feed!wn4feed!worldnet.att.net!128.230.129.106!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
Newsgroups: news.software.readers
Organization: Forest Field OmniMedia
Lines: 40
NNTP-Posting-Host: forestfield.org (208.216.67.173)
X-Trace: fu-berlin.de 978126839 7664998 208.216.67.173 (16 [35848])
User-Agent: slrn/0.9.6.4 (Unix)