rsalz@bbn.com (Rich Salz) (12/01/90)
Submitted-by: Wayne Davison <davison@dri.com> Posting-number: Volume 23, Issue 60 Archive-name: trn/part01 [Excerpt from the README file:] 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 back- track 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, which will give you a feel for how the discussion is going and how the current article is related to the last one you read. In addition, a thread browser/selector has been added to make life in the big newsgroups much easier to live with. It also allows you to quickly browse through already-read articles and select the one(s) you wish to read again. Other new features include an extract command for the source and binary groups, thread-oriented kill directives, and additional "magic" in the header display. To use all the new features of trn will require the maintenance of a thread database, which is handled by the included database manager. The amount of space required is around 5% of your newsspool size (either in /usr/spool/news or on another partition), but you can choose to only keep thread information for a select portion of the newsgroups if you wish -- unthreaded groups are read in an rn-compatible manner. Trn can be optionally compiled as trrn -- a NNTP-compatible newsreader that lets you access news from a remote news server. Each client machine must maintain their own database, either via the NNTP version of the database manager, or by sharing the server's thread files through some other means. Trn is based on the source to Larry Wall's rn (patchlevel 47), and the threaded extensions are fully conditionalized. Thus, it is possible to use this source to compile both trn and (a slightly enhanced version of) rn. In fact, it is possible to install trn as both rn and trn (linked together) to maintain only one newsreader on a system where people wish to continue to use rn. Also, I'd like to publicly thank all the people who have helped me in testing trn -- without their input, trn would have been much less compatible with all the Unix and Xenix systems out there, and not as easy to use: Brandon S. Allbery, Chip Rosenthal, Chip Salzenberg, David C Lawrence, Eric Schnoebelen, George H. Martin, Guy Harris, Jason Molenda, Jaye Mathisen, Jeff Sparkes, Jon Zeeff, Kurt Gollhardt, Linus Tolke, Mitchell F. Wyle. Thanx guys! ---- Cut Here and unpack ---- #!/bin/sh # shar: Shell Archiver (v1.22) # # This is part 1 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # if test -r s2_seq_.tmp then echo "Must unpack archives in sequence!" next=`cat s2_seq_.tmp`; echo "Please unpack part $next next" exit 1; fi echo "x - extracting README (Text)" sed 's/^X//' << 'SHAR_EOF' > README && 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 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 all compiled, you need to create some thread data to be able X to use all the new features. If you like, you can start small with a X command like: "mthreads rec.humor.funny" or "mthreads news". You can X also choose to create any subset of the entire hierarchy by modifying X the active2 file in the trn library. 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 X suggested patches to davison%drivax@uunet.uu.net 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. SHAR_EOF chmod 0660 README || echo "restore of README fails" echo "x - extracting NEW (Text)" sed 's/^X//' << 'SHAR_EOF' > NEW && X NEW FEATURES OF TRN 1.0 vs RN 4.3 X XNew commands (article level) X t display a map of the thread's article tree. X [, ], {, } move around in the article tree X J junk an entire thread of disucussion regardless of X subject changes. X T put the entire thread of discussion in the KILL file X (as opposed to the current subject). X <, > move between threads of discussion X U mark some articles as unread again (choose from X the current thread, subthread, selected threads, or X all articles). X e extract a shar or uuencoded file. X : execute a command on all the selected threads/articles X XNew commands (newsgroup level) X + enter a newsgroup through the thread selector. X U enter a newsgroup through the "set unread" prompt. X XNew commands (thread selector) X [...lots...] use the thread selector to quickly browse the subjects X and/or authors of articles and select only the ones X that you want to read. You can read each one as X soon as you select it, or select them all at once. X Use the 'h' command to see a command summary, or read X the man page for more details. X XNew header display: we display a subset of the thread's article tree in X each header. X XNew display ordering: the articles appear in their reply order. X XNew switches (default may be on, use +x/+X to turn them off) X -x turn on threaded extensions. X -X use thread selector to enter a group. X XNew magic (use +H to turn them off) X -Hfrom displays only the commented portion of the user name. X -Hdate displays the date in local time. X XNew environment variables X EXSAVER shell command that starts an extraction. X SELECTCHARS the character set to use to select threads X (default: abcdefgijlorstuvwxz1234567890). X UNSHAR the unshar program to use (default /bin/sh). X REPLYTO the value to use for the "Reply-To:" header, if X needed. X XNew mode X %m=t when in the thread selector X XNew % interpolations X %# keeps an incremental count during a multi-file save, X extract, etc. ":s part.%#" X %e the last command executed to extract an article. X %E The number of extra (unselected) articles, not X counting the current article (if selected). X %U same as before (number of unread articles, not counting X the current one) but if selections are on, only counts X selected articles. X %Z The number of selected threads. X XMacros and Keymaps X When defining macros, make sure you don't define something that X will conflict with the selection characters in the thread selector. X An easy way is to exclude the thread selector with a mode test: X X f %(%m=t?f:|mail smith\n) X X Also, if you want to use one of the selection characters as a X command in the thread selector, be sure to exclude it from the X list of selection characters in SELECTCHARS (you can define this X with -ESELECTCHARS=abc123 in your .rninit file). X XMiscellaneous X ...and much, much more! (including various bug fixes!) SHAR_EOF chmod 0660 NEW || echo "restore of NEW fails" echo "x - extracting patchlevel (Text)" sed 's/^X//' << 'SHAR_EOF' > patchlevel && XTrn v1.0 SHAR_EOF chmod 0660 patchlevel || echo "restore of patchlevel fails" echo "x - extracting Makefile.SH (Text)" sed 's/^X//' << 'SHAR_EOF' > Makefile.SH && Xcase $CONFIG in X '') . ./config.sh ;; Xesac Xecho "Extracting Makefile (with variable substitutions)" Xcat >Makefile <<!GROK!THIS! X# $Header: Makefile.SH,v 4.3.3.1 90/07/28 18:14:56 davison Trn $ X# X# $Log: Makefile.SH,v $ X# Revision 4.3.3.1 90/07/28 18:14:56 davison X# Initial Trn Release X# X# Revision 4.3.2.10 90/05/04 00:44:51 sob X# Added socketlib to list of libs. X# X# Revision 4.3.2.9 90/04/23 00:27:12 sob X# Added better support for XENIX X# X# Revision 4.3.2.8 89/12/20 23:20:14 sob X# Added "hp-ux" to the list of files created by Configure. X# X# Revision 4.3.2.7 89/12/09 01:49:48 sob X# make clean cleans up better. X# X# Revision 4.3.2.6 89/12/08 22:43:45 sob X# Added suggestions by weening@gang-of-four.stanford.edu and X# jik@pit-manager.mit.edu. rrn manual page is now created when X# doing an installation. getactive will only be made when rrn is being X# created. X# X# Revision 4.3.2.5 89/11/08 04:47:38 sob X# Added VOIDSIG handling for SunOS 4.X X# X# Revision 4.3.2.4 89/11/08 03:16:29 sob X# Added server.h to list of things created by Configure X# X# Revision 4.3.2.3 89/11/08 01:05:52 sob X# Updated to work with RRN or RN X# X# Revision 4.3.2.2 89/11/06 00:03:19 sob X# Added RRN support originally distributed with NNTP 1.5 X# X# Revision 4.3.2.1 89/11/05 23:55:09 sob X# RRN support branch X# X# Revision 4.3.1.2 85/05/13 17:21:18 lwall X# System V make needs space before line-continuing backslash. X# X# Revision 4.3.1.1 85/05/10 11:30:15 lwall X# Branch for patches. X# X# Revision 4.3 85/05/01 11:33:26 lwall X# Baseline for release with 4.3bsd. X# X XCC = $cc Xrnbin = $rnbin Xrnlib = $rnlib Xmansrc = $mansrc Xmanext = $manext X#NNTPNNTPDIR = $NNTPSRC X#NNTPNNTPINC = $rrninclude XCFLAGS = $iandd -O $include XLDFLAGS = $iandd XNDIRC = $ndirc XNDIRO = $ndiro X Xlibs = $ndirlib $termlib $jobslib $socketlib Xmlibs = $jobslib X!GROK!THIS! Xcat >>Makefile <<'!NO!SUBS!' X#NNTPnntp=getactive Xpublic = trn newsetup newsgroups Pnews Rnmail Xprivate = norm.saver mbox.saver makedir\ X filexp Pnews.header mthreads mt.check $(nntp) Xmanpages = trn.1 Pnews.1 Rnmail.1 newsetup.1 newsgroups.1 mthreads.1 Xutil = Makefile makedepend newsnews X X Xh1 = addng.h art.h artio.h artsrch.h backpage.h bits.h cheat.h common.h Xh2 = final.h head.h help.h init.h intrp.h kfile.h last.h ndir.h ng.h Xh3 = ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h Xh4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h X#NNTPh5 = server.h X Xh = $(h1) $(h2) $(h3) $(h4) $(h5) X Xc1 = addng.c art.c artio.c artsrch.c backpage.c bits.c cheat.c Xc2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c Xc3 = ngdata.c ngsrch.c ngstuff.c only.c rcln.c rcstuff.c respond.c rn.c Xc4 = rthreads.c rt-rn.c rt-select.c search.c sw.c term.c threads.c util.c Xc5 = uudecode.c X#NNTPc6 = $(NNTPDIR)/common/clientlib.c X Xc = $(c1) $(c2) $(c3) $(c4) $(c5) $(c6) Xmtc = mthreads.c mt-read.c mt-process.c mt-write.c threads.c $(c6) X Xobj1 = addng.o art.o artio.o artsrch.o backpage.o bits.o cheat.o Xobj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o Xobj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o respond.o rn.o Xobj4 = rthreads.o rt-rn.o rt-select.o search.o sw.o term.o threads.o util.o Xobj5 = uudecode.o X#NNTPobj6 = $(NNTPDIR)/common/clientlib.o X Xobj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5) $(obj6) Xmtobj = mthreads.o mt-read.o mt-process.o mt-write.o threads.o getdate.o $(obj6) X Xlintflags = -phbvxac X Xadd1 = Makefile.old Pnews Rnmail Xadd2 = bsd config.h config.sh eunice filexp Xadd3 = loc makedepend makedir mbox.saver newsetup Xadd4 = newsgroups newsnews norm.saver Xadd5 = pdp11 usg v7 ultrix sun hp-ux pyr sgi xenix server.h X Xaddedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) X X# grrr XSHELL = /bin/sh X X.c.o: X $(CC) -c $(CFLAGS) $*.c X Xall: $(public) $(private) $(util) X touch all X Xtrn: $(obj) X $(CC) $(LDFLAGS) $(obj) $(libs) -o trn X Xmthreads: $(mtobj) X $(CC) $(LDFLAGS) $(mtobj) $(mlibs) -o mthreads X X#NNTPgetactive: getactive.o $(NNTPDIR)/common/clientlib.o X#NNTP $(CC) $(LDFLAGS) getactive.o $(NNTPDIR)/common/clientlib.o -o getactive $(libs) X X# Eek! This is gross. X$(NNTPDIR)/common/clientlib.o: X $(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c X mv clientlib.o $(NNTPDIR)/common/clientlib.o X X# if a .h file depends on another .h file... X$(h): X touch $@ X Xinstall: $(public) $(private) $(manpages) X# won't work with csh X export PATH || exit 1 X - mv $(rnbin)/trn $(rnbin)/trn.old X#NNTP - ln -s trn $(rnbin)/trrn X - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi X cd $(rnbin); chmod 755 $(public); strip trn X chmod 755 makedir X - ./makedir `./filexp $(rnlib)` X - mv $(rnlib)/mthreads $(rnlib)/mthreads.old X - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi X - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi X cd `./filexp $(rnlib)`; chmod 755 $(private); chmod 644 INIT newsnews; strip mthreads X - if test `pwd` != $(mansrc); then \ Xfor page in $(manpages); do \ Xcp $$page $(mansrc)/`basename $$page .1`.$(manext); \ Xdone; \ X#NNTPecho ".so man$(manext)/trn.$(manext)" > $(mansrc)/trrn.$(manext) ; \ Xfi X Xclean: X rm -f *.o X Xrealclean: X rm -f trn mthreads *.o core $(addedbyconf) X#NNTP rm -f $(NNTPDIR)/common/clientlib.o getactive X X# The following lint has practically everything turned on. Unfortunately, X# you have to wade through a lot of mumbo jumbo that can't be suppressed. X# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message X# for that spot. X Xlint: lint_trn lint_mt X Xlint_trn: X lint $(lintflags) $(defs) $(c) > trn.fuzz X Xlint_mt: X lint $(lintflags) $(mtc) > mt.fuzz X Xdepend: X ./makedepend X X# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE X$(obj): X @ echo "You haven't done a "'"make depend" yet!'; exit 1 X!NO!SUBS! Xcase "$isrrn" in Xdefine) sed < Makefile -e '/^#NNTP/s/^#NNTP//' > Makefile.new ;; X*) sed < Makefile -e '/^#NNTP/d' > Makefile.new ;; Xesac Xmv Makefile.new Makefile X$eunicefix Makefile SHAR_EOF chmod 0770 Makefile.SH || echo "restore of Makefile.SH fails" echo "x - extracting trn.1 (Text)" sed 's/^X//' << 'SHAR_EOF' > trn.1 && X''' $Header: trn.1,v 4.3.3.1 90/07/24 21:30:38 davison Trn $ X''' X''' $Log: trn.1,v $ 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 SHAR_EOF echo "End of part 1" echo "File trn.1 is continued in part 2" echo "2" > s2_seq_.tmp exit 0 -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.