🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #47975

Re: Slrn: marking article/thread read without moving to next unread?

#47975
From: he... Heikki Kantola
Date: Tue, 13 Apr 1999 00:00
50 lines
2284 bytes
John E. Davis <da...@space.mit.edu> informed
news.software.readers with the following:
>On 12 Apr 99 16:14:03 GMT, Peppe <c92...@student.dtu.dk>
>wrote:
>>        variable n = thread_size () - 1;
>>        while (n, n--)
>>        {
>>          () = header_down (1);
>>          set_header_flags (HEADER_READ);
>>        }
>
>A S-Lang tip: It is probably better to code this using a `loop'
>statement:
>
>        loop (thread_size () - 1)
>        {
>          () = header_down (1);
>          set_header_flags (HEADER_READ);
>        }

Ok, after those hints, I managed to create the macro and in case
somebody else is also interested in it, here it is in its full glory:

 % mark article/thread read without jumping to next unread.
 define mark_read() 
  {
     variable status;
     
     if (is_group_mode ())
       error (_function_name () + " doesn't work in group mode!");
     set_header_flags(HEADER_READ);
     if(thread_size() > 1) {
        uncollapse_thread ();
	loop(thread_size() - 1) {
	  () = header_down(1);
	  set_header_flags(HEADER_READ);
	} 
	header_up(1);
	collapse_thread ();
     }
  }
 definekey("mark_read","D","article");

-- 
Heikki "Hezu" Kantola, <Heikki...@IKI.FI>
Lähettämällä mainoksia tai muuta asiatonta sähköpostia yllä olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Technical Details
Message-ID: <slrn7h62fn.s3k.hezu@tuuri.ling.helsinki.fi>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail
References: <slrn7h3o65.jcd.hezu@tuuri.ling.helsinki.fi> <slrn7h472c.6d.c928400@urdybet.pbk.dk> <slrn7h4883.or7.davis@aluche.mit.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrn7h62fn.s3k.hezu@tuuri.ling.helsinki.fi>
Subject: Re: Slrn: marking article/thread read without moving to next unread?
Date: Tue, 13 Apr 1999 00:00:00 +0000
From: he...@iki.fi (Heikki Kantola)
References: <slrn7h3o65.jcd.hezu@tuuri.ling.helsinki.fi> <slrn7h472c.6d.c928400@urdybet.pbk.dk> <slrn7h4883.or7.davis@aluche.mit.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail
X-Deja-AN: 465823137
Content-Transfer-Encoding: 8bit
Mail-Copies-To: never
Content-Type: text/plain; charset=iso-8859-1
Organization: Department of General Wizardry, Unseen University, Ankh-Morpork
Mime-Version: 1.0
User-Agent: slrn/0.9.5.4 (UNIX)
Newsgroups: news.software.readers,alt.lang.s-lang