The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации | newsreaders

[news.software.readers] trn newsreader FAQ, part 1: Basics

Frequently-asked questions (and answers) about trn, a powerful, command-based USENET newsreader, and associated utility programs.
Posted-By: auto-faq 3.3 beta (Perl 5.004)
Archive-name: usenet/software/trn-faq/part1
Posting-Frequency: Posted on the 11th and 26th of each month.
Last-Modified: August 12, 1998
Version: 3.5.3 (of FAQ)
Changes-This-Version: Cliff Adams's e-mail address <[email protected]>;
	strn integrated into trn 4.0

These articles summarize some frequently-asked questions (and answers)
about the trn newsreader and associated programs such as Pnews and
Rnmail. Trn was written by Wayne Davison <[email protected]> who often
answers questions about it in news.software.readers. As he describes it,
"Trn is Threaded RN -- a newsreader that uses an article's references to
order the discussions in a very natural, reply-ordered sequence called
threads. Having the replies associated with their parent articles not
only makes following the discussion easier, but also makes it easy to
backtrack and (re-)read a specific discussion from the beginning. Trn
also has a visual representation of the current thread in the upper right
corner of the header, a thread/subject/article selector, etc. It is based
on rn, so it has all of rn's power and extensibility and a lot more."

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 KILL file FAQ" (See Subject: OODA below to find
it) for information regarding killfiles. Trn calls killfiles "memorized
commands" as it extends the capability quite beyond simply killing
undesired subjects.

This FAQ is maintained by Peter J. Kappesser <[email protected]>
and is archived at <URL:ftp://rtfm.mit.edu/pub/usenet/news.software.readers/>.
Anyone wishing to take over maintenance, please write.

OVERVIEW
> Subject: OWDB: Where do I begin?
> Subject: OODA: What other documentation is available?
> Subject: OCNN: How does trn compare to other popular newsreaders like nn?
> Subject: OLVW: What's the latest version of trn and where can I get it?
* Subject: OPFV: What's planned for future versions?

CONFIGURATION AND OPTIONS
> Subject: CUCF: How do I use a configuration file for trn?
> Subject: CSKF: I hate the way trn saves its killfiles! How can I change it?
> Subject: CSNG: How can I configure trn to keep from asking me to subscribe
>         to new newsgroups?
> Subject: CSRP: Can I get rid of the "hit return" prompts?
> Subject: CCHL: How can I customize my header lines?
> Subject: CWHT: Where can I find some hints and configuration examples?
> Subject: CVNF: How can I use various .newsrc with trn?
> Subject: CMLV: How can I make Pnews and Rnmail less verbose?
> Subject: CSGD: How can I set a save directory for a group that's not the
>         same as the name of the group?

USAGE
> Subject: UKAN: Trn suddenly keeps asking about new newsgroups!
> Subject: URJA: Whoops, I hit "n" before I was done reading an article. How
>         can I see it again?
> Subject: UGNG: Is there a way to go to a particular newsgroup more easily
>         than typing "g incredibly.long.newsgroup.name"?
> Subject: UAST: How can I automagically SELECT a thread instead of KILLING it?
> Subject: USMR: How can I keep track of replies to my posts?
> Subject: USST: Is there an easy way to save a specific thread, without
>         saving others I've also selected but haven't read yet?
> Subject: USPW: How can I select articles which contain a particular word
>         in the body?
> Subject: USSP: How to select based on my script that processes an article?
> Subject: USNA: How can I see only the new articles in trn?
> Subject: USNF: My .newsrc is huge, and I only read a couple dozen groups!
>         How can I cut it down?
> Subject: UJCA: What happens when I junk a crossposted article?
> Subject: USSS: How can I automatically select ONLY articles with
>         specific subjects?

------------------------------

