🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #88313

Re: [slrn] auto-scroll-header, scroll-article-half-page

#88313
From: J.B. Nicholson-Owens
Date: Tue, 27 Nov 2001 23:24
56 lines
3023 bytes
Joe Koenig wrote:
> I'd like the cursor and the currently displayed article to stay on top of
> the header window.

Right now this would only be accessible from within the slrn program.  A
macro can't detect where the cursor is within the header window in the way
you need to do this job.  There's no API for that.  slrn might be able to
tell you but that isn't passed on to macros.  Fortunately slrn is free
software so you can modify your copy as you like and distribute your
modified version too.

> Can I customize the amount of lines slrn srolls, when hitting the Space
> button?

Not directly via a slrn.rc setting but with a macro, yes.  The
article_line_down intrinsic will help you.  A macro that looks like this
would skip 3 lines down instead of a full page:

  implements ("my");
  static define article_page_down ()
  {
     if (_is_article_visible () & 1)
       {
          !if (get_next_art_pgdn_action ())     % would have shown next page
            {
                loop (3) { call ("article_line_down"); }
            }
          else
            {
	        call ("article_page_down");
            }
       }
     else
       {
	  call ("article_page_down");
       }
  }

Save this in a file ("my_macros.sl") and in your slrn.rc add
  
  interpret "my_macros.sl"                       % loads the code
  setkey article my->article_page_down " "       % binds the key

to bind the above function to the spacebar.  With the above code loaded into
slrn when you press the space bar in article mode you'll either see the
first page of an article, next article/group or you'll scroll 3 lines down
depending on what you're seeing.  In other words, the spacebar should behave
just as it does by default but scroll down only 3 lines instead of a full
page.

> P.S. I hope I didn't annoy you somehow someway somewhere. If I did, I'd
> like to apologize.

I'm not annoyed, I don't like to repeat what was said in another article if
I can unambiguously refer to the original.
Technical Details
Message-ID: <slrna07mp5.h0m.jbn@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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
References: <slrna05o4o.4jo.joe.r.user@joeshost.joesdomain> <slrna073o3.h0m.jbn@forestfield.org> <slrna07ppd.8j.joe.r.user@joeshost.joesdomain>

Show Full Headers
Complete Article Headers
Message-ID: <slrna07mp5.h0m.jbn@forestfield.org>
Subject: Re: [slrn] auto-scroll-header, scroll-article-half-page
Date: Tue, 27 Nov 2001 23:24:19 +0000
From: "J.B. Nicholson-Owens" <jbn@forestfield.org>
References: <slrna05o4o.4jo.joe.r.user@joeshost.joesdomain> <slrna073o3.h0m.jbn@forestfield.org> <slrna07ppd.8j.joe.r.user@joeshost.joesdomain>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
Newsgroups: news.software.readers
Organization: Forest Field OmniMedia
Lines: 55
NNTP-Posting-Host: forestfield.org (208.216.67.173)
X-Trace: fu-berlin.de 1006903459 5753822 208.216.67.173 (16 [35848])
User-Agent: slrn/0.9.7.3 (Linux)