🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #40373

Re: SLRN : toggling sort mode AND header display in article mode ?

#40373
From: John E. Davis
Date: Fri, 24 Apr 1998 00:00
46 lines
2038 bytes
On 24 Apr 1998 12:50:51 GMT, Pascal A. Dupuis <dupuis@lei.ucl.ac.be>
wrote:
>Hello,
>just start using the header_display_format with slrn 0.9.5.1. Question is:
>-in default sort mode, I wish to have display format 0 (with line count)
>-in unsorted mode, I wish to have format 1 (with ref number).
>Is it possible to embbed this change in display format when invoking the 
>"\eS" key ?

When I wrote the new header formatting code, I debated about whether
or not to add a hook to the sorting mode to allow the user to change
the display format.  I decided to put the burden on the user by having
the user write a wrapper around the sort function, e.g.,

  define my_toggle_sort ()
  {
     variable sorting_method;
     call ("toggle_sort");
     sorting_method = get_variable_value ("sorting_method");
     
     switch (sorting_method)
       {
	case 0:  % unsorted
	  set_header_display_format (0, whatever....);
       }
       {
	case 1:
	  set_header_display_format (0, ...);
       }
         .
         .
       {
	  % default
	  set_header_display_format (0, ...);
       }
  }

  definekey ("my_toggle_sort", "\eS", "article");  

-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis     Cambridge, MA  02139-4307

Technical Details
Message-ID: <slrn6k1kqf.7r1.davis@aluche.mit.edu>
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: <slrn6k12j9.3mq.dupuis@pc-dupuis.lei.ucl.ac.be>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6k1kqf.7r1.davis@aluche.mit.edu>
Subject: Re: SLRN : toggling sort mode AND header display in article mode ?
Date: Fri, 24 Apr 1998 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn6k12j9.3mq.dupuis@pc-dupuis.lei.ucl.ac.be>
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: 347367030
Reply-To: davis@space.mit.edu
Organization: Center for Space Research
Newsgroups: news.software.readers