Subject: OWDB: Where do I begin?
Contributor: <[email protected]> (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 (dated
August 15, 1994); and for trn 3.6 (dated January 4, 1995).  They share the
same text, except for the sections which discuss features that differ from
one version of trn to another. 

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".

(a) <URL:ftp://cs1.presby.edu/pub/trn-intro/>
(b) <URL: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 <[email protected]>]

------------------------------

Subject: OODA: What other documentation is available?
Contributor: Larry W. Virden <[email protected]>

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. These have both been incorporated into this
FAQ, under Subjects OLVW and CWHT in Part 1, and OVTC in Part 2.

3. There is the intro to trn document written by Jon Bell
<[email protected]> mentioned above. 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. See Subject: OSTR in Part 2 of this FAQ.

------------------------------

Subject: OCNN: How does trn compare to other popular newsreaders like nn?
Contributors: Nancy McGough <[email protected]>,
        Wayne Davison <[email protected]>,
        Tom Christiansen <[email protected]>,
        Lazlo Nibble <[email protected]>

Notation
========
 + is an advantage
 o is neutral
 - is a disadvantage
 ? is open to debate

NN 6.4.16
=========
+ easier macro language
+ more powerful kill/select abilities (ANDing, ORing)
+ 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)
+ incredibly customizable
+ more robust on-the-fly killfile entry construction
+ configurable "instant" entry creation ("Kill subject 30 days?")
+ any kill/select can be set to expire
+ 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
o faster auto killing/selecting
  [Davison: "I don't believe that nn is any faster at auto-killing than trn."]
o can split/unsplit digests
  [Davison: "If you are running the NOV-compatible version of nn this doesn't
  work."]
- does not thread
- 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.6
=======
+ 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: OLVW: What's the latest version of trn and where can I get it?
Contributor: Wayne Davison <[email protected]>

Trn 3.6 was released in November, 1994. One place to get it:

<URL:ftp://ftp.uu.net/networking/news/readers/trn/trn-3.6.tar.gz>

The patch to turn 3.5 into 3.6 is there as well:

<URL:ftp://ftp.uu.net/networking/news/readers/trn/trn-3.5-3.6.diff.gz>

There are .Z versions of the latest source available as well, and
mthreads resides in the same spot, if you need it.

Changes from trn 3.5 to trn 3.6:

   o	Added support for slow network connections by: (1) making use
	of the LIST ACTIVE <group.name> extension (if available),
	(2) beginning to display the received article as it is received
	from nntp, and (3) making the Pnews (posting) script query the
	group info more efficiently.
   o	Changed nntplist's command-line syntax slightly so that it is
        more orthogonal and so that it can pass an argument to LIST
	ACTIVE or LIST NEWSGROUPS.  ** If you use nntplist in your own
	scripts you'll need to switch them over to using the -o (output)
	option. **
   o	Added :p command to post from the selector.
   o	Added the Ctrl-E command to display the end of the current article.
   o	Enhanced the ':' command to operate on non-selected thread/articles
	(use ::cmd) or to operate on just the current thread (use :.cmd or
	::.cmd).
   o	Added a 't' modifier for the search command to start the search
	at the top of the group.  E.g.:  /subject string/t:+
	The default for searches in the selector has always been the top
	of the group, so this only affects the command while reading
	articles.
   o	Improved the catchup command to allow you to specify an article
	count to leave unread in the group.
   o	Added a new sort order for the article selector -- by 'n'umber.
   o	Enhanced the %( arg = regex ? : ) syntax to allow a % expansion
	in the regex portion of the comparison.
   o	Enhanced xref code to not go sub-optimal on C news's single-group
	xref lines.
   o	Added support for generic authentification (available in the
	reference NNTP 1.5.12 and INN 1.5).
   o	Fixed an elusive crash bug that would not let some people run
	trn from cron.
   o	Other misc. bug fixes.

For those wishing to take advantage of the slow-network enhancements,
look for nntp-1.5.12, ask Wayne Davison <[email protected]> for a
minor patch to INN 1.4, or wait for INN 1.5 (ask Rich Salz when that
will be).

------------------------------

Subject: OPFV: What's planned for future versions?
Contributor: Wayne Davison <[email protected]>

Trn 4.0 will allow multiple, simultaneous news sources to be open at the
same time (both local and remote) with full control over what
servers/local-directories are to be used available to each user (each
source needs its own .newsrc file).  You may either switch from server
to server, or have multiple newsrcs open at the same time (if a group is
available from multiple sources, it is read from the first newsrc that
has it available).  It even allows you to use a remote news source and a
local (or nfs-mounted) active file, all configurable at run-time.

Trn 4.0 also has a newsgroup selector and an add-group selector working,
but still needs some finishing touches. Cliff Adams's strn (see Subject:
OSTR in part 2 of this FAQ) is also integrated into trn 4.0.

