🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #8405

Re: six trn answers

#8405
From: Doug Landauer
Date: Fri, 08 Apr 1994 23:49
45 lines
3084 bytes
>> As far as I can tell, sometimes the condition %Z=0 decides
>> to evaluate to true, even if articles are selected. Why?
>
>Because this is a regex match of '.*0.*' against the string %Z, and it
>is true if %Z is 0, 10, 20, 5083, etc.  What you want to test is that
>"%Z=^0", since %Z will only begin with a 0 if it == 0.  Thus the macros
>should be changed to be:
>
>  ^A^F	%(%m=t?%(%Z=^0?/\^/\:Tj^J%(%M=^0?n:n):\:M^J/\^/\:Tj^JYn):)
>  ^A^A	%(%m=t?%(%Z=^0?/\^/\:Tj^J%(%M=^0?n:^):\:M^J/\^/\:Tj^JY^):)
>  ^A^R	%(%m=t?%(%Z=^0?/\^/\:Tj^J%(%M=^0?n:Z):\:M^J/\^/\:Tj^JYZ):)

The one other change that I've made since I posted the originals is to
escape the '^' commands in the expansion of the ^A^A macro.  It looks like
trn was taking ^) to mean some control character.  '\^)' works better in
that case.   And for safety I suppose I'd do the same with the new '^0'
patterns.  So here's what I use these days...

^A^F %(%m=t?%(%Z=\^0?/\^/\:Tj^J%(%M=\^0?n:n):\:M^J/\^/\:Tj^JYn):)
^A^A %(%m=t?%(%Z=\^0?/\^/\:Tj^J%(%M=\^0?n:\^):\:M^J/\^/\:Tj^JY\^):)
^A^R %(%m=t?%(%Z=\^0?/\^/\:Tj^J%(%M=\^0?n:Z):\:M^J/\^/\:Tj^JYZ):)

And, yes, in answer to someone's question, the '^' characters
in the above macros are *all* circumflexes (up-arrows (hats
(accents graves))).

Now, I forget whether I posted my "z" macro, but:

# I just want "z" to say "go to next group and + it".  So the following
# tring translates z ...
# ... to q+          at article/end/selector level
# ... to jq+         at pager ("MORE?") level
# and to n+          at newsgroup selection level

z %(%m=[aet]?q+:%(%m=p?jq+:%(%m=n?n+:z)))

Unfortunately, this one cannot tell whether you've preserved ('M')
an article in the group you're leaving.  I think that this is not
a problem in trn, but strn will then throw you back into the same
group again instead of moving on.  I haven't yet figured out a fix
for this one.

Anyway, thanks to Wayne for fingering the bad "%Z=0" tests.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Doug.Landauer@sun.com				 "Sukkiri ga ii."
Technical Details
Message-ID: <2o4qik$g1q@engnews2.Eng.Sun.COM>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!subnet.sub.net!smurf.noris.de!msn!faulrs!fauern!news.th-darmstadt.de!terra.wiwi.uni-frankfurt.de!zeus.rbi.informatik.uni-frankfurt.de!news.dfn.de!darwin.sura.net!spool.mu.edu!howland.reston.ans.net!agate!ames!koriel!newsworthy.West.Sun.COM!male.EBay.Sun.COM!engnews1.Eng.Sun.COM!engnews2.Eng.Sun.COM!morocco!landauer
References: <2mm3ta$78k@engnews2.Eng.Sun.COM> <1994Apr6.164131.1547@ousrvr.oulu.fi> <2nuqe1$53b@b63519.student.cwru.edu> <Cnww4v.6L0@borland.com>

Show Full Headers
Complete Article Headers
Message-ID: <2o4qik$g1q@engnews2.Eng.Sun.COM>
Subject: Re: six trn answers
Date: Fri, 08 Apr 1994 23:49:40 +0000
From: landauer@morocco.Eng.Sun.COM (Doug Landauer)
References: <2mm3ta$78k@engnews2.Eng.Sun.COM> <1994Apr6.164131.1547@ousrvr.oulu.fi> <2nuqe1$53b@b63519.student.cwru.edu> <Cnww4v.6L0@borland.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!subnet.sub.net!smurf.noris.de!msn!faulrs!fauern!news.th-darmstadt.de!terra.wiwi.uni-frankfurt.de!zeus.rbi.informatik.uni-frankfurt.de!news.dfn.de!darwin.sura.net!spool.mu.edu!howland.reston.ans.net!agate!ames!koriel!newsworthy.West.Sun.COM!male.EBay.Sun.COM!engnews1.Eng.Sun.COM!engnews2.Eng.Sun.COM!morocco!landauer
Newsgroups: news.software.readers
Organization: Sun Microsystems
Lines: 45
NNTP-Posting-Host: 129.144.161.98