v23i060: Complete reposting of TRN at patchlevel 1, Part01/14

Rich Salz rsalz at bbn.com
Fri Jan 4 04:53:55 AEST 1991


Submitted-by: Wayne Davison <0004475895 at mcimail.com>
Posting-number: Volume 23, Issue 60
Archive-name: trn/part01

[  Notes from the moderator:
    This is a complete reposting of TRN, the "thread-following" RN
    newsreader.  Patch one has been applied.  The unipatch program, which
    was needed to apply the patch, has been included, in case future
    patches also need it.  A description of the patch appears below.

    Once you have unpacked all the kits, you will have to do the following:
	1.  Create the Configure script out of the two parts:
		cat Configure.0? >Configure
		rm Configure.0?
	2.  Check Configure to ensure that WHITE and CTRLA (near the top)
	    have a Tab-Space and a Ctrl-A in them, respectively.
	3.  Create the trn manpage out of the two parts:
		cat trn.1.0? >trn.1
		rm trn.1.0?
  --r$  ]

Trn v1.0.1 has the following changes:

   o	Two structures in the thread database have been padded to provide
	a more portable database format.  The first time you run the new
	mthreads, it will detect the old database version number (in the
	db.init file), write a new db.init file, and re-generate all the
	thread files.  This will undoubtedly take more time than a regular
	update.

	If you are really adventurous (or KNOW that your machine is the
	kind that pads a 10-byte structure to be 12 bytes), you could
	remove the db.init file before running the new mthreads, and thus
	trick mthreads into skipping the database rebuild.  If you guess
	wrong, you'll need to manually remove all the thread files before
	running a "mthreads -f" to fix it.

   o	Mthreads' user interface has been significantly enhanced.  The
	command-line hierarchy has been modified to specify one or more
	groups to enable or disable thread processing for, which should
	eliminate the need for manual editing of the active2 file.  For
	example, running the command:

		mthreads comp,talk,!control

	would turn on processing for the comp and talk hierarchies, and
	turn off thread processing for control.  Mthreads automatically
	adds and removes thread files as needed.  New command-line options
	include:  -k (kill running mthreads process), -n (no thread process-
	ing, just turn groups on and off), -a automatically thread new groups,
	and -D debug mode.  See the new mthreads manpage for more details.

   o	Configure and mbox.saver.SH have been enhanced to deal with the
	MMDF mailbox format (message separator is ^A^A^A^A).  Pnews and
	Rnmail have been changed to use the mbox.saver instead of assuming
	unix-format messages.

   o	Configure does a better job of determining signal()'s return and
	tries harder to figure out if tzset() is available.

   o	Added a new Configuration option to read the site name from a file.
	This will aid sites that wish to use host hiding to route all their
	mail through one host address.

   o	Fixed a bug in the article opening routine when running trrn and
	attempting to open article #0 (an empty node).

   o	Changed mthreads to output '#' instead of '+' to avoid disconnecting
	Hayes-compatible modems.

   o	Fixed a problem in the handling of xrefs that point to groups that
	haven't yet been processed by mthreads.

   o	Fixed the backpager to backup over ^L's in articles.

   o	Reverted the default command for non-threaded groups to 'y' instead
	of '='.

   o	Added a warning message to trn when it can't find the db.init file.

   o	Added a check for interrupt in the new-newsgroup handling code
	that will allow you to break out of the prompts.

   o	Tweaked the byte-order determining code to work around dumb optimizers.

   o	Changed my address to our newly-registered domain.

Thanks for all the bug-reports/fixes/praise/etc!  I appreciate the input.
Enjoy!
-- 
 \  /| / /|\/ /| /(_)     Wayne Davison
(_)/ |/ /\|/ / |/  \      davison at dri.com	<<-- new domain name!
   (W   A  Y   N   e)     ...!uunet!drivax!davison

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix at uunet.uu.net if you want that tool.
# Contents:  README trn.1.01
# Wrapped by rsalz at litchi.bbn.com on Thu Dec 27 11:33:56 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo '          "shar: End of archive 1 (of 14)."'
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
  echo shar: Extracting \"'README'\" \(9081 characters\)
  sed "s/^X//" >'README' <<'END_OF_FILE'
X			Trn Kit, Version 1.0
X
X		    Copyright (c) 1985, Larry Wall
X		   Copyright (c) 1990, Wayne Davison
X
XYou may copy the trn kit in whole or in part as long as you don't try to
Xmake money off it, or pretend that you wrote it.
X--------------------------------------------------------------------------
X
XPlease read all the directions in this file (following the brief description
Xof trn) before you proceed with the installation.  Failure to do so may void
Xyour warranty. :-)
X
XAfter you have unpacked your kit, you should have all the files listed
Xin MANIFEST.
X
X
XWhat is trn?
X------------
XTrn is "Threaded RN" -- a newsreader that uses an article's "References:"
Xto order the discussions in a very natural, reply-ordered sequence called
X"threads."  Having the replies associated with their parent articles not
Xonly makes following the discussion easier, but also makes it easy to back-
Xtrack and (re-)read a specific discussion from the beginning.  Trn also
Xhas a visual representation of the current thread in the upper right corner
Xof the header, which will give you a feel for how the discussion is going
Xand how the current article is related to the last one you read.
X
XIn addition, a thread browser/selector has been added to make life in the big
Xnewsgroups much easier to live with.  It also allows you to quickly browse
Xthrough already-read articles and select the one(s) you wish to read again.
XOther new features include an extract command for the source and binary groups,
Xthread-oriented kill directives, and additional "magic" in the header display.
X
XTo use all the new features of trn will require the maintenance of a thread
Xdatabase, which is handled by the included database manager.  The amount of
Xspace required is around 5% of your newsspool size (either in /usr/spool/news
Xor on another partition), but you can choose to only keep thread information
Xfor a select portion of the newsgroups if you wish -- unthreaded groups are
Xread in an rn-compatible manner.
X
XTrn can be optionally compiled as trrn -- a NNTP-compatible newsreader that
Xlets you access news from a remote news server.  Each client machine must
Xmaintain their own database, either via the NNTP version of the database
Xmanager, or by sharing the server's thread files through some other means.
X
XTrn is based on the source to Larry Wall's rn (patchlevel 47), and the threaded
Xextensions are fully conditionalized.  Thus, it is possible to use this source
Xto compile both trn and (a slightly enhanced version of) rn.  In fact, it is
Xpossible to install trn as both rn and trn (linked together) to maintain only
Xone newsreader on a system where people wish to continue to use rn.
X
XAlso, I'd like to publicly thank all the people who have helped me in testing
Xtrn -- without their input, trn would have been much less compatible with all
Xthe Unix and Xenix systems out there, and not as easy to use:
X
XBrandon S. Allbery, Chip Rosenthal, Chip Salzenberg, David C Lawrence,
XEric Schnoebelen, George H. Martin, Guy Harris, Jason Molenda, Jaye Mathisen,
XJeff Sparkes, Jon Zeeff, Kurt Gollhardt, Linus Tolke, Mitchell F. Wyle.
X
XThanx guys!
X
X
XInstallation
X------------
X0)  Decide if you want to compile the newsreader as trrn (threaded remote
X    rn) to read its articles using NNTP from a news server, or as regular
X    trn to read the articles from the news spool directory (which could be
X    mounted locally or via NFS).  The thread database created by mthreads
X    must be accessable on each machine, which means that NNTP machines will
X    need to maintain a local copy (usually by running the NNTP version of
X    mthreads), or share a common copy.  By choosing to create trrn (at the
X    appropriate prompt in Configure), you will enable the NNTP code in both
X    trn and mthreads.  Be sure you have installed your NNTP client (including
X    the NNTP inews and the file that contains the name of the NNTP server)
X    before running Configure.  Trrn expects at least NNTP version 1.5.
X
X    Decide if you want to install trn as both rn and trn linked together.
X    It is possible to configure trn to check the first letter of its name
X    and only turn on the threaded extensions if it is a 't'.  Thus, you
X    only have to maintain one newsreader package that is both a "normal"
X    rn and has all the extensions of trn available for the asking.
X
X    Also decide where you want to put the thread files.  The recommended
X    spot for people with over 5% of your /usr/spool/news size free is to
X    place a ".thread" file in each spool directory.  The other alternative
X    is to create a directory for them (possibly on another drive) and enter
X    this path at the appropriate Configure question.  Remember that you are
X    not required to create thread files for all groups.  Some sites choose
X    to only thread high-volume discussion groups (see the mthreads manpage),
X    which will lower the amount of space required for thread files.
X
X    ** If you got trn in shar format, check Configure to ensure that WHITE
X    and CTRLA have a Tab-Space and a Ctrl-A in them, respectively. **
X
X1)  Run Configure.  This will figure out various things about your system.
X    Some things Configure will figure out for itself, other things it will
X    ask you about.  It will then proceed to make config.h, config.sh, Makefile,
X    and a bunch of shell scripts.  It will also do a make depend for you, or
X    let you start one in the background.  You might possibly have to trim #
X    comments from the front of Configure if your sh doesn't handle them, but
X    all other # comments will be taken care of.
X
X2)  Glance through config.h and common.h to make sure system dependencies
X    are correct.  Most of them should have been taken care of by running
X    the Configure script.
X
X    If you have any additional changes to make to the C definitions, they
X    can be done in the Makefile, in config.h, or in common.h.  If you have
X    strange mailboxes on your system you should modify mbox.saver to correctly
X    append an article to a mailbox or folder.
X
X    If you are on a machine with limited address space, you may have to
X    remove some of the special functions of trn to make it fit.  This is
X    easily done by undefining symbols in the System Dependencies section
X    of common.h.  You should run "make depend" again to be safe.
X
X3)  make
X
X    This will attempt to make trn in the current directory.
X
X4)  make install
X
X    This will put trn, newsetup, newsgroups, Pnews, and Rnmail into a public
X    directory (normally /usr/local/bin), and put a number of files -- including
X    mthreads (the database manager executable) -- into the private trn library
X    (e.g. /usr/local/lib/trn).  It will also try to put the man pages in a
X    reasonable place.
X
X5)  Once trn is compiled, you need to create some thread data to be
X    able to use all the new features.  If you like, you can start small
X    with a command like:  "mthreads rec.humor.funny", process a few more
X    groups with the command "mthreads news", and then turn them all on
X    with the command "mthreads all".  Read the mthreads manpage for
X    complete details.
X
X6)  Read the trn manual entry before running trn, or at least read the file
X    NEW if you are already familiar with rn.
X
X7)  Try trn, and play with some of the switches.  You may want to make -X
X    the default on your system (you might have done this already in Configure).
X    This is done by changing SELECT_INIT in config.h.  You may also want to
X    modify which header lines are displayed by default and which are magic --
X    This is done in head.h.
X
X    To change default values of enviroment variables on a system-wide basis
X    without recompiling trn, put the switches into the file INIT in the trn
X    library.
X
X8)  Arrange to have the mthreads command of your choosing run on a regular
X    basis.  If you run with the daemon flag, you can start it from the boot
X    sequence (make sure it is su'ed appropriately), or even run it daily
X    out of cron (if it's already running, the new version will exit).  If
X    you run mthreads in single-pass mode, you'll want to have cron execute
X    it on a regular basis with the standard-output redirected to /dev/null.
X
X9)  IMPORTANT!  Help save the world!  Communicate any problems and suggested
X    patches to davison at dri.com (...!uunet!drivax!davison) so we can keep
X    everyone in sync.  If you have a problem, there's someone else
X    out there who either has had or will have the same problem.  Please
X    don't bother either Larry Wall or Stan Barber with bugs that you
X    find in trn.  If the bug is applicable to mainstream rn code, I
X    will pass it along.
X
X    If possible, send in patches such that the patch program will apply them.
X    Context diffs are the best, then normal diffs.  Don't send ed scripts--
X    I've probably changed my copy since the version you have.
X
X    Watch for trn patches in news.software.b or comp.sources.bugs.  Patches
X    will always be in context diff format, to be applied by the patch program.
X
X10) If you are going to hack on trn, please refer to rn's HACKERSGUIDE first.
END_OF_FILE
  if test 9081 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
  fi
  # end of 'README'
