Article View: news.software.readers
Article #8104Re: Using Elm within trn (solution) (A problem)
From: Wayne Davison
Date: Wed, 16 Mar 1994 20:03
Date: Wed, 16 Mar 1994 20:03
70 lines
3155 bytes
3155 bytes
According to Robert Nicholson <robert@steffi.demon.co.uk>:
> I want the contents of the Subject: so that I can pass them to elm's -s
> flag in NEWSPOSTER (with lazy evaluation).
What I'd like to know is why elm needs the -s flag when you call it with
a header (-i) that includes a subject line? This is a bug in elm.
As for your trn predicament, try the following. First you need a way to
get trn to stop prompting for the subject. This prompting occurs in the
NEWSHEADER definition, which I've expanded from common.h's definition
into .trninit-file syntax (the stuff between the ----'s):
-------------------------------------------------------------------------
-ENEWSHEADER="%(%[followup-to]=^$?:X-ORIGINAL-NEWSGROUPS: %n
)Newsgroups: %(%F=^$?%C:%F)
Subject: %(%S=^$?%\"
Subject: \":Re: %S)
Summary:
Expires:
%(%R=^$?:References: %R
)Sender:
Followup-To:
%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}
)Distribution: %(%i=^$?%\"Distribution: \":%D)
Organization: %o
Keywords: %[keywords]
Cc: %(%F=poster?%t:%(%F!=@?:%F))
"
-------------------------------------------------------------------------
Notice that the Subject: prompt happens using the %" interp to generate a
value to put into the header file that it passes to the posting software.
You want to move this prompt to your NEWSPOSTER definition to generate a
value for elm's -s flag. Here's both definitions ready for your .trninit:
-------------------------------------------------------------------------
-ENEWSPOSTER="elm -i %h -s '%(%S=^$?%\"
Subject: \":Re: %'S)' usenetnews"
-ENEWSHEADER="%(%[followup-to]=^$?:X-ORIGINAL-NEWSGROUPS: %n
)Newsgroups: %(%F=^$?%C:%F)
Subject: %S
Summary:
Expires:
%(%R=^$?:References: %R
)Sender:
Followup-To:
%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}
)Distribution: %(%i=^$?%\"Distribution: \":%D)
Organization: %o
Keywords: %[keywords]
Cc: %(%F=poster?%t:%(%F!=@?:%F))
"
-------------------------------------------------------------------------
It's not pretty, but it's doable. Too bad elm doesn't do the right thing
with -i or none of this would be necessary. I use mush for sending mail
and it only needs "mush -h %h" to do the right thing. Maybe someone could
fix elm to handle this correctly?
One final note, you need trn 3.4.1 to use the tick-modifier (e.g. %'S -- it
quotes the apostrophes in the argument). If you have an older trn, leave
off the "'".
--
Wayne Davison
davison@borland.com
Technical Details
Message-ID:
<CMrx2F.392@borland.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mail.elm.mbox.zip!gmd.de!newsserver.jvnc.net!igor.rutgers.edu!rutgers!concert!decwrl!borland.com!davisonReferences:
<2m4mau$4o5@steffi.demon.co.uk> <2m4pqm$5bm@steffi.demon.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <CMrx2F.392@borland.com> Subject: Re: Using Elm within trn (solution) (A problem) Date: Wed, 16 Mar 1994 20:03:50 +0000 From: davison@borland.com (Wayne Davison) References: <2m4mau$4o5@steffi.demon.co.uk> <2m4pqm$5bm@steffi.demon.co.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mail.elm.mbox.zip!gmd.de!newsserver.jvnc.net!igor.rutgers.edu!rutgers!concert!decwrl!borland.com!davison Newsgroups: comp.mail.elm,news.software.readers Organization: Borland International Lines: 69