Thread View: news.software.readers
10 messages
10 total messages
Started by Tony Houghton
Thu, 01 Apr 1999 00:00
Supersede in slrn
Author: Tony Houghton
Date: Thu, 01 Apr 1999 00:00
Date: Thu, 01 Apr 1999 00:00
18 lines
1424 bytes
1424 bytes
I supersede my messages quite often before I let them leave my machine for the big wide world. My favourite newsreader at the moment is slrn, and it unfortunately doesn't seem to have an automatic supersede function, so I've been using 'ESC-2 f' (follow-up including headers of quoted message and don't indent any quoted text), splitting the References header at the last entry and inserting "Supersedes: ", and deleting the quoted headers. It's a bit laborious and I sometimes make mistakes. Is it possible to write a supersedes function in Slang script? Or would it have to be added to the C source? Does anyone have such a script function to save me reinventing the wheel? -- TH * http://homepages.tcp.co.uk/~tonyh/ Supporting CUT: http://www.unmetered.org.uk/
Re: Supersede in slrn
Author: Tony Houghton
Date: Thu, 01 Apr 1999 00:00
Date: Thu, 01 Apr 1999 00:00
34 lines
2020 bytes
2020 bytes
In <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote: > 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. It's all right, I'm running a local copy of INN with suck to upload to my dialup account, and I've confirmed that superseded messages don't get uploaded. > > > 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! I haven't tried it yet, but thanks. -- TH * http://homepages.tcp.co.uk/~tonyh/ Supporting CUT: http://www.unmetered.org.uk/
Re: Supersede in slrn
Author: Dawn Owens-Nicholson
Date: Thu, 01 Apr 1999 00:00
Date: Thu, 01 Apr 1999 00:00
112 lines
4947 bytes
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 ()); }
Re: Supersede in slrn
Author: Tony Houghton
Date: Fri, 02 Apr 1999 00:00
Date: Fri, 02 Apr 1999 00:00
60 lines
3601 bytes
3601 bytes
In <slrn7g9v36.t84.bluemoon@ux6.cso.uiuc.edu>, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
> Tony Houghton wrote:
> > I can't get it to work, despite checking that I've got the latest versions
> > of slrn and slang.
>
> Since you're having problems with the namespace stuff ('implements',
> 'private', '->') you are probably using the latest release S-Lang and not
> the latest developer S-Lang. Check out
> ftp://space.mit.edu/pub/davis/slang/snapshots/ for the latest S-Lang
> developer snapshot (v1.3.5 or better).
I'm downloading it now, but not being an S-Lang programmer, I'm not
sure that's such a good idea ;). Is there a way I can get it working
the way I nearly succeeded with the release version of S-Lang?
> > S-Lang Error: Undefined Name: message_ID is undefined
>
> This was a genuine error, so I've fixed it and I'm testing it now by
> superseding my old followup <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>.
> Before I post the code again I need to clear up a question about superseding
> and the References: header: Do superseded message-IDs stay in the
> References: header? For instance, I'm superseding a followup to
> <slrn7g7231.o2.tonyh@tonyh.tcp.co.uk>. Should
> <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu> stay in the References: header or
> should it be removed? I checked the draft-ietf-usefor-article-02.txt in the
> section that describes Supersedes: and didn't see any reference to
> References: (so to speak).
What I want it to do is make an identical copy of the message I'm
superseding, only changing the Message-ID and Date. Also, the
superseded message doesn't exist any more, so I'm pretty sure it
should be removed from the References. But keep the other references
if there are any. Is that reasonably easy to achieve?
>
> > Also, it indented the original message. I want one that doesn't indent it.
>
> Since the supersede macro calls the post and followup intrinsics (and
> because no code before calling them uses prefix args), the prefix arguments
> should still work as they normally do with post and followup.
You mean that pressing Esc-2 inserts the number 2 onto an argument
stack for the followup function to read? OK, I can deal with that I
think :).
Actually, as I do understand C, but not S-Lang, it would probably be
easier for me to copy/modify the followup function in the C source to
do what I want and send it to John Davis ;).
PS I'm posting and mailing, because that's what you did and I thought
you might like it done in return, but it's not something I normally
do, because I'm prepared to read the group at least as long as it
takes to sort this out. Let me know if you don't want the emails.
--
TH * http://homepages.tcp.co.uk/~tonyh/
Supporting CUT: http://www.unmetered.org.uk/
Re: Supersede in slrn
Author: Dawn Owens-Nicholson
Date: Fri, 02 Apr 1999 00:00
Date: Fri, 02 Apr 1999 00:00
30 lines
2109 bytes
2109 bytes
Tony Houghton wrote:
> I can't get it to work, despite checking that I've got the latest versions
> of slrn and slang.
Since you're having problems with the namespace stuff ('implements',
'private', '->') you are probably using the latest release S-Lang and not
the latest developer S-Lang. Check out
ftp://space.mit.edu/pub/davis/slang/snapshots/ for the latest S-Lang
developer snapshot (v1.3.5 or better).
> S-Lang Error: Undefined Name: message_ID is undefined
This was a genuine error, so I've fixed it and I'm testing it now by
superseding my old followup <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>.
Before I post the code again I need to clear up a question about superseding
and the References: header: Do superseded message-IDs stay in the
References: header? For instance, I'm superseding a followup to
<slrn7g7231.o2.tonyh@tonyh.tcp.co.uk>. Should
<slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu> stay in the References: header or
should it be removed? I checked the draft-ietf-usefor-article-02.txt in the
section that describes Supersedes: and didn't see any reference to
References: (so to speak).
> Also, it indented the original message. I want one that doesn't indent it.
Since the supersede macro calls the post and followup intrinsics (and
because no code before calling them uses prefix args), the prefix arguments
should still work as they normally do with post and followup.
Re: Supersede in slrn
Author: 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/
Re: Supersede in slrn
Author: John E. Davis
Date: Fri, 02 Apr 1999 00:00
Date: Fri, 02 Apr 1999 00:00
17 lines
1407 bytes
1407 bytes
On 2 Apr 1999 15:10:58 GMT, Tony Houghton <tonyh@tcp.co.uk>
wrote:
>In <slrn7g7dvm.c0h.bluemoon@ux6.cso.uiuc.edu>, Dawn Owens-Nicholson <bluemoon@ux6.cso.uiuc.edu> wrote:
>> implements ("Supersede");
This is a slang 1.3.x feature.
>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:
slang 1.3.x is available from
ftp://space.mit.edu/pub/davis/slang/snapshots/.
--John
Re: Supersede in slrn
Author: Tony Houghton
Date: Sat, 03 Apr 1999 00:00
Date: Sat, 03 Apr 1999 00:00
15 lines
1369 bytes
1369 bytes
In <slrn7ga367.28e.tonyh@tonyh.tcp.co.uk>, Tony Houghton <tonyh@tcp.co.uk> wrote: > Actually, as I do understand C, but not S-Lang, it would probably be > easier for me to copy/modify the followup function in the C source to > do what I want and send it to John Davis ;). I've written a supersede function in C now. It seems to work, but I'll try it out for a few days before submitting a patch or whatever. Is anyone else interested in trying it? -- TH * http://homepages.tcp.co.uk/~tonyh/ Supporting CUT: http://www.unmetered.org.uk/
Re: Supersede in slrn
Author: David Gerard
Date: Sat, 03 Apr 1999 00:00
Date: Sat, 03 Apr 1999 00:00
30 lines
2139 bytes
2139 bytes
On 1 Apr 1999 14:53:21 GMT, Tony Houghton <tonyh@tcp.co.uk> wrote: :I supersede my messages quite often before I let them leave my machine :for the big wide world. My favourite newsreader at the moment is slrn, :and it unfortunately doesn't seem to have an automatic supersede :function, so I've been using 'ESC-2 f' (follow-up including headers of :quoted message and don't indent any quoted text), splitting the :References header at the last entry and inserting "Supersedes: ", and :deleting the quoted headers. It's a bit laborious and I sometimes make :mistakes. I'm not sure the casual use of Supersedes: is such a good idea. Ever since the HipCrime spam floodings of last year - a lot of which used 'Supersedes:' or 'Supercedes:' headers - I and a lot of others have been automatically trashing ANYTHING with that header present that doesn't have 'FAQ' in the Subject: line. I believe CleanFeed now includes a similar filter. I know that's not how it should be, but that's how it is. You may wish to reconsider your use of it. -- http://thingy.apana.org.au/~fun/ http://xenu.netizen.com.au/ "The larger a program, the less likely it is to do anything useful whatsoever." (--nightshade--)
Re: Supersede in slrn
Author: Tony Houghton
Date: Sat, 03 Apr 1999 00:00
Date: Sat, 03 Apr 1999 00:00
23 lines
1599 bytes
1599 bytes
In <7e439o$avb$1@thingy.apana.org.au>, David Gerard <fun@thingy.apana.org.au> wrote: > I'm not sure the casual use of Supersedes: is such a good idea. Ever > since the HipCrime spam floodings of last year - a lot of which used > 'Supersedes:' or 'Supercedes:' headers - I and a lot of others have > been automatically trashing ANYTHING with that header present that > doesn't have 'FAQ' in the Subject: line. > > I believe CleanFeed now includes a similar filter. > > I know that's not how it should be, but that's how it is. You may wish > to reconsider your use of it. Good point. But I only use it to change my own postings on my local server before I upload them, so I can get suck's put.news script to remove the -- TH * http://homepages.tcp.co.uk/~tonyh/ Supporting CUT: http://www.unmetered.org.uk/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads