🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #47684

Re: Supersede in slrn

#47684
From: Dawn Owens-Nicholson
Date: Thu, 01 Apr 1999 00:00
112 lines
4947 bytes
Tony Houghton wrote:
> I supersede my messages quite often before I let them leave my machine
> for the big wide world.

I'm not sure how slrnpull handles Supersedes: but a lot of Usenet servers
don't recognize it.  You might want to edit the post file before slrnpull
posts it to Usenet instead of Superseding an old article.  Since the
superseded article would not go out, you'd also save bandwidth on your end
because you'd only upload one article, not the original plus all the
superseded revisions.

> Is it possible to write a supersedes function in Slang script?

Yes, here's one possible script but it uses already posted articles as a
source to determine the message-ID to supersede.  If this doesn't work for
you, you can customize it.  Most of it is documentation, it's really quite
simple.

Happy newsreading!


% Post/followup superseding another article.  % -*- mode: slang; mode: fold -*-
%
% Copyright 1998 J.B. Nicholson-Owens
% Author: J.B. Nicholson-Owens

#iffalse % Documentation %{{{
%
%INSTALL: Interpret (from your slrn.rc), autoload() or evalfile() (from
%S-Lang code) this file:
%
%    interpret "supersedes.sl"                  % load immediately
%
%or, from S-Lang code:
%
%    () = evalfile ("supersedes.sl");           % load immediately
%    autoload ("supersede", "supersedes.sl");   % load when needed
%
%After the instruction to load, bind two keys to post a superseding
%(supersede with an `s' not a `c') article (starting a new thread) or
%followup (continuing an old thread) with a superseding article:
%
%    setkey article Supersede->followup "\eF"   % for supersedes followup
%    setkey article Supersede->post     "\eP"   % for supersedes post
%
%or in S-Lang code:
%
%   definekey ("Supersede->followup", "\eF", "article");
%   definekey ("Supersede->reply",    "\eP", "article");
%
%Supersedes: may not be acted upon by your server, other servers or someone
%else's client.  Different servers and clients act differently when they see
%an article with a Supercedes: header and the superseded article.
%
%This macro does not process multiple message-ID supersedes.  It will blindly
%take the content of the Message-ID: header and use it as the source for the
%Supercedes: header.  If your server will supersede multiple message-IDs
%simultaneously, you can place the other message-IDs on the Supersedes:
%header line when you edit the superseding article.
%
%Some (admittedly lame) checking is done to make sure the Message-ID: header
%content is sane (i.e., an Usenet message-ID in the correct format).  Since
%you have the source code to this macro, there would be little point in
%enhancing such checks.
%
%No verification of your identity is made to insure you are superseding your
%own articles.  Ultimately, Usenet servers will decide if your superseding
%article is valid.
%
%Superseding requires a message-ID, so superseding from group mode will
%prompt for a message-ID.  Usually people supersede articles they're reading,
%so it's easiest to do this from article mode.
%
%   Supersede->followup ();                     % to followup and supersede
%   Supersede->post ();                         % to post and supersede
%
#endif %}}}

implements ("Supersede");

private define supersede (i)                                            %{{{
{
   variable
     ch = "",
     orig_ch = "",
     supersedes_hdr = "Supersedes: " + message_ID + "\n",
     message_ID = "";

   if (is_group_mode ()) message_ID = read_mini ("Message-ID", "", "");
   else message_ID = extract_article_header ("Message-ID");

   if (andelse
	{ string_match (message_ID, "^<[^<> ]+>$", 1) != 1 }
	{ get_yes_no_cancel ("This doesn\'t look like a message-ID, supersede anyway") < 1 })
     return ();

   switch (i)
     { case ("followup"): ch = "followup_custom_headers"; }
     { case ("post")    : ch = "custom_headers"; }
     { error ("Unknown supersede operation!"); }

   orig_ch = get_variable_value (ch);
   set_string_variable (ch, supersedes_hdr + orig_ch);
   call (i);
   set_string_variable (ch, orig_ch);
}

%}}}
define followup ()                           { supersede (_function_name ()); }
define post ()                               { supersede (_function_name ()); }

Technical Details
Message-ID: <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.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: <slrn7g7231.o2.tonyh@tonyh.tcp.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>
Subject: Re: Supersede in slrn
Date: Thu, 01 Apr 1999 00:00:00 +0000
From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson)
References: <slrn7g7231.o2.tonyh@tonyh.tcp.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
X-Deja-AN: 461654447
Organization: University of Illinois at Urbana-Champaign
User-Agent: slrn/0.9.5.4 (UNIX)
Newsgroups: news.software.readers