fi
if test -f 'trn.1.01' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'trn.1.01'\"
else
  echo shar: Extracting \"'trn.1.01'\" \(49649 characters\)
  sed "s/^X//" >'trn.1.01' <<'END_OF_FILE'
X''' $Header: trn.1,v 4.3.3.2 90/08/20 16:50:51 davison Trn $
X''' 
X''' $Log:	trn.1,v $
X''' Revision 4.3.3.2  90/08/20  16:50:51  davison
X''' Changed email address.
X''' 
X''' Revision 4.3.3.1  90/07/24  21:30:38  davison
X''' Initial Trn Release
X''' 
X''' Revision 4.3.1.9  90/05/08  22:05:11  sob
X''' Added documentation for new -q flag
X''' 
X''' Revision 4.3.1.8  90/03/17  17:09:56  sob
X''' 
X''' added documentation for MODSTRING and NOPOSTRING.
X''' 
X''' Revision 4.3.1.7  89/11/28  00:28:10  sob
X''' Changed some usages of "say" and "saying" to "type" and "typing"
X''' 
X''' Revision 4.3.2.1  89/11/26  19:00:39  sob
X''' Added modifications to reflect reality.
X''' 
X''' Revision 4.3.1.5  85/09/10  11:05:55  lwall
X''' Improved %m in in_char().
X''' 
X''' Revision 4.3.1.4  85/07/23  18:26:40  lwall
X''' Added MAILCALL.
X''' 
X''' Revision 4.3.1.3  85/05/23  17:14:14  lwall
X''' Now allows 'r' and 'f' on null articles.
X''' 
X''' Revision 4.3.1.2  85/05/13  09:27:53  lwall
X''' Added CUSTOMLINES option.
X''' 
X''' Revision 4.3.1.1  85/05/10  11:38:22  lwall
X''' Branch for patches.
X''' 
X''' Revision 4.3  85/05/01  11:48:26  lwall
X''' Baseline for release with 4.3bsd.
X''' 
X''' 
X.de Sh
X.br
X.ne 5
X.PP
X\fB\\$1\fR
X.PP
X..
X.de Sp
X.if t .sp .5v
X.if n .sp
X..
X.de Ip
X.br
X.ie \\n.$>=3 .ne \\$3
X.el .ne 3
X.IP "\\$1" \\$2
X..
X'''
X'''     Set up \*(-- to give an unbreakable dash;
X'''     string Tr holds user defined translation string.
X'''     Bell System Logo is used as a dummy character.
X'''
X.tr \(bs-|\(bv\*(Tr
X.ie n \{\
X.ds -- \(bs-
X.if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
X.if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
X.ds L" ""
X.ds R" ""
X.ds L' '
X.ds R' '
X'br\}
X.el\{\
X.ds -- \(em\|
X.tr \*(Tr
X.ds L" ``
X.ds R" ''
X.ds L' `
X.ds R' '
X'br\}
X.TH TRN 1 LOCAL
X.UC 6
X.SH NAME
Xtrn - threaded read news program
X.SH SYNOPSIS
X.B trn [options] [newsgroups]
X.SH DESCRIPTION
X.I Trn
Xis a threaded version of
X.I rn,
Xwhich is a replacement for the readnews(1) program.
XBeing \*(L"threaded\*(R" means that the articles are interconnected
Xin reply order.
XEach discussion thread is a tree of articles, where all the
Xreply (child) articles branch off from their respective originating
X(parent) articles.
XA representation of this tree (or a portion of it) is displayed in the
Xarticle header as you are reading news.
XThis gives you a better feel for how all the articles are related, and
Xeven lets you see at a glance when an article already has a plethora of
Xreplies (to avoid beating a subject to death).
XIn addition,
X.I trn
Xhas a thread selector menu that allows you to quickly browse
Xthe subjects and authors of the available threads and choose the
Xones you find interesting.
XThe remaining threads can either be saved for later or marked as read.
X.PP
XIf you are already familiar with
X.I rn
Xyou will probably want to skip forward to the section on the
X.IR "Thread Selection Mode" ,
Xthen move on to read about the
X.IR "Tree Display" ,
Xand finish with the summary of
X.IR "What's New" ?
Xwith
X.IR trn .
XIf you're impatient, just dive in and get started.
XAll the regular commands are the same as those in
X.IR rn ,
Xand the on-line help will give you a quick run-down of what new commands are
Xavailable.
XJust type \*(L'h\*(R' from any prompt.
XI'd suggest using the command:
X.Sp
X    trn \-x \-X
X.Sp
Xto make sure some of the best new features are turned on.
X.Sh "Starting Trn"
XIf no newsgroups are specified, all the newsgroups which have unread news
Xare displayed, and then the user is asked for each one whether he wants to
Xread it, in the order in which the newsgroups occur in the
X.I .newsrc
Xfile.
XWith a list of newsgroups,
X.I trn
Xwill start up in \*(L"add\*(R" mode, using the list as a set of patterns to
Xadd new newsgroups and restrict which newsgroups are displayed.
XSee the discussion of the \*(L'a\*(R' command on the newsgroup selection
Xlevel.
X.PP
X.I Trn
Xoperates on four levels: the newsgroup selection level, the thread
Xselection level, the article selection level, and the paging level.
XEach level has its own set of commands, and its own help menu.
XAt the paging level (the bottom level),
X.I trn
Xbehaves much like the
X.IR more (1)
Xprogram.
XAt the thread selection level, you are presented with the subjects and
X(optionally) authors associated with each discussion thread, and given
Xa chance to choose which ones you wish to read now, save for later, or
Xmanipulate in some way.
XAt the article selection level, you may read them in the default order
X(which follows the discussion of the articles and their replies), or jump
Xaround from one article to another.
XAt the newsgroup selection level (the top level), you may specify which
Xnewsgroup you want next, or read them in the default order, which is the
Xorder that the newsgroups occur in your
X.I .newsrc
Xfile.
X(You will therefore want to rearrange your
X.I .newsrc
Xfile to put the most interesting newsgroups first.
XThis can be done with the \*(L'm\*(R' command on the Newsgroup Selection level.
XWARNING: invoking readnews/vnews (the old user interface) in any way (including
Xas a news checker in your login sequence!) will cause your
X.I .newsrc
Xto be disarranged again.)
X.PP
XNote:  your news administrator has the option of turning thread processing
Xoff for individual groups, and thus it is possible for some groups to not
Xhave any thread information available for
X.I trn
Xto use.
XWhen this happens the group will be displayed in the traditional
X.I rn
Xfashion\*(--articles arranged in arrival order with optional subject
Xsearching and no thread selector.
X.PP
XOn any level, at ANY prompt, help is available in the form of a summary of
Xavailable commands and what they do by typing an \*(L'h\*(R'.
XThis is probably the most important command to remember, so don't you
Xforget it.
X.PP
XTyping space to any question means to do the normal thing.
XYou will know what that is because
Xevery prompt has a list of several plausible commands enclosed in
Xsquare brackets.
XThe first command in the list is the one which will be done if you type
Xa space.
X(All input is done in cbreak mode, so carriage returns should not be typed
Xto terminate anything except certain multi-character commands.
XThose commands will be obvious in the discussion below because they take an
Xargument.)
X.PP
XUpon startup,
X.I trn
Xwill do several things:
X.Ip 1. 4
XIt will look for your
X.I .newsrc
Xfile, which is your list of subscribed-to
Xnewsgroups.
XIf
X.I trn
Xdoesn't find a
X.IR .newsrc ,
Xit will create one.
XIf it does find one, it will back it up under the name \*(L".oldnewsrc\*(R".
X.Ip 2. 4
XIt will input your
X.I .newsrc
Xfile, listing out the first several newsgroups
Xwith unread news.
X.Ip 3. 4
XIt will perform certain consistency checks on your
X.IR .newsrc .
XIf your
X.I .newsrc
Xis out of date in any of several ways,
X.I trn
Xwill warn you and patch it up for you, but you may have to wait a little
Xlonger for it to start up.
X.Ip 4. 4
X.I Trn
Xwill next check to see if any new newsgroups have been created, and give
Xyou the opportunity to add them to your
X.IR .newsrc .
X.Ip 5. 4
X.I Trn
Xgoes into the top prompt level\*(--the newsgroup selection level.
X.Sh "Newsgroup Selection Level"
XIn this section the words \*(L"next\*(R" and \*(L"previous\*(R" refer to
Xthe ordering of the newsgroups in your
X.I .newsrc
Xfile.
XOn the newsgroup selection level, the prompt looks like this:
X.Sp
X******** 17 unread articles in talk.blurfl\*(--read now? [ynq]
X.Sp
Xand the following commands may be given at this level:
X.Ip y,SP 8
XDo this newsgroup now.
X.Ip .command 8
XDo this newsgroup now, but execute
X.I command
Xbefore displaying anything.
XThe command will be interpreted as if given on the article selection level.
X.Ip \+ 8
XEnter this newsgroup through the thread selector.
X.Ip = 8
XStart this newsgroup, but list subjects before displaying articles.
X.Ip U 8
XEnter this newsgroup through the \*(L"Set unread\*(R" prompt.
X.Ip n 8
XGo to the next newsgroup with unread news.
X.Ip N 8
XGo to the next newsgroup.
X.Ip p 8
XGo to the previous newsgroup with unread news.
XIf there is none, stay at the current newsgroup.
X.Ip P 8
XGo to the previous newsgroup.
X.Ip \- 8
XGo to the previously displayed newsgroup (regardless of whether it is
Xbefore or after the current one in the list).
X.Ip 1 8
XGo to the first newsgroup.
X.Ip ^ 8
XGo to the first newsgroup with unread news.
X.Ip $ 8
XGo to the end of the newsgroups list.
X.Ip "g newsgroup" 8
XGo to
X.IR newsgroup .
XIf it isn't currently subscribed to, you will be asked if you want to
Xsubscribe.
X.Ip "/pattern" 8
XScan forward for a newsgroup matching
X.IR pattern .
XPatterns do globbing like filenames, i.e., use ? to match a single
Xcharacter, * to match any sequence of characters, and [] to specify a list
Xof characters to match.
X(\*(L"all\*(R" may be used as a synonym for \*(L"*\*(R".)
XUnlike normal filename globbing, newsgroup searching is not anchored to
Xthe front and back of the filename, i.e. \*(L"/ski\*(R" will find
Xrec.skiing.
XYou may use ^ or $ to anchor the front or back of the search:
X\*(L"/^test$\*(R" will find newsgroup test and nothing else
XIf you want to include newsgroups with 0 unread articles, append /r.
XIf the newsgroup is not found between the current newsgroup and the last
Xnewsgroup, the search will wrap around to the beginning.
X.Ip "?pattern" 8
XSame as /, but search backwards.
X.Ip u 8
XUnsubscribe from the current newsgroup.
X.Ip "l string" 8
XList newsgroups not subscribed to which contain the string specified.
X.Ip L 8 13v
XLists the current state of the
X.IR .newsrc ,
Xalong with status information.
X.Sp
X.nf
X    \h'|0.5i'Status    \h'|2i'Meaning
X    \h'|0.5i'<number>  \h'|2i'Count of unread articles in newsgroup.
X    \h'|0.5i'READ      \h'|2i'No unread articles in newsgroup.
X    \h'|0.5i'UNSUB     \h'|2i'Unsubscribed newsgroup.
X    \h'|0.5i'BOGUS     \h'|2i'Bogus newsgroup.
X    \h'|0.5i'JUNK      \h'|2i'Ignored line in .newsrc
X\h'|2i'(e.g. readnews \*(L"options\*(R" line).
X.fi
X.Sp
X(A bogus newsgroup is one that is not in the list of active newsgroups
Xin the active file, which on most systems is /usr/lib/news/active unless
Xyou use NNTP.)
X.Ip "m name" 8
XMove the named newsgroup somewhere else in the
X.IR .newsrc .
XIf no name is given, the current newsgroup is moved.
XThere are a number of ways to specify where you want the newsgroup\*(--type
Xh for help when it asks where you want to put it.
X.Ip c 8
XCatch up\*(--mark all unread articles in this newsgroup as read.
X.Ip "o pattern" 8
XOnly display those newsgroups whose name matches
X.IR pattern .
XPatterns are the same as for the \*(L'/\*(R' command.
XMultiple patterns may be separated by spaces, just as on the
Xcommand line.
XThe restriction will remain in effect either until there are no articles
Xleft in the restricted set of newsgroups, or another restriction command
Xis given.
XSince
X.I pattern
Xis optional, \*(L'o\*(R' by itself will remove the
Xrestriction.
X.Ip "a pattern" 8
XAdd new newsgroups matching
X.IR pattern .
XNewsgroups which are already in your
X.I .newsrc
Xfile, whether subscribed to or
Xnot, will not be listed.
XIf any new newsgroups are found, you will be asked for each one whether
Xyou would like to add it.
XAfter any new newsgroups have been added, the \*(L'a\*(R' command also
Xrestricts the current set of newsgroups just like the \*(L'o\*(R' command
Xdoes.
X.Ip & 8
XPrint out the current status of command line switches and any newsgroup
Xrestrictions.
X.Ip "&switch {switch}" 8
XSet additional command line switches.
X.Ip && 8
XPrint out the current macro definitions.
X.Ip "&&keys commands" 8
XDefine additional macros.
X.Ip !command 8
XEscape to a subshell.
XOne exclamation mark (!) leaves you in your own news directory.
XA double exclamation mark (!!) leaves you in the spool
Xdirectory for news, which on most systems is /usr/spool/news that don't use NNTP.
XThe environment variable SHELL will be used if defined.
XIf
X.I command
Xis null, an interactive shell is started.
X.Ip q 8
XQuit.
X.Ip x 8
XQuit, restoring .newsrc to its state at startup of
X.IR trn .
XThe .newsrc you would have had if you had exited with \*(L'q\*(R' will be
Xcalled .newnewsrc, in case you didn't really want to type \*(L'x\*(R'.
X.Ip ^K 8
XEdit the global KILL file.
XThis is a file which contains /pattern/j commands (one per line) to be
Xapplied to every newsgroup as it is started up, that is, when it is
Xselected on the newsgroup selection level.
XThe purpose of a KILL file is to mark articles as read on the basis of some
Xset of patterns.
XThis saves considerable wear and tear on your \*(L'n\*(R' key.
XThere is also a local KILL file for each newsgroup.
XBecause of the overhead involved in searching for articles to kill, it is
Xbetter if possible to use a local KILL file.
XLocal KILL files are edited with a \*(L'^K\*(R' on the article selection level.
XThere are also automatic ways of adding search commands to the local KILL
Xfile\*(--see the \*(L'K\*(R' and \*(L'T\*(R' commands, and the K search
Xmodifier on the article selection level.
X.Sp
XIf either of the environment variables VISUAL or EDITOR is set, the
Xspecified editor will be invoked; otherwise a default editor (normally vi(1))
Xis invoked on the KILL file.
X.Sh "Thread Selection Level"
XMost people who don't have all day to read news will want to enter a newsgroup
Xby way of the thread selector.
XThis is accomplished by using the \*(L'+\*(R'
Xcommand at the newsgroup selection level.
XIn fact, this may be the default command for entering a newsgroup, depending
Xon how your version of
X.I trn
Xwas configured (see the
X.B \-X
Xoption for how to turn this default on or off).
XThe thread selector displays a list of article subjects and (optionally)
Xauthors grouped into threads.
XA thread may contain multiple subjects if the subject changes as the
Xdiscussion continues.
XAlso displayed is a count of the number of unread articles in each thread.
XEach thread is preceded by a letter from \*(L'a\*(R' to \*(L'z\*(R'
X(skipping \*(L'q\*(R') which is typed to select the associated thread.
XWhen selected, the thread's letter will be flagged with a \*(L'+\*(R'.
X.Sp
XThe default is to display the long mode of the thread selector.
XIn this mode, all the authors of the articles in the thread are summarized,
Xone per line (authors of multiple articles are listed only once).
XThe medium display mode groups multiple authors onto the same line, so that
Xmore threads can be displayed at one time.
XThe short display mode does not display any author names, and can display
Xmore characters in the subject.
X.PP
XThe following commands are available in the thread selector:
X.Ip "a-z,0-9" 8
XSelect the discussion thread by its letter or number;
Xpress again to deselect.
XBy default the letters h, k, n, p, q, and y are omitted to allow them
Xto be typed as commands.
XSee the variable SELECTCHARS customize this.
X.Ip SP 8
XPerform the default command.
XThis is usually > for most pages, and Z on the last page (although K and X
Xare also quite popular).
X.Ip CR 8
XRead the current thread (if none are selected) or all the selected threads.
X.Ip "Z,TAB" 8
XBegin reading the selected threads.
XIf none are are selected, read everything.
X.Ip "y, \*(L'.\*(R'" 8
XToggle the current thread's selection (the one under the cursor).
X.Ip "k, \*(L',\*(R'" 8
XMark the current thread as killed.
X.Ip "m, \e" 8
XUnmark the current thread.
X.Ip \- 8
XSet a range, as in 2 \- 5.
XRepeats the last marking action:  selected, unselected, killed, or unmarked.
X.Ip @ 8
XToggle all visible article selections.
X.Ip < 8
XGo to previous page.
X.Ip > 8
XGo to next page.
X.Ip "p, [" 8
XMove up to the previous thread.
X.Ip "n, ]" 8
XMove down to the next thread.
X.Ip ^ 8
XGo to first page.
X.Ip $ 8
XGo to last page.
X.Ip X 8
XMark all unselected articles as read and start reading.
X.Ip J 8
XMark all selected articles as read (useful after performing some action
Xon them with the \*(L':\*(R' command).
X.Ip D 8
XMark unselected articles on the current page as read.
XBegin reading if articles are selected, otherwise go to the next page.
X.Ip ^K 8
XEdit the local KILL file for this newsgroup.
XA detailed description of KILL files is found in the Article Selection section.
X.Ip ":command" 8
XExecute a command upon all the selected threads and their articles.
XIf no threads are selected, all threads with unread articles are affected.
X.Sp
XApplicable commands include \*(L'+\*(R' and \*(L'-\*(R' (select and unselect
Xthread), \*(L'T\*(R' (trash the thread into the local KILL file), \*(L't\*(R'
X(display article tree), \*(L"s dest\*(R" (save article to a destination),
X\*(L"e dir\*(R" (extract to directory), \*(L'E\*(R' (end partial uudecode),
Xas well as: S, |, w, W, m, M, j, and =.
X.Ip "/pattern" 8
XScan all articles for a subject containing
X.I pattern
Xand select its thread.
X.Ip "/pattern/modifiers:command{:command}" 8
XApply the commands listed to articles matching the search command (possibly
Xwith h, a, r, or K modifiers).
XThe default action, if no command is specified, is to select the parent
Xthread of the matching article (the \*(L'+\*(R' command).
XSee the section on Regular Expressions, and the description of pattern
Xsearching in the Article Selection section.
X.Sp
XOne example:  to scan all the unread articles looking for \*(L"topic\*(L"
Xanywhere in the article and then select its thread and save the article to
Xthe files topic.1, topic.2, etc. use \*(L"/topic/a:+:s topic.%#\*(R".
X.Ip N 8
XLeave this group as-is and go on to the next newsgroup prompt.
X.Ip U 8
XSwitch between selecting read/unread articles.
X.Ip L 8
XSwitch the current display mode between the long and medium modes
X(with authors) and the short mode.
X(See the
X.B \-x
Xoption to select your favorite mode as the default.)
X.Ip & 8
XDisplay or set the current status of command line switches.
X.Ip && 8
XDisplay or set the current macro definitions.
X.Ip !command 8
XEscape to a subshell.
X.Ip "q,ESC" 8
XQuit selection mode.
X.Ip Q 8
XQuit the current newsgroup and return to the newsgroup selection prompt
Xfor this group.
X.Sh "Article Selection Level"
XOn the article selection level,
X.I trn
Xdisplays unread articles in thread sequence, reading each article and its
Xreplies before going on to another topic.
XIf threads are disabled for a particular group, the default order is
Xin numeric sequence (the order they arrived at your site) unless you
Xuse subject search (^N) to change the default order to be
Xnumerical order within each matching subject.
X(The
X.B \-S
Xswitch can be used to make subject search mode the default for unthreaded
Xgroups.)
X.Sp
XOn the article selection level you are
X.I not
Xasked whether you want to read an article before the article is displayed;
Xrather,
X.I trn
Xsimply displays the first page (or portion of a page, at low baud rates) of the
Xarticle and asks if you want to continue.
XThe normal article selection prompt comes at the END of the article
X(though article selection commands can be given from within the middle
Xof the article (the pager level) also).
XThe prompt at the end of an article looks like this:
X.Sp 
XEnd of article 248 (of 257)\*(--what next? [npq]
X.Sp
XThe following are the options at this point:
X.Ip n,SP 8
XScan forward for next unread article.
X(Note: the \*(L'n\*(R' (next) command when typed at the end of an article
Xdoes not mark the article as read, since an article is automaticaly marked
Xas read after the last line of it is printed.
XIt is therefore possible to type a sequence such as \*(L'mn\*(R' and leave
Xthe article marked as unread.
XThe fact that an article is marked as read by typing n, N, ^N, e, s, S, |,
Xw, or W within the MIDDLE of the article is in fact a special case.)
X.Ip N 8
XGo to the next article.
X.Ip ^N 8
XScan forward for the next article with the same subject.
XIf the group is unthreaded this also makes subject search mode (^N)
Xthe default.
X.Ip p 8
XScan backward for previous unread article.
XIf there is none, stay at the current article.
X.Ip P 8
XGo to the previous article.
X.Ip \- 8
XGo to the previously displayed article (regardless of whether that article
Xis before or after this article in the normal sequence).
X.Ip ^P 8
XScan backward for the previous article with the same subject.
XMakes subject search mode (^N) the default if the group is unthreaded.
X.Ip "<,>" 8
XBrowse the previous/next selected thread.
XIf no selections have been made, all the threads that had unread news when
Xyou entered the newsgroup (or last left the thread selector) are treated
Xas selected.
XEntering an empty newsgroup makes all the already-read threads available
Xfor browsing.
X.Ip "[,]" 8
XProceed to the left/right in the article tree.
XVisits already-read articles as well as empty nodes.
XIf you attempt to go past the left/right edge of the tree, you are advanced
Xto the previous/next line if available.
X.Ip "{,}" 8
XGo to the root/leaf of the article tree, even if the node is
Xalready read or empty.
XProceeds to the very first/last node if you're already at a root/leaf in
Xa multi-root thread.
X.Ip t 8
XDisplay the entire article tree and all its associated subjects.
X.Ip ^R 8
XRestart the current article.
X.Ip v 8
XRestart the current article verbosely, displaying the entire header.
X.Ip ^L 8
XRefresh the screen.
X.Ip ^X 8
XRestart the current article, and decrypt as a rot13 message.
X.Ip X 8
XRefresh the screen, and decrypt as a rot13 message.
X.Ip b 8
XBack up one page.
X.Ip q 8
XQuit this newsgroup and go back to the newsgroup selection level.
X.Ip ^ 8
XGo to the first unread article.
X.Ip $ 8
XGo to the last article (actually, one past the last article).
X.Ip "number" 8
XGo to the numbered article.
X.Ip "range{,range}:command{:command}" 8
XApply a set of commands to a set of articles.
XA range consists of either <article number> or
X<article\ number>\-<article\ number>.
XA dot \*(L'.\*(R' represents the current article, and a dollar
Xsign \*(L'$\*(R' represents the last article.
X.Sp
XApplicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
X(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
X(save to a destination), \*(L"e dir"\*(R" (extract to directory),
X\&\*(L"!command\*(R" (shell escape), \*(L"=\*(R" (print the subject),
X\&\*(L'T\*(R' (trash the thread into the local KILL file), \*(L'+\*(R'
X(select the thread), \*(L'-\*(R' (deselect the thread), \*(L'C\*(R'
X(cancel), as well as S, |, w, W, and t.
X.Ip ":command" 8
XApply a command to all selected threads and their articles.
XIf no threads are selected, apply the command to all the unread threads.
XFor applicable commands, see the discussion above for the range command.
X.Ip j 8
XJunk the current article\*(--mark it as read.
XIf this command is used from within an article, you are left at the end of
Xthe article, unlike \*(L'n\*(R', which looks for the next article.
X.Ip m 8
XMark the current article as still unread.
X(If you are in subject search mode you probably want to use M instead of m.
XOtherwise the current article may be selected as the beginning of the next
Xsubject thread.)
X.Ip M 8
XMark the current article as still unread, but not until the newsgroup
Xis exited.
XUntil then, the current article will be marked as read.
XThis is useful for returning to an article in another session, or in another
Xnewsgroup.
X.Ip /pattern 8
XScan forward for article containing
X.I pattern
Xin the subject.
XSee the section on Regular Expressions.
XTogether with the escape substitution facility described later, it becomes
Xeasy to search for various attributes of the current article, such as
Xsubject, article ID, author name, etc.
XThe previous pattern can be recalled with \*(L"<esc>/\*(R".
XIf
X.I pattern
Xis omitted, the previous pattern is assumed.
X.Ip /pattern/h 8
XScan forward for article containing
X.I pattern
Xin the header.
X.Ip /pattern/a 8
XScan forward for article containing
X.I pattern
Xanywhere in article.
X.Ip /pattern/r 8
XScan read articles also.
X.Ip /pattern/c 8
XMake search case sensitive.
XOrdinarily upper- and lower-case are considered the same.
X.Ip "/pattern/modifiers:command{:command}" 8
XApply the commands listed to articles matching the search command (possibly
Xwith h, a, or r modifiers).
XApplicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
X(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
X(save to a destination), \*(L"e dir"\*(R" (extract to directory),
X\&\*(L"!command\*(R" (shell escape), \*(L"=\*(R" (print the subject),
X\&\*(L'T\*(R' (trash the associated thread and put it in the local KILL
Xfile), \*(L'+\*(R' (select the associated thread), \*(L'-\*(R' deselect
Xthe associated thread), and \*(L'C\*(R' (cancel).
XIf the first command is \*(L'm\*(R' or \*(L'M\*(R', modifier r is assumed.
XA K may be included in the modifiers (not the commands) to cause the
Xentire command (sans K) to be saved to the local KILL file, where it will
Xbe applied to every article that shows up in the newsgroup.
X.Sp
XFor example, to save all articles in a given newsgroup to the line printer
Xand mark them read, use \*(L"/^/\||\|lpr:j\*(R".
XIf you type \*(L"/^/K\||\|lpr:j\*(R", this will happen every time you enter the
Xnewsgroup.
X.Ip ?pattern 8
XScan backward for article containing
X.I pattern
Xin the subject.
XMay be modified as the forward search is: ?pattern?modifiers[:commands].
XIt is likely that you will want an r modifier when scanning backward.
X.Ip k 8
XMark as read all articles with the same subject as the current article.
X(Note: there is no single character command to temporarily mark as read (M
Xcommand) articles matching the current subject.
XThat can be done with \*(L"/<esc>s/M\*(R", however.)
X.Ip \, 8
XMark the current article and all its replies as read.
X.Ip J 8
XJunk all the articles in the thread, even if it contains multiple subjects.
X.Ip K 8
XDo the same as the k command, but also add a line to the local KILL file for
Xthis newsgroup to kill this subject every time the newsgroup is started up.
XFor a discussion of KILL files, see the \*(L'^K\*(R' command below.
XSee also the K modifier on searches above.
X.Ip T 8
XKill the current thread, and also add a line to the local KILL file for
Xthis newsgroup to kill new articles attached to this thread every time the
Xnewsgroup is started up.
X.Ip ^K 8
XEdit the local KILL file for this newsgroup.
XEach line of the KILL file should be a subject-killing command of the
Xform /pattern/j or a thread killing command of the form T<number>.
XThe thread killing commands are usually followed by a comment to let
Xyou know the primary subject of the numbered thread being killed.
XThe first line in the KILL file has the form \*(L"THRU <number>\*(R",
Xwhich tells
X.I trn
Xthe maximum article number that the KILL file has been applied to.
X(You may delete the THRU line to force a rescan of current articles.)
XYou may also have reason to use the m, h, or a modifiers.
XBe careful with the M modifier in a kill file\*(--there are more efficient
Xways to never read an article.
XYou might have reason to use it if a particular series of articles is posted
Xto multiple newsgroups.
XIn this case, M would force you to view the article in a different newsgroup.
X.Sp
XTo see only newgroup articles in the control newsgroup, for instance, you
Xmight put
X.Sp
X/^/j
X.br
X/newgroup/m
X.Sp
Xwhich kills all subjects not containing \*(L"newgroup\*(R".
XYou can add lines automatically via the K command and K search modifiers,
Xbut editing is the only way to remove lines.
XIf either of the environment variables VISUAL or EDITOR is set, the
Xspecified editor will be invoked; otherwise a default editor (normally vi)
Xis invoked on the KILL file.
X.Sp
XThe KILL file may also contain switch setting lines beginning with \*(L'&\*(R'.
XAdditionally, any line beginning with \*(L'X\*(R' is executed on exit
Xfrom the newsgroup rather than on entrance.
XThis can be used to set switches back to a default value.
XOne use for this capability is to set your save directory to a custom value
Xupon entry to a newsgroup and set it back on exit using the \-ESAVEDIR option.
XSee also the
X.B \-/
Xoption for another solution to multiple save directories without using KILL
Xfiles.
X.Ip r 8
XReply through net mail.
XThe environment variables MAILPOSTER and MAILHEADER may be used to modify
Xthe mailing behavior of
X.I trn
X(see environment section).
XIf on a nonexistent article such as the "End of newsgroup" pseudo-article
X(which you can get to with a \*(L'$\*(R' command), invokes the mailer to
Xnobody in particular.
X.Ip R 8
XReply, including the current article in the header file generated.
X(See \*(L'F\*(R' command below).
XThe YOUSAID environment variable controls the format of the attribution line.
X.Ip f 8
XSubmit a followup article.
XIf on a nonexistent article such as the "End of newsgroup" pseudo-article
X(which you can get to with a \*(L'$\*(R' command), posts an original
Xarticle (basenote).
X.Ip F 8
XSubmit a followup article, and include the old article, with lines prefixed
Xeither by \*(L">\*(R" or by the argument to a
X.B \-F
Xswitch.
X.I Trn
Xwill attempt to provide an attribution line in front of the quoted article,
Xgenerated from the From: line of the article.
XUnfortunately, the From: line doesn't always contain the right name; you
Xshould double check it against the signature and change it if necessary,
Xor you may have to apologize for quoting the wrong person.
XThe environment variables NEWSPOSTER, NEWSHEADER and ATTRIBUTION may be
Xused to modify the posting behavior of
X.I trn
X(see environment section).
X.Sp
XIf you are starting a new subject, move to the end of the newsgroup
Xwith the \*(L'$\*(R' command before pressing \*(L'f\*(R'.
XOtherwise you may have to do a lot of header editing, including 
X.I "removing the References line"
X-- this is IMPORTANT to remember ONLY when starting a new subject.
XIt is much simpler to remember \*(L"$f\*(R" for new subjects, and to
Xallways leave the References line alone.
X.Ip C 8
XCancel the current article, but only if you are the contributor or superuser.
X.Ip c 8
XCatch up in this newsgroup; i.e., mark all articles as read.
X.Ip U 8
XMark some or all articles as unread.
XYou can choose to mark the current thread, sub-thread (the current article
Xand its replies), all the articles, or start up the thread selector
Xto choose specific threads to set unread.
X.Ip u 8
XUnsubscribe from this newsgroup.
X.Ip "s destination" 8
XSave to a filename or pipe using sh.
XIf the first character of the destination is a vertical bar, the rest of
Xthe command is considered a shell command to which the article is passed
Xthrough standard input.
XThe command is subject to filename expansion.
X(See also the environment variable PIPESAVER.)
XIf the destination does not begin with a vertical bar, the rest of the
Xcommand is assumed to be a filename of some sort.
XAn initial tilde \*(L'~\*(R' will be translated to the name of the home
Xdirectory, and an initial environment variable substitution is also allowed.
XIf only a directory name is specified, the environment variable SAVENAME
Xis used to generate the actual name.
XIf only a filename is specified (i.e. no directory), the environment variable
XSAVEDIR will be used to generate the actual directory.
XIf nothing is specified, then obviously both variables will be used.
XSince the current directory for
X.I trn
Xwhile doing a save command is your
Xprivate news directory, typing \*(L"s ./filename\*(R" will force the file
Xto your news directory.
XSave commands are also run through % interpretation, so that you can
Xenter \*(L"s %O/filename\*(R" to save to the directory you were in when you ran
X.IR trn ,
Xand \*(L"s %t\*(R" to save to a filename consisting of the Internet address
Xof the sender.
X.Sp
XAfter generating the full pathname of the file to save to,
X.I trn
Xdetermines if the file exists already, and if so, appends to it.
X.I trn
Xwill attempt to determine if an existing file is a mailbox or a normal file,
Xand save the article in the same format.
XIf the output file does not yet exist,
X.I trn
Xwill by default ask you which format you want, or you can make it skip the
Xquestion with either the
X.B \-M
Xor
X.B \-N
Xswitch.
XIf the article is to be saved in mailbox format, the command to do so is
Xgenerated from the environment variable MBOXSAVER.
XOtherwise, NORMSAVER is used.
X.Ip "S destination" 8
XSave to a filename or pipe using a preferred shell, such as csh.
XWhich shell is used depends first on what you have the environment variable
XSHELL set to, and in the absence of that, on what your news administrator
Xset for the preferred shell when he or she installed
X.IR trn .
X.Ip "| command" 8
XShorthand for \*(L"s | command\*(R".
X.Ip "w destination" 8
XThe same as \*(L"s destination\*(R", but saves without the header.
X.Ip "W destination" 8
XThe same as \*(L"S destination\*(R", but saves without the header.
X.Ip "e directory" 8
XExtract a shell archive or uuencoded binary to the designated directory.
XThe article is first scanned to try discover what type of data is
Xencapsulated.
XIf a \*(L"cut here\*(R" line is found, first non-blank following
Xline must be either the start of a shar header, or the \*(L"begin\*(R"
Xor \*(L"table\*(R" line of a uuencoded binary.
XThe default for extracting shars is to send the data portion of the file
Xto /bin/sh, but that can be overridden with the UNSHAR variable (see the
XENVIRONMENT section).
XUudecoding is done internally by a decoder that can handle the data
Xbeing split up over multiple articles, and extracted one piece at a time.
XTo decode a multi-article file, either execute the \*(L'e\*(R'
Xcommand in each article in sequence (use \*(L"e %m\*(R" to extract to the
Xsame directory as the last command), use an article range to execute the
Xcommand, or use the \*(L":e\*(R" command to execute the command on the
Xcurrently selected articles.
XIf a uudecoding is in-progress (the last piece wasn't extracted yet)
Xand you exit the group, the partial file will be removed.
XThis also occurs if you start to extract a new uuencoded file before the
Xprevious one was finished.
XSee also the \*(L'E\*(R' command for ending a multi-part uudecoding
Xmanually.
X.Sp
XThere is one special case that we handle:  if the very first file in a
Xrecognizable shar file is a uuencoded binary that was packed with lines
Xstarting with an \*(L'X\*(R', we will not unshar the file but instead
Xuudecode it.
XIf this causes problems, you can override the default extraction method
Xby following the directory with an explicit command to execute, as
Xdescribed below.
X.Ip "e directory|command" 8
XThis form of the \*(L'e\*(R' command allows you to extract other data
Xformats than shar or uuencoded files or to override the decisions made
Xby the automatic extraction selection described above.
XIn normal operation, all data following what we recognize as
Xa \*(L"cut here\*(R" line will be send to the specified command.
XAdditionally, the distinctive beginning of a shell archive is also recognized
Xwithout a preceding cut line.
XThe default directory is set to the specified directory, or the value
Xof SAVEDIR if unspecified.
XYou can repeat your previous extract command by specifying \*(L"e %b|%e\*R"
X(or just \*(L"e %b\*(R" if no command was provided).
X.Ip E 8
XThis command ends any multi-part uuencoded file extraction that you began,
Xbut are unable (or unwilling) to complete.
XThe partially extracted file is removed.
X.Ip & 8
XPrint out the current status of command line switches.
X.Ip "&switch {switch}" 8
XSet additional command line switches.
X.Ip && 8
XPrint out current macro definitions.
X.Ip "&&keys commands" 8
XDefine an additional macro.
X.Ip !command 8
XEscape to a subshell.
XOne exclamation mark (!) leaves you in your own news directory.
XA double exclamation mark (!!) leaves you in the spool
Xdirectory of the current newsgroup.
XThe environment variable SHELL will be used if defined.
XIf
X.I command
Xis null, an interactive shell is started.
X.Sp
XYou can use escape key substitutions described later to get to many
Xrun-time values.
XThe command is also run through % interpretation, in case it is being called
Xfrom a range or search command.
X.Ip \+ 8
XStart the thread selector.
XIf the newsgroup is unthreaded, the subject lister is called instead.
X.Ip = 8
XList subjects of unread articles.
X.Ip # 8
XPrint last article number.
X.Sh "Pager Level"
XAt the pager level (within an article), the prompt looks like this:
X.Sp
X\*(--MORE\*(--(17%)
X.Sp
Xand a number of commands may be given:
X.Ip SP 8
XDisplay next page.
X.Ip x 8
XDisplay next page and decrypt as a rot13 message.
X.Ip d 8
XDisplay half a page more.
X.Ip CR 8
XDisplay one more line.
X.Ip q 8
XGo to the end of the current article (don't mark it either read or unread).
XLeaves you at the \*(L"What next?\*(R" prompt.
X.Ip j 8
XJunk the current article.
XMark it read and go to the end of the article.
X.Ip ^L 8
XRefresh the screen.
X.Ip X 8
XRefresh the screen and decrypt as a rot13 message.
X.Ip b 8
XBack up one page.
X.Ip t 8
XDisplay the entire article tree, including its associated subjects, and
Xcontinue reading.
X.Ip gpattern 8
XGoto (search forward for)
X.I pattern
Xwithin current article.
XNote that there is no space between the command and the pattern.
XIf the pattern is found, the page containing the pattern will be displayed.
XWhere on the page the line matching the pattern goes depends on the value
Xof the
X.B \-g
Xswitch.
XBy default the matched line goes at the top of the screen.
X.Ip G 8
XSearch for g pattern again.
X.Ip ^G 8
XThis is a special version of the \*(L'g\*(R' command that is for skipping
Xarticles in a digest.
XIt is equivalent to setting \*(L"\-g4\*(R" and then executing the command
X\*(L"g^Subject:\*(R".
X.Ip TAB 8
XThis is another special version of the \*(L'g\*(R' command that is for
Xskipping inclusions of older articles.
XIt is equivalent to setting \*(L"\-g4\*(R" and then executing the command
X\*(L"g^[^c]\*(R", where \fIc\fR is the first character of the last line
Xon the screen.
XIt searches for the first line that doesn't begin with the same character
Xas the last line on the screen.
X.Ip !command 8
XEscape to a subshell.
X.PP
XThe following commands skip the rest of the current article, then behave just
Xas if typed to the \*(L"What next?\*(R" prompt at the end of the article.
XSee the documentation at the article selection level for these commands.
X.Sp	
X    # $ & / = ? c C f F k K T ^K J , m M r R ^R u U v Y ^
X.br
X    p P ^P - < > [ ] { } number
X.br
X    range{,range} command{:command}
X.Sp
XThe following commands also skip to the end of the article, but have the
Xadditional effect of marking the current article as read:
X.Sp
X    n N ^N e s S | w W
X.Sp
X.Sh "Miscellaneous facts about commands"
XAn \*(L'n\*(R' typed at either the \*(L"Last newsgroup\*(R" prompt or a
X\*(L"Last article\*(R" prompt will cycle back to the top of the newsgroup
Xor article list, whereas a \*(L'q\*(R' will quit the level.
X(Note that \*(L'n\*(R' does not mean \*(L"no\*(R", but rather
X\*(L"next\*(R".)
XA space will of course do whatever is shown as the
Xdefault, which will vary depending on whether
X.I trn
Xthinks you have more articles or newsgroups to read.
X.PP
XThe \*(L'b\*(R' (backup page) command may be repeated until the beginning of
Xthe article is reached.
XIf
X.I trn
Xis suspended (via a ^Z), then when the job is resumed, a refresh (^L) will
Xautomatically be done (Berkeley-type systems only).
XIf you type a command such as \*(L'!\*(R' or \*(L's\*(R' which takes you
Xfrom the middle of the article to the end, you can always get back into the
Xmiddle by typing \*(L'^L\*(R'.
X.PP
XIn multi-character commands such as \*(L'!\*(R', \*(L's\*(R', \*(L'/\*(R',
Xetc, you can interpolate various run-time values by typing escape and a
Xcharacter.
XTo find out what you can interpolate, type escape and \*(L'h\*(R', or check
Xout the single character % substitutions for environment variables in the
XInterpretation and Interpolation section, which are the same.
XAdditionally, typing a double escape will cause any % substitutions in the
Xstring already typed in to be expanded.
X.Sh "The Tree Display"
XWhen reading a threaded newsgroup,
X.I trn
Xdisplays a character representation of the article tree in the upper right
Xcorner of the header.
XFor example, consider the following display:
X.Sp
X.nf
X    (1)+-(1)--(\fI2\fP)--\fI[2]\fP
X       |-(1)+-[3]
X       |    \\-[1]
X       \\-(1)+-[1]--[1]
X            \\-[1]
X.fi
X.Sp
XThis tree represents an initial article that has three direct replies
X(the second column with three (1)'s).
XEach reply has further replies branching off from them.
XIn two cases the subject line was altered in the reply, as indicated
Xby the increasing numbers.
XWhen there is only one subject associated with a thread, all the nodes
Xare marked with the number 1.
XWhen the first subject change arrives, it is marked with the number 2,
Xand so on.
XIf you were to look at this thread in the thread selector, the three
Xsubjects associated with it would be listed in the same order as the
Xascending digits.
XIn those rare cases where more than 9 subjects are associated with each
Xthread, the nodes are marked with the letters A-Z, and then by a-z.
XThe articles that have already been read are enclosed in ()'s.
XUnread articles are displayed in []'s.
XThe currently displayed article has its entire node highlighted in the
Xdisplay.
XThe previously displayed article has only its number highlighted.
X.Sh "Options"
X.I Trn
Xhas a nice set of options to allow you to tailor the interaction
Xto your liking.
X(You might like to know that the author swears by
X\*(L"\-x6ls \-e \+m \-S -XX -N\*(R".)
XThese options may be set on the command line, via the RNINIT
Xenvironment variable, via a file pointed to by the RNINIT variable, or
Xfrom within
X.I trn
Xvia the & command.
XOptions may generally be unset by typing \*(L"+switch\*(R".
XOptions include:
X.TP 5
X.B \-a
Xturns on the alpha-numeric mode of the thread-selector.
XThis option has no affect unless
X.B \-x
Xis also specified (or is the default on your system).
X.TP 5
X.B \-c
Xchecks for news without reading news.
XIf a list of newsgroups is given on the command line, only those newsgroups
Xwill be checked; otherwise all subscribed-to newsgroups are checked.
XWhenever the
X.B \-c
Xswitch is specified, a non-zero exit status from
X.I trn
Xmeans that there is unread news in one of the checked newsgroups.
XThe
X.B \-c
Xswitch does not disable the printing of newsgroups with unread news;
Xthis is controlled by the
X.B \-s
Xswitch.
X(The
X.B \-c
Xswitch is not meaningful when given via the & command.)
X.TP 5
X.B \-C<number>
Xtells
X.I trn
Xhow often to checkpoint the
X.IR .newsrc ,
Xin articles read.
XActually, this number says when to start thinking about doing a checkpoint
Xif the situation is right.
XIf a reasonable checkpointing situation doesn't arise within 10 more
Xarticles, the
X.I .newsrc
Xis checkpointed willy-nilly.
X.TP 5
X.B \-d<directory name>
Xsets the default save directory to something other than ~/News.
XThe directory name will be globbed (via csh) if necessary (and if possible).
XArticles saved by
X.I trn
Xmay be placed in the save directory or in a subdirectory thereof depending
Xon the command that you give and the state of the environment variables
XSAVEDIR and SAVENAME.
XAny KILL files (see the K command in the Article Selection section)
Xalso reside in this directory and its subdirectories, by default.
XIn addition, shell escapes leave you in this directory.
X.TP 5
X.B \-D<flags>
Xenables debugging output.
XSee common.h for flag values.
XWarning: normally
X.I trn
Xattempts to restore your
X.I .newsrc
Xwhen an unexpected signal or internal error occurs.
XThis is disabled when any debugging flags are set.
X.TP 5
X.B \-e
Xcauses each page within an article to be started at the top of the screen,
Xnot just the first page.
X(It is similar to the
X.B \-c
Xswitch of
X.IR more (1).)
XYou never have to read scrolling text with this switch.
XThis is helpful especially at certain baud rates because you can start reading
Xthe top of the next page without waiting for the whole page to be printed.
XIt works nicely in conjuction with the
X.B \-m
Xswitch, especially if you use half-intensity for your highlight mode.
XSee also the
X.B \-L
Xswitch.
X.TP 5
X.B \-E<name>=<val>
Xsets the environment variable <name> to the value specified.
XWithin
X.IR trn ,
X\*(L"&\-ESAVENAME=%t\*(R" is similar to \*(L"setenv SAVENAME '%t'\*(R" in
X.IR csh ,
Xor \*(L"SAVENAME='%t'; export SAVENAME\*(R" in
X.IR sh .
XAny environment variables set with
X.B \-E
Xwill be inherited by subprocesses of
X.IR trn .
X.TP 5
X.B \-F<string>
Xsets the prefix string for the \*(L'F\*(R' followup command to use in
Xprefixing each line of the quoted article.
XFor example, \*(L"\-F<tab>\*(R" inserts a tab on the front of each line
X(which will cause long lines to wrap around, unfortunately),
X\*(L"\-F>>>>\*(R" inserts \*(L">>>>\*(R" on every line, and
X\*(L"\-F\*(R" by itself causes nothing to be inserted, in case you want to
Xreformat the text, for instance.
XThe initial default prefix is \*(L">\*(R".
X.TP 5
X.B \-g<line>
Xtells
X.I trn
Xwhich line of the screen you want searched-for strings to show up on when
Xyou search with the \*(L'g\*(R' command within an article.
XThe lines are numbered starting with 1.
XThe initial default is \*(L"\-g1\*(R", meaning the first line of the screen.
XSetting the line to less than 1 or more than the number of lines on the screen
Xwill set it to the last line of the screen.
X.TP 5
X.B \-h<string>
Xhides (disables the printing of) all header lines beginning with
X.I string.
XFor instance, \-hexp will disable the printing of the \*(L"Expires:\*(R" line.
XCase is insignificant.
XIf <string> is null, all header lines except Subject are hidden, and you
Xmay then use
X.B +h
Xto select those lines you want to see.
XYou may wish to use the baud-rate switch modifier below to hide more lines
Xat lower baud rates.
X.TP 5
X.B \-H<string>
Xworks just like
X.B \-h
Xexcept that instead of setting the hiding flag for a header line, it sets
Xthe magic flag for that header line.
XCertain header lines have magic behavior that can be controlled this way.
XAt present, the following actions are caused by the flag for the particular
Xline:
Xthe Newsgroups line will only print when there are multiple newsgroups;
Xthe Subject line will be underlined and (when threaded) the
Xkeyword \*(L'Subject:\*(R' is replaced by its subject number (e.g. [1]);
Xthe Expires line will always be suppressed if there is nothing on it;
Xthe name line is shortened to just the comment portion (the part
Xwithin parenthesis) if available; the date line is displayed in local
Xtime if the group is threaded.
XIn fact, all of these actions are the default, and you must use
X.B +H
Xto undo them.
X.TP 5
X.B \-i=<number>
Xspecifies how long (in lines) to consider the initial page of an
Xarticle\*(--normally this is determined automatically depending on baud rate.
X(Note that an entire article header will always be printed regardless of the
Xspecified initial page length.
XIf you are working at low baud rate and wish to reduce the size of the
Xheaders, you may hide certain header lines with the
X.B \(bsh
Xswitch.)
X.TP 5
X.B \-l
Xdisables the clearing of the screen at the beginning of each
Xarticle, in case you have a bizarre terminal.
X.TP 5
X.B \-L
Xtells
X.I trn
Xto leave information on the screen as long as possible by not blanking
Xthe screen between pages, and by using clear to end-of-line.
X(The
X.IR more (1)
Xprogram does this.)
XThis feature works only if you have the requisite termcap
Xcapabilities.
XThe switch has no effect unless the
X.B \-e
Xswitch is set.
X.TP 5
X.B \-m=<mode>
Xenables the marking of the last line of the previous page
Xprinted, to help the user see where to continue reading.
XThis is most helpful when less than a full page is going to be displayed.
XIt may also be used in conjunction with the
X.B \-e
Xswitch, in which case the page is erased, and the first line (which is
Xthe last line of the previous page) is highlighted.
XIf
X.B \-m=s
Xis specified, the standout mode will be used, but if
X.B \-m=u
Xis specified, underlining will be used.
XIf neither
X.B =s
Xor
X.B =u
Xis specified, standout is the default.
XUse
X.B +m
Xto disable highlighting.
X.TP 5
X.B \-M
Xforces mailbox format in creating new save files.
XOrdinarily you are asked which format you want.
X.TP 5
X.B \-N
Xforces normal (non-mailbox) format in creating new save files.
XOrdinarily you are asked which format you want.
X.TP 5
X.B \-q
Xbypasses the automatic check for new newsgroups when starting 
X.I trn.
X.TP 5
X.B \-r
Xcauses
X.I trn
Xto restart in the last newsgroup read during a previous session with
X.I trn.
XIt is equivalent to starting up normally and then getting to the newsgroup
Xwith a g command.
X.TP 5
X.B \-s
Xwith no argument suppresses the initial listing of newsgroups with unread
Xnews, whether
X.B \-c
Xis specified or not.
XThus
X.B \-c
Xand
X.B \-s
Xcan be used together to test \*(L"silently\*(R" the status of news from
Xwithin your
X.I .login
Xfile.
XIf
X.B \-s
Xis followed by a number, the initial listing is suppressed after that many
Xlines have been listed.
XPresuming that you have your
X.I .newsrc
Xsorted into order of interest,
X.B \-s5
Xwill tell you the 5 most interesting newsgroups that have unread news.
XThis is also a nice feature to use in your
X.I .login
Xfile, since it not only tells you whether there is unread news, but also how
Ximportant the unread news is, without having to wade through the entire
Xlist of unread newsgroups.
XIf no 
X.B \-s
Xswitch is given 
X.B \-s5
Xis assumed, so just putting \*(L"rn \-c\*(R"
Xinto your
X\&.login file is fine.
X.TP 5
X.B \-S<number>
Xcauses
X.I trn
Xto enter subject search mode (^N) automatically whenever an unthreaded
Xnewsgroup is
Xstarted up with <number> unread articles or more.
XAdditionally, it causes any \*(L'n\*(R' typed while in subject search mode
Xto be interpreted as \*(L'^N\*(R' instead.
X(To get back out of subject search mode, the best command is probably
X\&\*(L'^\*(R'.)
XIf <number> is omitted, 3 is assumed.
X.TP 5
X.B \-t
Xputs
X.I trn
Xinto terse mode.
XThis is more cryptic but useful for low baud rates.
X(Note that your system administrator may have compiled
X.I trn
Xwith either verbose or terse messages only to save memory.)
XYou may wish to use the baud-rate switch modifier below to enable terse mode
Xonly at lower baud rates.
X.TP 5
X.B \-T
Xallows you to type ahead of rn.
END_OF_FILE
  if test 49649 -ne `wc -c <'trn.1.01'`; then
    echo shar: \"'trn.1.01'\" unpacked with wrong size!
  fi
  # end of 'trn.1.01'
fi
echo shar: End of archive 1 \(of 14\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 14 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still must unpack the following archives:
    echo "        " ${MISSING}
fi
exit 0
exit 0 # Just in case...
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.



More information about the Comp.sources.unix mailing list