Trn 4.0 will also run under MSDOS, and OS/2.

Test trn versions are available from
<URL:http://www.clari.net/~wayne>

------------------------------

Subject: CUCF: How do I use a configuration file for trn?
Contributors: Mark McLeod <[email protected]>,
        Peter J. Kappesser <[email protected]>

Set the environment variable TRNINIT to the name you want to use for the
configuration file (most people use $HOME/.trninit). The file itself can
contain option flag settings and environment variable assignments, using
the trn command syntax. See the example in Subject: CWHT below.

------------------------------

Subject: CSKF: I hate the way trn saves its killfiles! How can I change it?
Contributors: Peter J. Kappesser <[email protected]>,
        Wayne Davison <[email protected]>,
        Leanne Phillips <[email protected]>
        [Adapted from the rn KILL file FAQ and HINTS.TRN]

By default trn saves killfiles for each newsgroup in a file named KILL
in a subdirectory built from the name of the newsgroup, e.g.
~/News/news/software/readers/KILL. It is possible to change the
locations of your KILL files, by setting the environment variables
KILLGLOBAL and KILLLOCAL.  The most popular method is to put all the
files in one directory using the group name as the file name:

	KILLLOCAL="%p/Kill/%C"
        KILLGLOBAL="%p/Kill/Global"

Where %p is your news directory, usually ~/News, and %C is the full
name of the group, like sci.bio.  This means the kill file for sci.bio
is in ~/News/Kill/sci.bio instead of ~/News/sci/bio/KILL.  Think about
this next time you subscribe to alt.swedish.chef.bork.bork.bork :-) The
global kill file is in the same directory, with the name "Global".

Note that you need a file system that allows long file names to make
this work.

------------------------------

Subject: CSNG: How can I configure trn to keep from asking me to subscribe
        to new newsgroups?
Contributors: Robert Adelman <[email protected]>,
        Wayne Davison <[email protected]>

You can use the -q option, either from the command line or in your
.trninit file. If -q isn't what you want, always type 'N' at the
new-group prompt and trn will skip them all.

See also the AUTOUNSUBSCRIBE environment variable. There's a companion
AUTOSUBSCRIBE function too.  For example, to automatically unsubscribe
all NEW alt groups, use ^alt.*.  More dramatic, to unsubscribe to
everything BUT certain groups, use "*,!^local.*,!^comp.*", for example.
If you're REALLY tired of them, use -q to tell trn to not even check for
new groups at all.

------------------------------

Subject: CSRP: Can I get rid of the "hit return" prompts?
Contributors: Michael C Tiernan <[email protected]>,
        Wayne Davison <[email protected]>

Use -f (for fast) option or try using the -t (terse) option, to both
reduce the output and turn on the -f option (by default).

------------------------------

Subject: CCHL: How can I customize my header lines?
Contributors: Stan Ryckman <[email protected]>,
        Steven King, Software Archaeologist <[email protected]>,
        Wayne Davison <[email protected]>,
        Peter J. Kappesser <[email protected]>

> I would like to have trn add a header line of my choice, such as:
> "X-Disclaimer: Even I put no faith in what I write."

