Article View: news.software.readers
Article #47710Re: Supersede in slrn
From: Tony Houghton
Date: Fri, 02 Apr 1999 00:00
Date: Fri, 02 Apr 1999 00:00
79 lines
3519 bytes
3519 bytes
In <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
[Comments etc in script snipped]
> 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 ()); }
I can't get it to work, despite checking that I've got the latest
versions of slrn and slang. I don't know slang, but I tried making
some naive changes to get it working, as follows:
The first error I got was:
S-Lang Error: Undefined Name: implements is undefined
So I commented out that line, but got:
S-Lang Error: Undefined Name: private is undefined
So I removed the private, but got:
S-Lang Error: Undefined Name: message_ID is undefined
So I put message_ID before supersedes_hdr in the variable block, but
when I tried to use Supersede->followup I got:
S-Lang Error: Syntax Error: Expecting a PRIMARY: found '>', line 1,
file: Supersede->followup
So I changed the last 2 lines in the script to this:
define supersede_followup () { supersede ("followup"); }
define supersede_post () { supersede ("post"); }
and changed .slrnrc accordingly. But when I use the functions it just
leaves the Supersedes: header blank. With slrn 0.9.5.2 I got the
warning/query about the Message-ID appearing to be invalid, but with
0.9.5.4 I didn't and it just went straight into the post.
Also, it indented the original message. I want one that doesn't indent
it. I know there is a function to do this, (bound to ESC-2 f by
default), but it also includes the headers. Is there a version that
doesn't include headers?
--
TH * http://homepages.tcp.co.uk/~tonyh/
Supporting CUT: http://www.unmetered.org.uk/
Technical Details
Message-ID:
<slrn7g9ng2.215.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-mailReferences:
<slrn7g7231.o2.tonyh@tonyh.tcp.co.uk> <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrn7g9ng2.215.tonyh@tonyh.tcp.co.uk> Subject: Re: Supersede in slrn Date: Fri, 02 Apr 1999 00:00:00 +0000 From: tonyh@tcp.co.uk (Tony Houghton) References: <slrn7g7231.o2.tonyh@tonyh.tcp.co.uk> <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 X-Deja-AN: 461976641 X-Complaints-To: abuse@tcp.net.uk X-Trace: news.tcp.co.uk 923068513 195.80.1.109 (Fri, 02 Apr 1999 16:55:13 BST) Organization: Home User-Agent: slrn/0.9.5.4 (UNIX) NNTP-Posting-Date: Fri, 02 Apr 1999 16:55:13 BST Newsgroups: news.software.readers