🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #72297

Re: SLRN: How to toggle_header_formats quickly

#72297
From: J.B. Nicholson-Owens
Date: Mon, 19 Feb 2001 18:30
35 lines
2023 bytes
Michael Lang wrote:
> I'd like to switch quickly between Header view zero and one.

You could press ESC-0 ESC-a to go to header view #0 and ESC-1 ESC-a to go to
header view #1 (this would require no code changes and no macro).  You could
reassign ESC-a to a macro that toggles between these two.

Something like this should work:

  implements ("my");

  private variable header_view = 0;
  static define toggle_header_view ()
  {
     variable previous_prefix_argument = get_prefix_arg ();

     reset_prefix_arg ();
     set_prefix_argument (header_view);
     call ("toggle_show_author");
     if (header_view) header_view = 0;           % for next time
     else header_view = 1;

     if (previous_prefix_argument != -1)
       set_prefix_argument (previous_prefix_argument);
  }

To assign this to ESC-a, load this into slrn from your slrnrc by saving this
code to a file (say, "my_macros.sl" in your slrn macro path or home
directory) and put the following two lines in your slrnrc:

  interpret "my_macros.sl"
  setkey article my->toggle_header_view "\ea"

Happy newsreading.
Technical Details
Message-ID: <slrn992pfn.74.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!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!feeder.qis.net!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
References: <96q4si$dn1$0@dosa.alt.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn992pfn.74.jbn@next.forestfield.org>
Subject: Re: SLRN: How to toggle_header_formats quickly
Date: Mon, 19 Feb 2001 18:30:40 +0000
From: jbn@forestfield.org (J.B. Nicholson-Owens)
References: <96q4si$dn1$0@dosa.alt.net>
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!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!feeder.qis.net!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
Newsgroups: news.software.readers
Organization: Forest Field OmniMedia
Lines: 34
NNTP-Posting-Host: forestfield.org (208.216.67.173)
X-Trace: fu-berlin.de 982607440 23604952 208.216.67.173 (16 [35848])
User-Agent: slrn/0.9.6.4 (Unix)