Look for the "NEWSHEADER" or "MAILHEADER" environment variables. The
best thing to do is to put it in your .trninit file (and point the
TRNINIT environment variable at the file if you haven't already done
so). 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
tweak the value as you desire.

The following lines represent trn's default headers for posting an
article.  If you want to customize your header copy this to your
.trninit file and modify it (and _don't_ use Pnews directly to post,
use trn -- the ".f" command from newsgroup prompt works well for this).
[Caution: Lines have been quoted with "> " to conform to FAQ minimal
digest format, which forbids "Subject:" at the beginning of a line in
the body of a section; and, the first line is longer than 80 columns.]

> -ENEWSHEADER="%(%[followup-to]=^$?:%(%[followup-to]=^%n$?: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))
>
> "

------------------------------

Subject: CWHT: Where can I find some hints and configuration examples?
Contributors: Peter J. Kappesser <[email protected]>,
        Wayne Davison <[email protected]>

Well, you could ftp the latest version of trn, uncompress and de-tar the
HINTS.TRN file... or I could just insert most of it here (the sections
not otherwise discussed in more depth elsewhere in this FAQ).

======================================================================
Certain environment variables, like RNINIT, must be set in your shell
(how else does trn know to look there for the rest?).  Others, like
REPLYTO may be useful in other programs, so you could consider putting
that in your shell startup file too. But most of them are specific, like
MAILHEADER, so you might as well set them in the init file with the -E
option.  That's why most of them look like -EMAILHEADER=xx rather than
MAILHEADER=xx -- to remind you.

Helpful hints:
  o Two new and useful flags are the -p and -G flags.  -p means automatically
    select any thread that you have posted a message to.  This makes it very
    easy to track replies to your insightful comments :-) (to automatically
    select other threads, try the 'T' command).  -G tells the 'g' command
    to use a loose match algorithm on groups it can't find.  So if you type
    "g news.softwre.raeders.genrl", it will assume that you meant to type
    news.software.readers and take you there.  It is usually easier to type
    "/reader" than using a 'g' command, but use -G too.

  o The 'X' command in the selector (kinda like catchup/yes) can be made the
    default action on the last page of selections by using the command-line
    option:  -XX.  This lets you browse all the pages, making selections as
    you go, and then mark everything that was not selected as read when you
    press space at the last page.

  o If you like to select a little, read a little, and then select a little
    more, try using the command-line option:  -XDD.  This makes the 'D'
    command the default on all pages of the selector.  Thus you can select
    the things you want to read on the current page, press space, and you
    will read the selected articles immediately (if there were any).  All
    other articles on the current page will be marked as read.

  o To use mush to send all R)eplies:
	-EMAILPOSTER="mush -h %h"

  o To use elm to send all R)eplies:
	-EMAILHEADER="\\000"
	-EMAILPOSTER="elm -i %h -s '%'s' %t"

  o To tailor the time field:
	A good example is -ELOCALTIMEFMT="%A, %B %e %Y, %r %Z" which becomes:
	Date: Saturday, June 12 1993, 08:15:32 PM PDT.  (The default is
	"%a %b %e %X %Z %Y", which is like the date(1) command).  See the
	strftime(3C) man page for more details on other % characters.

  o To tailor the "In article <blahblahblah>, joe@user (Joe User)" line:
	person's name only: %)f
	person's address only: %>f
	For example: -EATTRIBUTION='According to %)f <%>f>:'

  o If you want replies to your postings to go to a machine other than the
    machine you're posting from, set the REPLYTO environment variable.  For
    example, you might set this if you were trn's author:
	-EREPLYTO="[email protected] (Wayne Davison)"

  o You might like to redefine the 'u' keys in the following way:  'u' visits
    the "Set unread?" prompt (except in the thread selector), 'U' goes
    directly to the already-read article selector, and Ctrl-U unsubscribes
    from the group (even while in the thread selector).  Put the following
    3 macros in your .rnmac file to accomplish this (or change TRNMACROS to
    .trnmac and put them there):

	u	%(%m=[aefnp]?U:u)
	U	%(%m=[aefnp]?U+:U)
	^U	%(%m=t?+u:u)

  o If you like to be able to move forward/backward by article number more
    often than you need to search by subject, redefine ^N and ^P to be _N
    and _P by putting these lines into your macro file:

	^P	%(%m=[aep]?_P:^P)
	^N	%(%m=[aep]?_N:^N)

  o If you like the way that 'q' worked in the thread selector in trn 1.x,
    put the following macro in your macro file:

	q	%(%m=t?+:q)

  o If you would like the 'f' command to always answer yes to the "Are you
    starting an unrelated topic?" question, put this line into your macro
    file:

	f	%(%m=[ap]?fy^m:f)

  o If you want to be able to save your shar headers in a file as they are
    extracted and you have access to "unshar" (a program that can extract
    shar files while saving the headers in UNSHAR.HDR), twiddle the external
    extract command to send the entire article:

	-EEXSAVER="%e <%A"

    and then point the UNSHAR variable at unshar instead of /bin/sh:

	-EUNSHAR="unshar -s"

    Note that this assumes that any other commands you execute with
    "e dir|command" can also handle the entire article as input
    (uuencoded and shipped files are not affected).

