Thread View: news.software.readers
3 messages
3 total messages
Started by Peter J. Kappesser
Sun, 13 Nov 1994 10:50
The trn newsreader FAQ, part 1: Basics
Author: 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.
The trn newsreader FAQ, part 2: Advanced
Author: Peter J. Kappesser
Date: Sun, 13 Nov 1994 10:50
Date: Sun, 13 Nov 1994 10:50
231 lines
10008 bytes
10008 bytes
Posted-By: auto-faq 3.1.1.2
Archive-name: trn-faq/part2
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.
Part 2 has information on more advanced usage questions and bug workarounds.
Subject: 50. Article selection problem in trn 3.4.1
Subject: 51. Slow performance with trn using SLIP
Subject: 52. trn 3.4.1 ignores some lines in big killfile
Subject: 53. TRN thinks certain newsgroups are bogus; TIN doesn't
Subject: 54. How can I run TRN non-interactively (e.g. as a cron job)?
------------------------------
Subject: 50. Article selection problem in trn 3.4.1
Question-From: <aguillon@netcom.com> (Jesus R. Aguillon)
When I do an article selection with 'A' and then '+' using trn 3.3 I get
the following in my kill-file:
/: *test/:++
Assuming the title is "test".
When I enter the newsgroup it does the selection properly.
With trn 3.4.1 I get:
/: *test/:I:++
When I enter the newsgroup I get:
Processing memorized commands...
/: *test/:I:++
9220 ???I:++
(Interrupted at article 9220)
And no articles get selected. If I remove the :I then it works just like
trn 3.3. Is there something different in this case between 3.3 and 3.4.1?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
This is a slight botch in 3.4.1 that got fixed in version 3.5 --
the 'I' is a modifier to ignore the THRU line and should have
read: "/: *test/I:++", but an extra ':' got stuck in there.
------------------------------
Subject: 51. Slow performance with trn using SLIP
Question-From: <jmk@maroon.tc.umn.edu> (Jim Kaufman)
I am running a Linux system that occassionally connects to the
University's machine so I can read news or mail. This is a 14.4Kbps
SLIP connection.
I notice that when trn starts up it reads the entire active file,
which is over 400K long. Also, when I then post news, the Pnews
script seems to want to do the same thing, as well as read the
newsgroups file. Is there some way to avoid this? Maybe point
trn at an older active file (or is this a really bad idea?)
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
Yeah, this is a drag over a slip line. Version 3.6 will provide
support for the new line-at-a-time active file listing that will
be in nntp-t6 and inn 1.5, so as long as you're at a site that
can upgrade this will be a thing of the past soon.
If you post from within trn Pnews should be sharing the active
file that trn grabbed. If it's not, you probably have a trn/Pnews
combination that is either too old or out of sync.
As for the newsgroups file, people on a slip line would do well to
modify Pnews to point to a local copy that they update from time
to time (at least through version 3.5).
Trn 3.6 has an improved Pnews that defaults to not grabbing the
files (instead getting the info in an interactive session), but
since this is _slower_ over a fast net connection there is an
option to do things the old way that each user can specify.
------------------------------
Subject: 52. trn 3.4.1 ignores some lines in big killfile
Question-From: <bitbug@netcom.com> (James Buster)
I have a local killfile for news.answers, which is 772 lines long. It seems
that two or three patterns in the killfile are ignored each time that I
read news.answers (I read it once per day, usually). Exactly which
patterns is different each time, but the result is that I must (K)ill
that subject again, producing a duplicate entry in news/answers/KILL.
I use sort and uniq on the killfile to help me identify and delete those
duplicate entries. This on a Sun running SunOS Release 4.1.3_U1.
Is this a known bug that's been fixed in later releases?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
I've never heard of this problem before. Using 'K' to deposit the kill
commands in the killfile puts a fairly specific version of the subject
into the kill file -- are you sure that the subjects aren't changing
slightly, maybe in spacing or something minor so that the kill commands
look similar but aren't quite the same?
One thing you might do is to modify your kill file to make it more
generic on the subjects you want to kill. Another option is to switch
to using "Tj" (if you are using trn 3.5) to kill the subjects by
thread instead of subject. This is useful if you're trying to weed
out all the stuff you're not interested in in news.answers because
the thread-kill commands automatically expire after the discussion
dies.
>>>>> Suggestion From: <lvirden@cas.org> (Larry W. Virden)
What COULD be done is to split the kills up between all the smaller *.answer
groups so that no kill file is so large. After you get done doing all the
comp.answers, rec.answers , etc. then you can go into news.answers and see
what is left.
------------------------------
Subject: 53. TRN thinks certain newsgroups are bogus; TIN doesn't
Question-From: Daniel Jacobs <danielj@snark.wizard.com>
I have a user who just switched to trn from tin. Some groups that show up
fine in tin, trn calls bogus and marks them as unsubscribed in .newsrc,
so if he goes back into tin after not being able to read them in trn, he
has to resubscribe again. Any ideas?
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
What version of trn are you using? In older versions trn used to
complain about redirected newsgroups as bogus (those with '=' in
the 4th field of the active file), but a modern trn reports the
redirection and allows the user to finish reading the remaining
articles before they expire. It might be that the groups are on
their last legs.
The only other thing I can think of is that you're not using the
same server for both tin and trn, but then you'd REALLY be messed
up using the same .newsrc file due to the lack of a common numbering
system.
------------------------------
Subject: 54. How can I run TRN non-interactively (e.g. as a cron job)?
Question-From: <mikey@waste.com> (Michael Owings)
Can TRN be run non-interactively (besides using the -c flag to check for
news)? I would like to have it run (from cron), process my kill file
entries for selected groups, and then exit.
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
Run the "trnkill" script included below from cron and it will enter
every subscribed group you have just long enough to run the kill file,
and then exit.
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
#!/bin/sh
# trnkill - shell script to apply trn KILL files in the background
# 14 Mar 89 created for rn by Jim Olsen <olsen@XN.LL.MIT.EDU>
# 10 Sep 93 modified for trn 3 (or 2) by Wayne Davison <davison@borland.com>
# Options: -d debug mode -- you see all gory action as it happens.
# Visit all newsgroups (if trn asks about anything else, just say no)
export TRNINIT TRNMACRO RNMACRO
TRNINIT='-q -s -T -t -x +X'
TRNMACRO=/tmp/trnkill$$
# support for trn 2.x
RNMACRO=$TRNMACRO
trap 'rm -f $TRNMACRO; exit' 1 2 3 15
echo "z %(%m=[nf]?.q^J:n)^(z^)" > $TRNMACRO
echo "^m ^(z^)" >> $TRNMACRO
echo "^j ^(z^)" >> $TRNMACRO
if test X$1 = X-d; then
echo "z" | trn
else
echo "z" | trn >/dev/null 2>&1
fi
rm -f $TRNMACRO
exit 0
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
>>>>> Note from Peter J. Kappesser <pjkappes@mailbox.syr.edu>:
I tried this script, but it refuses to run as a cron job, complaining it
'Can't open /dev/tty'.
>>>>> Answer From: <davison@borland.com> (Wayne Davison)
This only happens on certain systems, and depends on your termio setup.
I've made a change for trn 3.6 that checks if the input is a terminal
and skips this code if it is not:
Index:term.c
@@ -149,10 +149,13 @@
/* do no delay reads on something that always gets closed on exit */
- devtty = open("/dev/tty",0);
- if (devtty < 0) {
- printf(cantopen,"/dev/tty") FLUSH;
- finalize(1);
+ devtty = fileno(stdin);
+ if (isatty(devtty)) {
+ devtty = open("/dev/tty",0);
+ if (devtty < 0) {
+ printf(cantopen,"/dev/tty") FLUSH;
+ finalize(1);
+ }
+ fcntl(devtty,F_SETFL,O_NDELAY);
}
- fcntl(devtty,F_SETFL,O_NDELAY);
#endif
#endif
My system doesn't use this code, however, so if [someone will] try it out and
let me know how it goes I'd appreciate it.
Re: The trn newsreader FAQs -- updates
Author: Wayne Davison
Date: Sun, 13 Nov 1994 23:11
Date: Sun, 13 Nov 1994 23:11
175 lines
6930 bytes
6930 bytes
[I tried mailing this to pjkappes@mailbox.syr.edu and pjkappes@syr.edu, but both attempts bounced back (the former with a 550 Host unknown error for host "pjkappes@mailbgx.syr.edu" (note the 'g') and the latter with a "User unknown" error.] Hi Peter! Nice to see you grabbed the ball and ran with it on the trn FAQ! Much appreciated, and a nice job! Here are some comments on various bits of the FAQ that might need to be tweaked: FYI: > Distribution: world Isn't really a distribution. The suggested way to get unrestricted distribution is to leave the line empty and have it automatically removed. In the nn/trn comparison, some of the items are either outdated or based on a trn that didn't have a database: > NN 6.4.16 > ========= > + faster auto killing/selecting Like this one -- I don't believe that nn is any faster at auto-killing than trn. > + can split/unsplit digests If you are running the NOV-compatible version of nn this doesn't work, so you might want to note that. > + can easily mail a copy of a followup article to the author you're > responding to Trn 3.x has the Cc: line for this -- simple. > + can easily mail articles you read/post to other addresses Using Ctrl-F to forward an article in trn is easy as well. This was added in 3.5 or 3.4.1 -- I forget. > + can have spell check one of the options before posting/mailing article Trn 3.x has this -- use 'c'heck or "sp"ell at the appropriate prompt in Pnews. > + 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) This requires some environment variable tweaking in the memorized commands for the group: &-ESAVEDIR=%p/custom_dir X&-ESAVEDIR=%p The first line is executed on entry to the group, setting the default save directory to ~/News/custom_dir. The second line is executed on group exit and sets the save directory back to ~/News. > >>>>> 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 He believes correctly. I don't know if you want to edit out the "I believe that it is" part to be more definite or not. > >>>>> Answer From: <davison@borland.com> (Wayne Davison) > > The best thing to do is to put it in your .trnint file (and point the Whoops -- my fingers must have slipped -- that should be .trninit. > 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. This bit is specific to the NEWSHEADER definition and the question is generic for all multi-line headers. You could change this to be: Then, use the default definition as mentioned in the man page (or copy it out of the common.h source file, if you have access to it), and twek the value as you desire. Note that the HINTS.TRN file has the .trninit version of the NEWSHEADER definition in it, for your edification. > >>>>> 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. For a small site it also works to put "-EFAST_PNEWS=y" in the INIT file for the entire site. I suggest not doing this for a large site, as the extra questions might help a new user understand where their postings are going. > Subject: 20. Is there an easy way to save different threads > to different files? > Question-From: <neklan@euclid.mlnet.com> (Neklan) Trn 3.6 has a single-thread command similar to ":cmd" that will make this easy. I'll let you know the exact syntax once 3.6 is released. > >>>>> Answer From: <davison@borland.com> (Wayne Davison) > > Yeah, this is a drag over a slip line. Version 3.6 will provide > support for the new line-at-a-time active file listing that will > be in nntp-t6 and inn 1.5, so as long as you're at a site that Nntp-t6 is about to be released as nntp-1.5.12, so just substitute the one name for the other in this line. > Run the "trnkill" script included below from cron and it will enter > every subscribed group you have just long enough to run the kill file, > and then exit. My latest version (which is included in trn 3.6 in the support dir) is as follows: ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- #!/bin/sh # trnkill - shell script to apply trn KILL files in the background # 14 Mar 89 created for rn by Jim Olsen <olsen@XN.LL.MIT.EDU> # 10 Sep 93 modified for trn 3 (or 2) by Wayne Davison <davison@borland.com> # Options: -d debug mode -- you see all gory action as it happens. # Visit all newsgroups (if trn asks about anything else, just say no) export TRNINIT TRNMACRO RNMACRO TRNINIT='-q -s -T -t -x +X' TRNMACRO=/tmp/trnkill$$ # support for trn 2.x RNMACRO=$TRNMACRO trap 'rm -f $TRNMACRO; exit' 1 2 3 15 cat >$TRNMACRO <<'EOF' z %(%m=[nf]?.q^J:n)^(z^) ^m ^(z^) ^j ^(z^) EOF if test X$1 = X-d; then echo "z" | trn else echo "z" | trn >/dev/null 2>&1 fi rm -f $TRNMACRO exit 0 ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- >From the 2nd part of the FAQ: > >>>>> Note from Peter J. Kappesser <pjkappes@mailbox.syr.edu>: > > I tried this script, but it refuses to run as a cron job, complaining it > 'Can't open /dev/tty'. Another similar question is: I tried this script, but trn crashes when run as a cron job. Answer: This is a problem with no terminal being set in the cron-run environment, which is confusing trn. Trn 3.6 fixes this problem by assuming that if you don't have TERM set in your environment that your terminal is "dumb". Add the lines "TERM=dumb" and "export TERM" to your trnkill script to get this to work with older trns. Thanks again for maintaining this FAQ! -- Wayne Davison davison@borland.com
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