🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #23496

Re: slrn ?

#23496
From: Olly Betts
Date: Fri, 28 Jun 1996 00:00
96 lines
3940 bytes
In article <slrn4t5ppq.e33.hchau@bardeen.ucdavis.edu>, Hung Chau wrote:
>On 27 Jun 1996 17:01:18 GMT, David Mears wrote:
>> While this will work, I would like to add my voice to Andrew's to lobby
>> for a tin-like command from within a news group to toggle previously
>> read article headers on and off. 
>
>This might be nice.  I had to do the "q5
" a couple of time.  Plus there
>seems to be no easy way for me to hide those article that I have read and
>toggle them back like tin.

You can "hide" read headers using 'x'.

Here's a patch which adds a new function (bound by default to Ctrl-A) to
pull in all articles from the server.  I wrote it a while ago, but it has a
problem: the articles pulled in aren't scored (actually the existing
commands which pull in parents/children have the same flaw), and I haven't
had a chance to sort this out.  Perhaps someone else will fix it now...

I don't recall what version this patch is from, but you should be able to
apply it to anything recent, as it's fairly self-contained.  (Looking more
closely, it won't work with slrn 0.8.8.3 (BETA) if John's released that
yet).

--- art.c.base	Fri May 24 15:31:36 1996
+++ art.c	Fri May 24 16:19:48 1996
@@ -4416,6 +4416,45 @@
    Slrn_Full_Screen_Update = 1;
 }
 
+/* add in articles with server article ids start-end inclusive */
+static void fetch_range ( int start, int end )
+{
+   char buf[NNTP_BUFFER_SIZE];
+   if (start<=end)
+     {
+	nntp_open_xover (start, end);
+	
+	while (NULL != nntp_read_xover(buf, sizeof(buf) - 10))
+	  {
+	     Slrn_Header_Type *h;
+	     h = process_xover_line (buf);
+	     if (h == NULL) continue;
+	     get_header_real_name (h);
+	     insert_header (h);
+	  }
+	nntp_close_xover ();
+     }
+}
+
+/* fetch all articles not currently fetched */
+static void fetch_all (void)
+{
+   Slrn_Header_Type *h;
+   int start,end;
+   
+   start = Slrn_Server_Min;
+   h = First_Header;
+   while (h != NULL)
+     {
+	end = h->number-1;
+	if (start<=end)	fetch_range( start, end );
+	start = h->number+1;
+	h = h->real_next;
+     }
+   fetch_range( start, Slrn_Server_Max );
+   sort_by_sorting_mode ();
+}
+
 static int prev_unread (void)
 {
    Slrn_Header_Type *h;
@@ -4986,6 +5025,7 @@
 {
    A_KEY("browse_url", browse_url),
    A_KEY("art_xpunge", art_xpunge),
+   A_KEY("fetch_all", fetch_all),
    A_KEY("wrap_article", wrap_article),
    A_KEY("goto_last_read", goto_last_read),
 #if SLRN_HAS_DECODE
@@ -5223,6 +5263,7 @@
    SLkm_define_key  ("u", (FVOID_STAR) undelete_header_cmd, Slrn_Article_Keymap);
    SLkm_define_key  ("U", (FVOID_STAR) browse_url, Slrn_Article_Keymap);
    SLkm_define_key  ("x", (FVOID_STAR) art_xpunge, Slrn_Article_Keymap);
+   SLkm_define_key  ("^A", (FVOID_STAR) fetch_all, Slrn_Article_Keymap);
    SLkm_define_key  ("t", (FVOID_STAR) toggle_headers, Slrn_Article_Keymap);
    SLkm_define_key  ("T", (FVOID_STAR) toggle_quotes, Slrn_Article_Keymap);
    SLkm_define_key  ("\033a", (FVOID_STAR) toggle_show_author, Slrn_Article_Keymap);

Olly
-- 
cool wet grass  cool wet grass  cool wet grass  cool wet grass  cool wet grass



Technical Details
Message-ID: <4r12fh$2sq@sunforest.mantis.co.uk>
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: <slrn4t3rjm.j9e.brennan@crashprone.allegheny.edu> <slrn4t4a0t.3pg.davis@aluche.mit.edu> <slrn4t5fmg.7v.mears@hpindft.cup.hp.com> <slrn4t5ppq.e33.hchau@bardeen.ucdavis.edu>

Show Full Headers
Complete Article Headers
Message-ID: <4r12fh$2sq@sunforest.mantis.co.uk>
Subject: Re: slrn ?
Date: Fri, 28 Jun 1996 00:00:00 +0000
From: olly@mantis.co.uk (Olly Betts)
References: <slrn4t3rjm.j9e.brennan@crashprone.allegheny.edu> <slrn4t4a0t.3pg.davis@aluche.mit.edu> <slrn4t5fmg.7v.mears@hpindft.cup.hp.com> <slrn4t5ppq.e33.hchau@bardeen.ucdavis.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
X-Deja-AN: 163091848
Content-type: text/plain; charset=iso-8859-1
Organization: Mantis Consultants Ltd, Cambridge. UK.
Mime-version: 1.0
Newsgroups: news.software.readers