Article View: news.software.readers
Article #12710The trn newsreader FAQ, part 1: Basics
From: Peter J. Kappesser
Date: Sun, 13 Nov 1994 10:50
Date: Sun, 13 Nov 1994 10:50
419 lines
18030 bytes
18030 bytes
Posted-By: auto-faq 3.1.1.2
Archive-name: trn-faq/part1
Posting-Frequency: Posted around the 11th of each month.
Please-Note: Submitted last week to the news.answers moderators, but
they're evidently backlogged as I have received no response,
so I am doing this manual posting because people are asking FAQs!
Last-modified: November 8, 1994
Version: 1
These articles summarize some frequently-asked questions (and answers)
about the trn family of newsreaders, and associated programs such as
Pnews and Rnmail. Trn was written by Wayne Davison <davison@borland.com>
who often answers questions about the program in news.software.readers.
Part 1 deals with basic questions on configuring and using trn; Part 2
has information on more advanced usage questions. You may also be
interested in the "rn KILLfile FAQ" (See Subject: 2 below to find it)
for information regarding killfiles. Trn calls killfiles "memorized
commands" as it extends the capability quite beyond simply killing
undesired subjects.
OVERVIEW
Subject: 1. Where do I begin?
Subject: 2. What other documentation is available?
Subject: 3. How does trn compare to other popular newsreaders like nn?
Subject: 4. What's the latest version of trn and where can I get it?
CONFIGURATION
Subject: 10. How can I set TRN options?
Subject: 11. How do I set multi-line environment variables?
Subject: 12. How can I use various .newsrc with trn?
Subject: 13. How do I remove prompts from Pnews?
USAGE
Subject: 20. Is there an easy way to save different threads
to different files?
Subject: 21. How to select based on my script that processes an article?
Subject: 22. How can I see only the new articles in trn?
------------------------------
Subject: 1. Where do I begin?
>>>>> Answer From: <jtbell@presby.edu> (Jon Bell)
If you use trn, you may be interested in my "Introduction to Usenet News
and the 'trn' Newsreader". It covers the basics of reading and posting
articles, signature files, crossposting, etc., and is about 40 pages
long.
There are versions for trn 2.5, 3.0, 3.1, 3.2, 3.3, 3.4 and 3.5. They
share the same text, except for the sections which discuss features that
differ from one version of trn to another. The changes listed above
appear in all the versions to which they apply.
You can find out which version of trn you are using by typing 'v' (lower
case!) at the newsgroup selection prompt ('read now?').
This document is available in four formats:
1. as a Macintosh WriteNow 3.0/4.0 document;
2. as a Microsoft Rich Text Format file which can be opened by
MS Word 4.0 (or later) for the Mac and by other word processors for Mac,
DOS and Windows;
3. as a PostScript file which can be printed (I hope) on any
PostScript printer;
4. as a plain ASCII text file which lacks all the font information
and most of the formatting (use this as a last resort).
Format #1 is in the form of a BinHexed Stuffit archive (*.sit.hqx). The
other formats are text files which have been compressed using GNU zip
(*.gz).
You can get this document either (a) by anonymous ftp from cs1.presby.edu,
directory pub/trn-intro; or (b) from the Presbyterian College gopher server
(gopher.presby.edu, port 70; or somewhere in your "Other Gophers" menu), in
the directory "Internet Resources".
[Editor's Note: URL: <ftp://cs1.presby.edu/pub/trn-intro/>
<gopher://gopher.presby.edu> ]
If you have neither ftp nor gopher, I'll be happy to send you a copy via
e-mail. Please specify which version of trn you have and which format
(WriteNow, RTF, PS or text) you want.
[Editor's Note: request this from Jon Bell <jtbell@presby.edu>]
------------------------------
Subject: 2. What other documentation is available?
>>>>> Answer From: <lvirden@cas.org> (Larry W. Virden)
Here is a list of the documentation for trn that I have found useful:
1. We start with the trn man page - while quite large, it has a lot
of useful info. There are also smaller man pages for Pnews, Rnmail,
newsetup, and newsgroups. I don't know if they are up to date with
relationship to things like FAST_PNEWS, etc.
2. There are also 2 text files that folk find useful: NEW and HINTS.TRN.
These detail the changes in trn as well as a set of hints on things
that one can do with it.
3. There is the intro to trn document written by Jon Bell <jtbell@presby.edu>
and found at
URL: <ftp://cs1.presby.edu/pub/trn-intro/trn-3.5*>
This gives one a gentle introduction to the use of the command to the
first time user.
There is also an html version of Version 3.3 at
URL: <http://www.wimsey.com/wimsey/trnint-3.3.html>
or
URL: <http://ocf.berkeley.edu/help/usenet/trnint-3.3.html>
It is also available on
URL: <gopher://cs1.presby.edu/11/net-resources/trn-intro>.
4. There is the KILL file FAQ - killfile-faq - found at places like:
URL: <gopher://depot.cis.ksu.edu/00/Frequently%20Asked%20Questions%20%28FAQs%29/killfile-faq>
or
URL: <http://www.cis.ohio-state.edu/hypertext/faq/usenet/killfile-faq/faq.html>
5. Of course there is strn - the scoring/scanning/super trn research
project. Source is available on ftp.uu.net just as is the trn source code.
The strn help files may provide a bit of additional help in the use
of trn!
------------------------------
Subject: 3. How does trn compare to other popular newsreaders like nn?
>>>>> Answer From: Nancy McGough <nancym@ii.com>
Here's a comparison I wrote over a year ago. NOTE THE DATE I wrote this
(i.e., some things have probably changed!)
>From nancym Thu Aug 5 19:15:24 1993
Notation
========
+ is an advantage
o is neutral
- is a disadvantage
? is something I don't know about
NN 6.4.16
=========
+ easier macro language
+ more powerful kill/select abilities (ANDing, ORing)
+ faster auto killing/selecting
+ can split/unsplit digests
+ dedicated newsgroup (news.software.nn) for discussion
+ l command for flagging (with =) and leaving an article to deal with it later
(this is better than trn's M command which just returns an article as unread
next time)
+ can easily mail a copy of a followup article to the author you're
responding to
+ can easily mail articles you read/post to other addresses
+ incredibly customizable
+ can easily view and organize your folders (both mail and news) with nn
+ can merge newsgroups
+ can search all (or some) newsgroups for subject and/or author
+ can have spell check one of the options before posting/mailing article
+ can set default save directory for each newsgroup that is not necessarily
one of the interpreted strings (e.g., my default save dir for comp.editors
is +vi)
- not very active participation by developer(s) in newsgroup (news.software.nn)
- can only search on subject and/or author; also author is the "real name"
rather than full From line
- macro names limited to 2 characters (as far as I can tell)
? more powerful macro language
TRN 3.0
=======
+ newsgroup selection level is friendlier than nn's A/B (advance/back)
commands (I like being able to see the list of newsgroups that I
say no to)
+ true threading (uses References line)
+ graphic view of thread ("article tree")
+ uses NOV (new overview database) for fast searching of headers; also
NOV is used by other newsreaders (eventually nn too)
+ can search body of article
+ can search full header
+ can reorder subscription list from within TRN (using m)
+ can have macro names longer than 2 characters
+ active participation by trn developer in newsgroup (news.software.readers)
+ can reverse the sort order (e.g., most recent at the top)
+ intrinsic commands for going to root/leaf of a thread (in nn you
need to do this with macros or a sequence of commands)
+ intrinsic command for auto-selecting your articles
+ easy to change attribution line to whatever you want (using ATTRIBUTION)
+ when you post you get lots of blank headers (e.g., Followup-To) put
into your editor
o newsgroup (news.software.readers) for discussion but also contains lots
of non-TRN discussion.
- harder macro language
This is certainly not a complete list.
------------------------------
Subject: 4. What's the latest version of trn and where can I get it?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
trn 3.5 has been out for quite a while now, and trn 3.6 is about to be
released. One place to grab the latest source:
ftp.uu.net:networking/news/readers/trn/trn.tar.gz -> trn-3.5.tar.gz
[Editor's Note:
URL: <ftp://ftp.uu.net/networking/news/readers/trn/trn.tar.gz> ]
A .Z version is also available and mthreads resides in the same spot,
if you need it.
------------------------------
Subject: 10. How can I set TRN options?
Question-From: <btsang@ctsc.hkbc.hk> (Bosco Tsang)
I am a new user to TRN, and I would like to know if I can set personal
options, like signatures etc, for TRN?
>>>>> Answer From: <mmcleod@clark.net> (Mark McLeod)
You can use the ".trninit" file, which is documented in the
on-line manual (`man trn'). You also will need to set an environment
variable (I believe that it is $TRNINIT) to point to that
initialization file.
------------------------------
Subject: 11. How do I set multi-line environment variables?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
The best thing to do is to put it in your .trnint file (and point the
TRNINIT environment variable at the file if you haven't already done
so). Then, just copy the lines out of the HINTS.TRN file (included
in trn 3.5) for the default value of NEWSHEADER and modify it as you
desire.
------------------------------
Subject: 12. How can I use various .newsrc with trn?
>>>>> Answer From: <king@wildebeest.cig.mot.com>
(Steven King, Software Archaeologist)
Make a separate directory for each .newsrc you want, then set the DOTDIR
environment variable to point to the proper directory. See the trn man
page for more information.
Alternately, you can make separate .newsrc files in your home directory
(say, .newsrc-1, .newsrc-2, etc.) and softlink the appropriate one to
.newsrc. (This may cause a problem with other dot files, like .rnsoft
and .rnlast. I think I'd recommend the DOTDIR method, actually.) For
information about making softlinks, see the man page for "ln". The
basic syntax is "ln -s .newsrc-1 .newsrc".
------------------------------
Subject: 13. How do I remove prompts from Pnews?
Question-From: Nigel Orr <orr@tks.oulu.fi>
[...Is] there any way to remove the "file to insert:" and "This
message costs the net..." prompts when posting to a group using Pnews?
>>>>> Answer From: <boba@wwa.com> (Bob Allison)
Pnews seems to look at an environment variable called "FAST_PNEWS".
If that variable contains the word "yes", Pnews skips the prompts.
I only know that if you're in ksh, and are using a .profile, then add:
export FAST_PNEWS=yes
>>>>> Answer From: <perry@jpunix.com> (John A. Perry)
Another way to do it would be to add an entry to set the FAST_PNEWS
variable in your .trninit file.
------------------------------
Subject: 20. Is there an easy way to save different threads
to different files?
Question-From: <neklan@euclid.mlnet.com> (Neklan)
Say you are reading a news group, and you've selected thread A with 4
posts and thread B with 6 posts and thread C with 7 posts. You read A,
and don't want to keep it... fine. Then you read a couple of articles in
B and realize you want to archive the entire thread.
If I went back to the thread selector and did :s file.name I'd also
wind up saving thread C. But at that point I'm not sure if I wan't to
archive that thread!
Is there a way to archive the particular thread that you are currently
on without also getting other threads that happened to be selected at
the time?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
Not without some extra work. You have a couple options, if you find the
thread savable, go on to the next threads via '>', and after reading it
you will eventually be returned to thread 'B', at which point you know
that only the threads you decided to leave with '>' are left, and you
can use :s right from the article prompt.
Alternately, visit the selector, press 'E' to exclude all non-selected
threads, and press 'M' on each thread that you don't want to save.
After using :s to save the threads you do want, press 'Y' to yank back
the other threads.
>>>>> Note From: <itz@crl.com> (Ian T. Zimmerman)
This doesn't quite work for me. The trouble is that if I exhaust all
the articles in B (read them to the end) before deciding on saving it,
they're marked as read and I never get them back (unless I use 'U').
>>>>> Answer From: <mcastle@umr.edu> (Mike Castle)
A macro should be able to automate this. Though it's possible
that if you read the same thread the next day, you'll save the
same messages twice.
------------------------------
Subject: 21. How to select based on my script that processes an article?
Question-From: <lvirden@cas.org> (Larry W. Virden)
[Trn has the ability] within the KILL file to indicate that an article
matching a regular expression should be piped into a program.
What I would like [is] for the _return code_ of the program on the end
of the pipe to determine whether an article was marked as selected,
junked or left alone. What I want to do is be able to say things like:
/nonsense/:|mycheck
and then have mycheck be something like:
#! /bin/sh
grep -s 'morestuff' >> /dev/null
return $?
so that now I can do operations on the news article, and have the return
code determine whether the item deserves to be selected or not.
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
Here's something that should help you out:
/subject search/:%(%`fgrep -c trn %A`=^0?-:+)
This works quite well on a local trn since %A points to the real article
even when you are doing subject searches. The command portion uses the
if-then-else operator -- %( = ? : ) -- to run a program via the execute
operator -- %`cmd` -- and compare the output to 0 (it's a regex compare,
so make sure to anchor it via '^'). Based on the result of this it either
deselects or selects the article (-/+). Substitute a shell script for
the fgrep and have it echo 0 or 1 and you're all set.
If you are using an NNTP version, %A may not have the correct article
text in it (trn only fetches one article at a time). This seems to be
a bug in the %A expansion (which should force the article to be fetched
when you reference it -- this will be fixed in version 3.6), so for the
moment you'll have to force trn to fetch each article before it runs
the command by using something like this with the 'a' modifier on the
search:
/^[^A-Z]./ca:%(%`fgrep -c trn %A`=^0?-:+)
The search portion of this is an attempt to match past the header, since
trn doesn't bother to read the whole article until it fails to match the
header portion. In version 3.6 you won't have to jump through this hoop
to get this to work.
------------------------------
Subject: 22. How can I see only the new articles in trn?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
There are ways to force trn to do something like this, but you might not
need this as much as you think.
When new articles arrive trn automatically selects the ones that show
up in the threads that you selected this session, so if the articles
show up and they aren't selected you either already rejected them
or they will be listed at the end of the selector in date order.
Press '$' to get to the last page if you aren't already there.
If you still have that urge to see the newly-arrived articles, there
will be a couple things you can do in trn 3.6 to facilitate this:
Press '=' to switch into the article selector, press "ON" to switch
the order to reverse numeric and look at the subjects it lists for
the first x articles.
Alternately, if 5 new articles have arrived, type 'c' (catchup) 5
to mark all but the last 5 articles as read. What's left in the
selector will be the new articles.
If you can't wait until 3.6 arrives you have to do some math and use
the article mode. Type '+' to get out of the selector (if you're in
it) and press '#' to see the last article number. If the output is
10762 and there are 5 new articles you'd type "10758-10762 +" to
select all the newly-arrived articles and then either read them or
press '+' to get back into the selector and 'E' to see only the
selected subjects. Yuck. Trn 3.6 will make this a little better.
Technical Details
Message-ID:
<trn-faq-1-784723602@kong.syr.edu>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!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!piaget.moe.ac.sg!usenet.eel.ufl.edu!news.mathworks.com!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!kong.syr.edu!pjkappesShow Full Headers
Complete Article Headers
Message-ID: <trn-faq-1-784723602@kong.syr.edu> Subject: The trn newsreader FAQ, part 1: Basics Date: Sun, 13 Nov 1994 10:50:25 +0000 From: pjkappes@mailbox.syr.edu (Peter J. Kappesser) 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!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!piaget.moe.ac.sg!usenet.eel.ufl.edu!news.mathworks.com!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!kong.syr.edu!pjkappes Newsgroups: news.software.readers Followup-To: news.software.readers Organization: Alumni account, Syracuse University, Syracuse, NY Lines: 419 Distribution: world Reply-To: pjkappes@mailbox.syr.edu (Peter J. Kappesser) NNTP-Posting-Host: kong.syr.edu Summary: Frequently-asked questions (and answers) about trn, a powerful, comand-based USENET newsreader, and associated utility programs. Keywords: FAQ TRN NEWS QUESTION ANSWER NEWSRC ENVIRONMENT VARIABLES PNEWS SLIP KILLFILE BOGUS NEWSGROUPS CRON Originator: pjkappes@kong.syr.edu