If you're curious, trn's author has the following .trninit file:
======================================================================
-XX -B -N -f -x11ms "-F> " -pp -G -u +e -mu
-hunrecognized
-ELOCALTIMEFMT="%A, %B %e %Y, %r %Z"
-ESELECTCHARS="abdefgijlmorstuvwxyz1234567890BCFGHIKVW"
-EKILLLOCAL="%p/Kill/%C"
-EKILLGLOBAL="%p/Kill/Global"
-EMAILPOSTER="elm -i %h -s '%'s' %t"
-EFORWARDPOSTER="elm -i %h -s '%'[subject]' %q"
-EATTRIBUTION="According to %)f <%>f>:"
======================================================================

and the following .trnmac file:
======================================================================
u	%(%m=[aenp]?U:u)
U	%(%m=[aenp]?U+:U)
^U	%(%m=t?+u:u)
o	%(%m=[nf]?O:o)
O	%(%m=[nf]?o:O)
~T	s ~/Mail/trn
~M	| /bin/mail davison
^[^[	^[
======================================================================

------------------------------

Subject: CVNF: How can I use various .newsrc with trn?
Contributor: Steven King <[email protected]>

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: CMLV: How can I make Pnews and Rnmail less verbose?
Contributors: Matt Foley <[email protected]>,
        Wayne Davison <[email protected]>

> How do I get rid of the "you'll be spending money if you post this"
> message, as well as the rest of the defaults?  I would like to be able
> to hit r, R, f, or F and have trn jump into vi with the signature file
> already attached.

Make sure you're running a modern version of trn with the latest Pnews
installed and set the environment variable FAST_PNEWS=y either in a
.trninit file or in a .login/.profile shell script and the prompts for
posting vanish.  To have a signature file already attached, use
~/.news_sig instead of ~/.signature (see the Pnews man page).

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.

For the reply-side, if you have a smart mailer you can by-pass the
Rnmail script completely.  I have the following definitions in my
.trninit file to call elm directly with the correct info:

-EMAILPOSTER="elm -i %h -s '%'s' %t"
-EFORWARDPOSTER="elm -i %h -s '%'[subject]' %q"

In this case you'll have to use elm's signature-handling, since
this by-passes the Rnmail script completely (i.e. ~/.mail_sig
handling is done in this script).

Alternately, you could tweak the Rnmail script and use the modified
version.  See the default definitions for MAILPOSTER and FORWARDPOSTER
in the trn man page for what to plug into these variables to use a
modified script.

------------------------------

Subject: CSGD: How can I set a save directory for a group that's not the
        same as the name of the group?
Contributor: Wayne Davison <[email protected]>

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.

------------------------------

Subject: UKAN: Trn suddenly keeps asking about new newsgroups!
Contributors: Duncan Gibson <[email protected]>, 
	Erez Zadok <[email protected]>,
	Peter Kappesser <[email protected]>,
	

Since January 1, 1996 on some systems, every time users run trn, they may be
asked whether they want to subscribe to new newsgroups which they have
previously declined by answering 'n' or 'N'. The reason is that, as of the
first second of 1996, trn miscomputed the number of leap years, and was
therefore off by one whole day, reporting that the date of the news server was
exactly 24 hours into the future, thus thinking that these "new" newsgroups
could not have been seen at all.

System administrators will have to patch and reinstall trn (see Subject: BLYC
in Part 2 of this FAQ) to fix this problem. Users can work around it by
running trn with the -q option (to ignore new newsgroups) or by answering 'y'
or 'Y' when prompted, then unsubscribing in the newsgroup selector.

------------------------------

Subject: URJA: Whoops, I hit "n" before I was done reading an article. How
        can I see it again?
Contributors: Mike Castle <[email protected]>,
        Peter J. Kappesser <[email protected]>,
        Wayne Davison <[email protected]>

'-' toggles between the last two entered articles, read or not. If you
know the subject line, or even part of it, type:

/searchstring/m

and that will mark the article as unread so you can read it again.
If you happen to know the number of the article, simply typing the
number would have taken you to that article. Or, in the article
selector, type "U" to select from articles marked as read.

'<' goes back to the previous subject/thread that you just killed.  If
this was the last one before jumping back into the selector, type '+' to
quit the selector instead and you'll be at the article you read last.

Once you're in the already-read thread you can use "Ut" if you want to
mark it as unread and just 'n' your way through it again.  OR use the
arrow keys to navigate the tree to the spot you left off and use "Us"
to set just a sub-thread unread. OR you might find it more convient
to just use 'N' to navigate through the already-read articles.

Finally, if you accidentally lose a whole bunch of articles (like you
pressed 'X' in the selector accidentally) you can restore the group's
state to what it was when you started trn by using the 'A' (abandon)
command at the newsgroup prompt for the group.

------------------------------

Subject: UGNG: Is there a way to go to a particular newsgroup more easily
        than typing "g incredibly.long.newsgroup.name"?
Contributors: Nancy McGough <[email protected]>,
        Peter J. Kappesser <[email protected]>,
        Tim Pierce <[email protected]>
        Steven King, Software Archaeologist <[email protected]>

At the newsgroup selection level just type:

  /string

and it will prompt you with the next newsgroup in your .newsrc that
contains "string", which can contain wildcards like filenames. So,
"/long*name" would go to the first group that matched that pattern.
Unlike filename globbing, the pattern is not anchored: e.g., "/fur" will
find "alt.fan.furry." You may use ^ or $ to anchor to the front or back
of the string, such as "/^misc" to find a group in the misc.* hierarchy
but avoid any *.*.misc groups.

If you want to read several groups matching the same pattern, use the
"o" command, e.g. "o ^rec" to see only the rec.* groups in your .newsrc.
To get back to normal operation and read other groups, type "o" alone;
the restriction is automatically removed when there are no articles left
in the matching set of newsgroups.

Trn also has a "fuzzy" newsgroup name-matching option. If you can
remember something close to the newsgroup name, trn will figure it out.
This is activated with the -G option in your .trninit file, or set from
the command line with &-G. It does make name matching a bit slower, so
it's not on by default.

------------------------------

Subject: UAST: How can I automagically SELECT a thread instead of KILLING it?
Contributors: Logan Shaw <kronos.arc.nasa.gov>,
        Paul Tomblin <[email protected]>,
        Peter J. Kappesser <[email protected]>,
        Jon Bell <[email protected]>

> What I want is to be able to select a thread, and then have trn
> -remember- that the thread was selected and automagically select it in
> the next session.  This would be like the opposite of killing a thread.

Check out the 'T' command in the man page. From the selector, you may
select the thread (+), junk the thread (j), or clear the auto-selection/
junking for the thread (c). On the article level, you may also select an
article and its replies (.), junk an article and its replies (,), or
clear the auto-selection/junking for an article and its replies (C).

Here're two ways to use it:

(1) While reading a thread, hit 'T', then hit '+' at the prompt which 
follows.  This dumps the message-ID's of all the articles in the thread 
into your killfile as "followup-selection" commands, so that all 
follow-ups to them will be selected automatically in the future.  As the 
articles expire, so do the corresponding selection commands, so you don't 
have to worry about cleaning out your killfile.

(2) After selecting one or more threads in the thread selector, type 
':T+' and hit 'return' or 'enter'.  This does something similar to the 
above.  

----------------------------

Subject: USMR: How can I keep track of replies to my posts?
Contributors: Michael C Tiernan <[email protected]>,
        Mike Castle <[email protected]>,
        Paul Tomblin <[email protected]>

> Can trn show me or select for me any articles that were posted
> to a newsgroup in reply to one of my messages?  This way, when I
> come to a group, I can automagically follow a discussion without
> having to try to remember what it was that I was involved in?

Use the -p option, which tells trn to auto-select your postings and
their replies as it encounters them in the various groups you read.
The -pp option selects the article you're replying to, and any replies
to it including your own. Very handy. The man page explains various
other options.

If it seems some threads with your posts aren't getting selected when
you first enter a newsgroup (especially if you crossposted a followup),
you may also want to set the -a option. Without -a, trn enters a group
with the minimum processing necessary, and that doesn't include scanning
already-read articles (that's what the -a option is for). In such a
case, the crossposted group doesn't have an auto-select command for your
posting until after it scans all of the already-read articles in the
group and finds that there's a posting from you that it should be
processing. At this point the selector has already been displayed and so
you probably don't see the fact that some followups just got selected.

------------------------------

Subject: USST: Is there an easy way to save a specific thread, without
        saving others I've also selected but haven't read yet?
Contributors: Neklan <[email protected]>,
        Wayne Davison <[email protected]>,
        Ian T. Zimmerman <[email protected]>, Mike Castle <[email protected]>

> 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 want 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?

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.

Trn 3.6 has a single-thread command similar to ":cmd" that makes this easy.

Unfortunately, if you exhaust all the articles in B (read them to the
end) before deciding on saving that thread, they're marked as read, and
you have to use 'U' to get them back. You could design a macro to help
by automating the retrieval keystrokes, though it's possible that if you
read the same thread the next day, you'll save the same messages twice.

------------------------------

Subject: USPW: How can I select articles which contain a particular word
        in the body?
Contributors: Perry Hutchison <[email protected]>,
        Wayne Davison <[email protected]>

> I want to select any articles in a particular group which mention
> "oregon" in the body or subject.  The obvious solution is
>
>       /oregon/a+

One thing you can do is to put \b before and after a word you wish to
match (\b matches a word boundary):

        /\boregon\b/a+

This would keep it from matching uoregon but would not stop it from
matching a sitename of just oregon in the path, if such a site exists.

If you want to disregard the header in your search, try:

   /search string/b:+

Using the 'b' modifier only searches the body of the article, and it
stops searching at the "-- \n" line which most(?) people still use to
delimit their signature.  This will let you find something in the body
of the article without hitting a header and without hitting (most)
signatures. [It will not ignore attribution lines, however.]

------------------------------

Subject: USSP: How to select based on my script that processes an article?
Contributors: Larry W. Virden <[email protected]>,
        Wayne Davison <[email protected]>

> 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.

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 -- it's fixed in version 3.6), so with older
versions 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 don't have to jump through this hoop
to get this to work.

------------------------------

Subject: USNA: How can I see only the new articles in trn?
Contributor: Wayne Davison <[email protected]>

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 are
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 don't have 3.6, 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.

------------------------------

Subject: USNF: My .newsrc is huge, and I only read a couple dozen groups!
        How can I cut it down?
Contributors: Peter J. Kappesser <[email protected]>,
        Mike Castle <[email protected]>

You can edit the .newsrc with any text editor. Subscribed groups are
indicated with a ":", unsubscribed with a "!". So, find and delete any
line with a "!" to eliminate unsubscribed newsgroups. From a Unix shell
prompt, the easy way is:

cp .newsrc .newsbak ; grep ":" .newsbak > .newsrc

The only disadvantage I've seen so far is when I subscribe to a
(previously) completely unsubscribed newsgroup, I may see some
crossposted articles I'd seen before. Big deal.

You may need to run trn with the -q option if your news server does not
support an accurate NEWGROUPS command -- i.e. if you get prompted to add
all of those unsubscribed newsgroups. Your sysadmin may need to
reinstall trn to enable this, after which you won't have to run trn with
the -q option, you'll maintain a smaller .newsrc file, and still be
informed of new groups as they're created.

------------------------------

Subject: UJCA: What happens when I junk a crossposted article?
Contributors: David Lee Brown <[email protected]>,
        Wayne Davison <[email protected]>

> If I put
> 		/,/Hnewsgroups:k
> in a local KILL file, will it delete all occurances of the article, or
> all of them but the one in the newsgroup?

If you tell trn to junk an article then it gets junked in all groups.  If
you wanted to kill it in all other groups but this one, you could junk it
and then mark it as unread:

	/,/Hnewsgroups:jm

In trn 3.6 there's a command to junk an article only in the current
group (/search/:x) so to do the opposite of what you want, you'd use
/,/Hnewsgroups:x.

Some people use this to weed out discussions in a group without affecting
a topic that is cross-posted to a more interesting group.

------------------------------

Subject: USSS: How can I automatically select ONLY articles with
        specific subjects?
Contributors: Ian T Zimmerman <[email protected]>,
        Wayne Davison <[email protected]>, Goran Edvardsson <[email protected]>

> In some newsgroups, I want to only read articles with specific subjects.
> So I have put the following in the killfiles for these groups:
>
> /^/j
> /foo/m
> /bar/m
>
> It works OK, except that trn seems _never_ to prepend a THRU line and so
> I keep getting month old articles on foo & bar back! what's the deal?

As mentioned in the command help, the 'm' command implies an 'r' modifier,
thus the commands are actually /foo/r:m and /bar/r:m -- both of which are
supposed to ignore the THRU line. Instead, with older versions of trn,
use:

/foo/-:M
/bar/-:M
/^/j

Newer versions make it simpler:

/foo/+
/bar/+
*X

This selects the items you're interested in and then (if you so desire)
the *X command tells trn to junk everything that isn't selected.  If you
leave it off you can read all of the selected articles first and then
browse through the remaining articles at your leisure. (Versions before
3.6 kept the remaining articles selected; but with 3.6, since you just
killed all non-selected articles there's no need to keep them selected.
If you just want to read them, press TAB (or 'Z').  Otherwise it is now
easier to browse through the remaining articles and select only the ones
you *really* want to read.)

[In general, the '*' kill file commands in later versions make it easier
to do certain article-killing things.  One such command is *j which
junks all of the unread articles, and the other is *X which junks all
but the selected articles.]

In other cases where you're selecting articles based on a pattern, you
may need to unset the -k switch (put "+k" in your .trninit). This tells
trn to observe the THRU line when processing selection searches (i.e.
searches with a command portion that starts with a '+' or a '.') in the
memorized commands (aka kill files). By default, trn runs with this
option set (-k), ignoring the THRU line for selection searches.

------------------------------
End of trn newsreader FAQ, part 1/2.



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру