Newsgroups: comp.sources.unix From: davison@borland.com (Wayne Davison) Subject: v27i105: trn-3.3 - threaded newsreader based on RN, V3.3, Part12/12 References: <1.754431075.7231@gw.home.vix.com> Sender: unix-sources-moderator@gw.home.vix.com Approved: vixie@gw.home.vix.com Submitted-By: davison@borland.com (Wayne Davison) Posting-Number: Volume 27, Issue 105 Archive-Name: trn-3.3/part12 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'trn.1' <<'END_OF_FILE' X.\" $Id: trn.1,v 3.0 1992/12/14 00:14:10 davison Trn $ X.\" X.\" This software is Copyright 1991 by Stan Barber. X.\" X.\" Permission is hereby granted to copy, reproduce, redistribute or otherwise X.\" use this software as long as: there is no monetary profit gained X.\" specifically from the use or reproduction of this software, it is not X.\" sold, rented, traded or otherwise marketed, and this copyright notice is X.\" included prominently in any copy made. X.\" X.\" The authors make no claims as to the fitness or correctness of this software X.\" for any use whatsoever, and it is provided as is. Any use of this software X.\" is at the user's own risk. 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.\" unbreakable dash. X.tr \(*W-|\(bv\*(Tr X.ie n \{\ X.ds -- \(*W- X.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch X.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\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 has replies \*(-- a good Xthing to check before posting. XIn addition, X.I trn Xhas a thread selector that allows you to quickly browse through a Xlist of subjects and choose the ones you find interesting. XThis thread selector sorts articles according to various criteria Xand can be switched Xinto various display modes that allows you to pick all the subjects Xseparately (threads can have multiple subjects) or even pick individual Xarticles. XAny items you don't select can be saved for reading later or Xmarked as read with a single keystroke. X.PP XIf you are already familiar with X.I trn Xyou may just want to read the X.IR "WHAT'S NEW" Xsection. XPeople upgrading from X.I rn Xwill probably want to pay attention to the sections on X.IR "The Selector" , X.IR "The Tree Display" , Xand the aforementioned X.IR "WHAT'S NEW" . XIf you're impatient, just dive in and get started. XAll the regular commands will be familiar to an X.I rn Xor X.I trn Xuser, and the on-line help will give you a quick run-down of what commands Xare available (just type \*(L'h\*(R' from any prompt). XI'd also suggest using the command: X.Sp X trn \-x \-X X.Sp Xto make sure some of the best features are turned on. X.Sh "Starting Trn" XIf no newsgroups are specified, all the newsgroups which have unread news Xwill be presented to the user in the order in which they occur in the X.I .newsrc Xfile. XAt the prompt for each group you can choose to read it, skip it, move it, Xetc. XIf a list of newsgroups is provided on the command line, 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 (see also Xthe discussion of the \*(L'a\*(R' command on the newsgroup-selection level). X.PP X.I Trn Xoperates on four levels: the newsgroup-selection level, the thread Xselector, the article-reading 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 article-reading level articles are presented to you in the Xorder of their replies, with the subjects being ordered by the date Xof the oldest unread article (though there are commands for changing Xthe default display order). XIn the thread selector you are presented with the subjects and X(usually) 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 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 XOn any level, at ANY prompt, help is available by typing an \*(L'h\*(R'. XThis gives you a summary of available commands and what they do. XRemember this command, you'll need 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 Xunless the group is set for unthreaded reading, in which case the first Xsix characters are \*(L"******\*(R". XThe following commands may be given at this level: X.Ip \+ 8 XEnter this newsgroup through the selector. X.Ip y 8 XBegin reading this newsgroup now. X.Ip SP 8 XEnter the newsgroup by executing the default command listed in []'s. X.Ip .command 8 XDo this newsgroup now, but execute X.I command Xbefore displaying anything. XThe command will be interpreted as if typed on the article selection level. 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 t 8 XToggle the newsgroup between threaded and unthreaded reading. XThe default is threaded, and the current setting is stored in your .newsrc. 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 , Xwhich can be the group's name or a zero-relative number of the groups in Xyour .newsrc (see the \*(L'L\*(R' command to list your .newsrc). 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' \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 A 8 XAbandon the changes made to the current newsgroup since X.I trn Xwas started. XUseful when you accidentally mark a group as read. X.Ip "o {pattern}" 8 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. XUsing \*(L'O\*(R' will omit empty groups from the cycle. X.Ip "a pattern" 8 XAdd unsubscribed newsgroups matching X.IR pattern . XIf any matching newsgroups are found, you will be asked for each one whether Xyou would like to add it. XIf you want to add all the newsgroups, you can Xtype \*(L'Y\*(R' and they will be added the the end of the X.I .newsrc Xfile. XIf you don't want to subscribe, all Xthe remaining groups can be ignored by typing \*(L'N\*(R'. 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 is usually /usr/spool/news unless you're Xusing NNTP to read news. XThe environment variable SHELL will be used if defined. XIf X.I command Xis null, an interactive shell is started. X.Ip v 8 XPrint the current version number and information on where to send bug Xreports. 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 list of memorized commands (in the global KILL file) that Xyou wish to be performed in every newsgroup as it is started up (that is, when Xit is selected at the newsgroup-selection level). XThis file contains commands (one per line) such as /subject/:j or /author/f:+ Xto kill or select articles based on the indicated search criteria. XThere is also a local list of commands for each newsgroup that can contain Xkill/selection commands tailored for each specific group. XBecause of the overhead involved in searching for articles to kill, it is Xbetter if possible to use a local list rather than the global one. XLocal memorized commands are usually maintained by using the \*(L'A\*(R' Xor \*(L'T\*(R' commands from the article/pager level or in the selector. XThere is also a K search modifier that appends any search command you Xdesire to add. XIt is also possible to manually edit the file with the \*(L'^K\*(R' Xcommand from anywhere inside a newsgroup. XIf either of the environment variables VISUAL or EDITOR is set, the Xspecified editor will be invoked; otherwise a default editor Xis invoked on the KILL file. X.Sh "The Selector" XMost people who don't have all day to read news will want to enter a newsgroup Xby way of the selector. XThis is accomplished by using the \*(L'+\*(R' Xcommand at the newsgroup-selection or article/pager levels. XIn fact, this may be the default command for entering a newsgroup, depending Xon how your version of X.I trn Xwas configured and your use of the X.B \-X Xoption. X.PP XThe selector displays a list of articles by their subjects and (usually) Xauthors. XThe articles are grouped into threads by default (which may list multiple Xsubjects per selectable item if the subject has changed during the discussion) Xand ordered by the date of their oldest unread article. XThread or subject groups are also shown with a count of the number of Xarticles in each group. XEach selectable item is preceded by a letter or number that can be typed Xto toggle its selection. XItems that are selected are flagged with a \*(L'+\*(R' after their letter. XGroups that have only some of their articles selected are flagged with Xa \*(L'*\*(R'. XYou can change the selector's mode (to pick each subject separately or Xpick individual articles), order the list by a variety of sort Xcriteria, and switch the author display between its long, medium and short Xstyles using the commands detailed below. X.PP XThe following commands are available in the selector: X.Ip "a-z,0-9,A-Z" 8 XSelect/deselect the indicated item by its letter or number. XThere are quite a few letters omitted from the alpha characters to be Xtyped as commands \*(-- see below. XAlso, the variable SELECTCHARS is available to customize which characters Xyou want to be used as selection letters, overriding their command function. X.Ip SP 8 XPerform the default command. XThis is usually > for most pages, and Z on the last page (although D and X Xare also quite popular). X.Ip CR 8 XBegin reading. XIf no articles are selected, the current item is selected (unless you've Xmarked it as killed). X.Ip "Z,TAB" 8 XBegin reading. XIf no articles are selected, read all unread articles. X.Ip "\*(L'.\*(R'" 8 XToggle the current item's selection (the one under the cursor). X.Ip * 8 XSame as \*(L'.\*(R' except that it affects all articles with the same Xsubject (useful in the article selector). X.Ip # 8 XMake an overriding selection that reads the current item only, Xtemporarily ignoring all other selections. X.Ip "k, \*(L',\*(R'" 8 XMark the current item as killed. X.Ip "m, \e" 8 XUnmark the current item. X.Ip \- 8 XSet a range, as in a \- k. XRepeats the last marking action: selection, deselection, killing, Xor unmarking. X.Ip @ 8 XToggle all visible selections. X.Ip M 8 XMark the current item's article(s) to return on newsgroup exit Xand kill the item. X.Ip Y 8 XYank back and select the marked-to-return articles, clearing their Xto-return status. X.Ip E 8 XExclude all unselected items from the selection list (narrow the display). XPress it again to pick from all available items. X.Ip "n, ]" 8 XMove down to the next item (try the down-arrow keypad key also). X.Ip "p, [" 8 XMove up to the previous item (try the up-arrow keypad key also). X.Ip < 8 XGo to previous page (try the left-arrow keypad key also). X.Ip > 8 XGo to next page (try the right-arrow keypad key also). X.Ip ^ 8 XGo to the first page. X.Ip $ 8 XGo to the last page. X.Ip S 8 XSet the items the selector displays: threads, subjects or articles. XIf the group is unthreaded setting this to threads will thread the Xgroup. X.Ip = 8 XSwitch between the article selector and the subject/thread selector. X.Ip O 8 XPick the order for the items: date, subject, author, item count X(for thread/subject groups), and a subject-date grouping of Xindividual articles. XTyping the selection in lower-case will sort the articles in the Xdefault direction, while using upper-case will reverse the sort. XThere is a separate default sort order for the subject/thread selector Xand the article selector. XSee the X.B \-O Xoption to set your favorite selector mode and sort order as the default. X.Ip R 8 XReverse the current sort order. X.Ip L 8 XSwitch the selector's display between the long, medium and short Xdisplay styles. XSee the X.B \-x Xoption to set your favorite style as the default. X.Ip U 8 XSwitch between selecting unread/read articles. X.Ip X 8 XMark all unselected articles as read and start reading. X.Ip D 8 XMark unselected articles on the current page as read and Xbegin reading if articles are selected, otherwise go to the next page. X.Ip J 8 XMark all selected articles as read (useful after performing some action Xon them with the \*(L':\*(R' command). X.Ip c 8 XCatch up \*(-- marks ALL articles as read without affecting their cross-posted Xcounterparts. X.Ip A 8 XAdd a subject-search command to the memorized list (a.\|k.\|a. a KILL file) Xfor this group. XYou are prompted to choose selection (+), junking (j), Xselection including all replies (.) or junking including all replies (,). XIf the thread has more than one subject the first subject is the one Xchosen for the memorized command. X.Ip T 8 XAdd a thread-oriented command to the memorized list for this group. XYou are prompted to choose selecting the thread (+), junking the Xthread (j), or clearing the auto-selection/junking for the thread (c). X(Note: there are three other options (\*(L'.\*(R', \*(L',\*(R', Xand \*(L'C\*(R') on the Xarticle-reading level \*(-- look there for an explanation of their use.) X.Ip ^K 8 XEdit the local list of memorized commands (a.\|k.\|a. a KILL file) for this Xnewsgroup. XA detailed description of memorized commands is found in the Article Selection Xsection. X.Ip ":command" 8 XApply a command to all selected articles. XIf nothing is selected, nothing is done. X.Sp XApplicable commands include \*(L'+\*(R'/\*(L'-\*(R' (select/deselect Xan article), \*(L"++\*(R"/\*(L"--\*(R" (select/deselect a thread), X\&\*(L"T+\*(R" (auto-select the entire thread), \*(L"Tj\*(R" X(auto-junk the entire thread), \*(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 \*(L',\*(R'. X.Ip "/pattern" 8 XScan all articles for a subject containing X.I pattern Xand select it. 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 article's Xitem in the selector (e.\|g. the entire thread (\*(L"++\*(R") in the thread Xselector). 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\*(R" Xanywhere in the article and then select its group and save the articles to Xthe files topic.1, topic.2, etc. use \*(L"/topic/a:++:s topic.%#\*(R". X.Ip N 8 XGo to the next newsgroup with unread news. X.Ip P 8 XGo to the previous newsgroup with unread news. 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 8 XQuit this group. X.Ip "ESC,+" 8 XQuit the selector to the article level. XNote: ESC won't work if trn has mapped your arrow keys with default macros Xand the first character that your arrow keys send is an ESC. X.Ip Q 8 XQuit the current newsgroup and return to the newsgroup-selection prompt Xfor this group. X.Sh "Article-Reading Level" XOn the article-reading level, X.I trn Xdisplays unread articles in thread sequence (reading each article and its Xreplies before going on to another topic) unless threads are disabled for Xa particular group, in which case the default order is the order they Xarrived at your site (numeric sequence). XIn either case if you use the subject-search command (^N) you will switch Xto reading the articles in date order within each matching subject. X(Making selections in the subject selector or using the X.B \-S Xswitch will automatically turn subject search mode on in an unthreaded group.) X.Sp XOn the article-reading 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 an Xarticle and asks if you want to continue. XThe normal article-reading prompt comes at the END of an article X(although article-reading commands can also be given from within the middle Xof an article in addition to the pager level commands). 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 automatically 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 XFind the next article with the same subject in date order. XThis also makes subject search mode (^N) the default command at the end Xof an article. 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 XFind the previous article with the same subject in date order. XMakes subject search mode (^N) the default. X.Ip _N 8 XGo to the next article in numeric sequence. X.Ip _P 8 XGo to the previous article in numeric sequence. X.Ip "<, >" 8 XBrowse the previous/next selected thread/subject. XIf no selections have been made, all the threads that had unread news when Xyou entered the newsgroup (or last left the 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. XTry using the left-/right-arrow keys also. 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 "(, )" 8 XGo to the previous/next sibling in the thread, including \*(L"cousin\*(R" Xsiblings. XTry using the up-/down-arrow keys also. X.Ip t 8 XDisplay the entire article tree and all its associated subjects. XIf the group is not currently threaded, it will become threaded to Xprocess this command. 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
or X\-. 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(mark as read-until-exit), \*(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'+\*(R'/\*(L'-\*(R' (select/deselect the article), X\&\*(L'T+\*(R' (auto-select the entire thread), \*(L'Tj\*(R' X(auto-junk the entire thread), \*(L"++\*(R"/\*(L"--\*(R" (select/deselect Xthe associated thread), \*(L'C\*(R' (cancel), Xas well as S, |, w, W, and t. X.Ip ":command" 8 XApply a command to all selected articles. XIf nothing is selected, nothing is done. XFor applicable commands, see the discussion above for the range command. X.Ip j 8 XJunk the current article (i.\|e. 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 don't want to see this article for a while you're probably better Xoff using M instead of m, otherwise this article might get picked again Xas the first available article sooner than you'd like.) X.Ip M 8 XMark the current article to return on newsgroup exit. XUntil then, the current article will be marked as read. XThis is useful for returning to an article in another session. X.Ip Y 8 XYank back the marked-to-return articles, clearing their to-return status. XIf you are reading selected articles, the yanked articles come back selected. X.Ip /pattern 8 XScan forward for article containing X.I pattern Xin the subject. XSee the Regular Expressions section. 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 ESC. XIf X.I pattern Xis omitted, the previous pattern is assumed. X.Ip /pattern/f 8 XScan forward for article containing X.I pattern Xin the from line. XIf you are using thread files the article data you are matching against XMAY contain only the real name of the user. XIf you want to always match the full from line, see the following Xheader-matching option that will read in the full from-line data if Xit is not already available. X.Ip /pattern/Hheader 8 XScan forward for article containing X.I pattern Xin the indicated X.Ip header . XBecause we scan the entire string up to the end of the modifiers, this Xmodifier must be the last one. XFor example, \*(L"/jsmoe@somesite.com/rHfrom:m+\*(R" will mark all Xarticles from \*(L"jsmoe@somesite.com\*(R" as unread and select them. XNote that if the header line isn't one that trn recognizes in its Xheader parser, you'll have to use the following full-header matching. 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 the 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(mark as read-until-exit), \*(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'+\*(R' (select the article), \*(L'-\*(R' deselect the article, X\&\*(L'T+\*(R' (auto-select the entire thread), \*(L'Tj\*(R' X(auto-junk the entire thread), \*(L"++\*(R" (select the associated thread), X\&\*(L"--\*(R" deselect the 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"/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 current thread, even if it contains multiple Xsubjects. X.Ip A 8 XAdd a subject-search command to the memorized list for this group (in the XKILL file). XYou are prompted to choose selection (+), junking (j), Xselection including all replies (.) or junking including all replies (,). X.Ip K 8 XThis is a synonym for the command \*(L"Aj\*(R" which adds a command to Xjunk the current subject to the memorized commands for the group. XSee also the K modifier on searches above. X.Ip T 8 XAdd a thread-oriented command to the memorized list for this group. XYou are prompted to choose selection of entire thread (+), junking of Xentire thread (j), selection of an article and its replies (.), junking Xof an article and its replies (,), clearing the auto-selection/junking Xfor this thread (c), or clearing the auto-selection/junking for an article Xand its replies (C). X.Ip ^K 8 XEdit the local list of memorized commands (a.\|k.\|a. a KILL file) for this Xnewsgroup. XEach line of the KILL file is either a subject-affecting command of the Xform /pattern/x or a thread-affecting command of the form Tx. XThe first line in the KILL file has the form \*(L"THRU \*(R", Xwhich tells X.I trn Xthe maximum article number that the KILL file has been applied to. XThe THRU value is usually only used to keep header or article searches Xfrom happening multiple times. XSubject and from-line searches are quite fast if the group has cached data Xaround (e.\|g. a .\|thread or .\|overview file). XIf it doesn't, the THRU line is used to set a lower boundary on the Xsearch to keep the startup time as short as possible. XIf trn skipped some selections (or you're not sure), wait for the group to Xfinish being cached (e.\|g. visiting the selector forces the caching of Xall unread articles), quit the group, and re-enter. X.Sp XTo see only newgroup articles in the control newsgroup, for instance, you Xmight include the line X.Sp X/newgroup/:+ X.Sp Xwhich selects all subjects containing \*(L"newgroup\*(R". XYou can add lines automatically via the A and T commands as well as the XK search modifier, but editing is the only way to remove subject commands X(thread commands die automatically as the thread dies). 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' X(see the section on \*(L"Options\*(R") and special commands beginning Xwith \*(L'*\*(R'. XThere are two such commands at the moment: \*(L"*j\*(R" (junk all articles Xfrom THRU to the end of the group) and \*(L"*X\*(R" (junk all X.I unselected Xarticles from THRU to the end of the group). 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 the environment section). XIf the current article does not exist (such as the \*(L"End of newsgroup\*(R" Xpseudo-article you can get to with a \*(L'$\*(R' command), invokes the mailer Xto nobody 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 follow-up article. XIf the current article does not exist (such as the \*(L"End of newsgroup\*(R" Xpseudo-article you can get to with a \*(L'$\*(R' command), posts an original X(root) article. X.Ip F 8 XSubmit a follow-up article, and include the old article, with lines prefixed Xeither by \*(L">\*(R" or by the argument to the 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.Ip C 8 XCancel the current article, but only if you are the contributor or superuser. X.Ip z 8 XSupersede the current article, but only if you are the contributor. X.Ip Z 8 XSame as the \*(L'z\*(R' command, but you start with a copy of the Xoriginal article to work with. 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 selector Xto choose specific articles 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 a non-absolute filename is specified, 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, the first non-blank line after it Xmust 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 an article range to execute the Xcommand, or use the \*(L":e\*(R" command to repeat the command for each of the Xcurrently selected articles. XWhen the \*(L'e\*(R' command is not followed by any arguments, it will Xrepeat the arguments from the last extraction. XAll directory specifications are relative to the value of SAVEDIR, so you Xcan use the command \*(L"e .\*(R" to force an extraction to SAVEDIR itself. XIf a uudecoding is in progress (i.\|e. 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 is handled differently: if the 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 sent to the specified command. XAdditionally, the distinctive beginning of a shell archive is also recognized Xwithout a preceding cut line. XWhen the command is run, the default directory will be set to the Xspecified directory, or the value Xof SAVEDIR if unspecified. XEntering the \*(L'e\*(R' command without arguments will repeat your Xprevious extract command. XYou can use the command \*(L"e dir|\*(R" to extract to a new directory Xusing the previously-specified command. 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 selector in the last-used mode. XIf the newsgroup is unthreaded and the default selector mode is threads, Xwe temporarily switch to subject selection unless manually overridden. X.Ip _a 8 XStart the selector in article mode. X.Ip _s 8 XStart the selector in subject mode. X.Ip _t 8 XStart the selector in thread mode. X.Ip _T 8 XStart the selector in thread mode unless the group isn't threaded, in Xwhich case we settle for the subject selector. X.Ip = 8 XList subjects of unread articles. X.Ip # 8 XPrint last article number. X.Ip _+ 8 XSelect the entire thread associated with the current article. X.Ip _- 8 XDeselect the entire thread associated with the current article. 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. XIf the group is not currently threaded, it will be threaded first. 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 # $ & / = ? A 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.in +4n X(1)+-(1)--(\fI2\fP)--\fI[2]\fP X\h'\w'(1)'u'|-(1)+-<3> X\h'\w'(1)'u'|\h'\w'-(1)'u'\\-[1] X\h'\w'(1)'u'\\-(1)+-[1]--[1] X\h'\w'(1)+-(1)'u'\\-[1] X.in -4n 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. X.PP XThe third subject is not selected for reading, as indicated by the <>'s. XNote you can always forcefully visit an unselected article with \*(L'N\*(R' Xand \*(L'P\*(R' as well as the thread-navagation commands (which are Xtypically macro'ed to the arrow keys on your keypad). X.PP 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. X.PP XThe articles that have already been read are enclosed in ()'s, XUnread articles are displayed in []'s, and unread-but-unselected articles Xare displayed in <>'s. XThe currently displayed article has its entire node highlighted in the Xdisplay. XThe previously displayed article has only its number highlighted. XIf the group has not been completely threaded yet, some articles will Xappear as (?) until trn can determine if the referenced article truly Xexists or not. XIf you visit such an article and wait for trn to finish threading the Xgroup, the screen will refresh as soon as the presence or absence of Xthe article is determined. 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"\-x6ms \-e \+m \-S -XX -N -B -p\*(R".) XThese options may be set on the command line, via the TRNINIT Xenvironment variable, via a file pointed to by the TRNINIT 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 Xcauses trn to always thread the unread articles on entry to a group. XWithout this option trn may enter a group in a partially-threaded Xstate and process the unthreaded articles in the background. XThe down side of this is that the tree display may not be complete when Xit is first displayed and you may start out at an odd position in the Xfirst thread's article tree. X.TP 5 X.B \-A Xtells trn to attempt to create some default macros that will map your Xarrow keys to useful trn functions (this is the default). XUse X.B +A Xto turn this behavior off. X.TP 5 X.B \-b Xwill force trn to read each thread in a breadth-first order, rather than Xdepth-first. X.TP 5 X.B \-B Xwill turn on a spinner that twirls when trn is doing background Xarticle-processing. XA gizmo for those interested in what's going on behind the scenes. 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 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 check-pointing situation doesn't arise within 10 more Xarticles, the X.I .newsrc Xis check-pointed willy-nilly. X.TP 5 X.B \-d 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 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 conjunction 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= Xsets the environment variable 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 Xwill make trn avoid various sleep calls and the prompt after the processing Xof the memorized commands that are intended to allow you time to read a Xmessage before the screen clears. XThis allows the advanced user to cruise along a little faster at the Xexpense of readability. XThe \-t (terse) option turns on -f by default, but you can override this Xby specifying \+f after the \-t option. X.TP 5 X.B \-F Xsets the prefix string for the \*(L'F\*(R' follow-up command to use in Xprefixing each line of the quoted article. XFor example, \*(L"\-F\*(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 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 \-G Xselects the "fuzzy" processing on the go command when you don't type in a Xvalid group name. XWith this option on trn will attempt to find the group you probably meant Xto type, but it can be a little slow about it, so it's not on by default. X.TP 5 X.B \-h Xhides (disables the printing of) all header lines beginning with X.I string Xthat trn recognizes. XFor instance, \-hexp will disable the printing of the \*(L"Expires:\*(R" line. XCase is insignificant. XHeaders unknown to trn cannot be disabled except by turning them all off X(\-h without a string will disable all headers except the Subject) Xand then using 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 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 Date line prints the date in local time if the group is threaded; Xthe From line will only print the commented portion of the user name; 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]); Xand the Expires line will always be suppressed if there is nothing on it. 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= 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 \-I Xtells trn to append all new, unsubscribed groups to the end of the .newsrc. X.TP 5 X.B \-j Xforces trn to leave control characters unmolested in messages. 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= 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 \-o Xwill act like old versions of trn and not junk cross-referenced articles Xwhen using thread commands to junk articles in the current group (such as Xthe selector's \*(L'X\*(R' command). X.TP 5 X.B \-O{} Xspecifies the selector's mode and (optionally) the sort order. XThe modes are \*(L'a\*(R'rticle, \*(L's\*(R'ubject, or \*(L't\*(R'hread. XThe orders are \*(L'd\*(R'ate, \*(L's\*(R'ubject, \*(L'a\*(R'uthor, Xarticle \*(L'c\*(R'ount per group, or subject-date \*(L'g\*(R'roups. XThe order can be capitalized to reverse the indicated order. XFor example, to choose the article selector in subject order specify X\*(L"-Oas\*(R". X.TP 5 X.B \-p Xtells trn to auto-select your postings and their replies as it encounters them Xin the various groups you read. X.TP 5 X.B \-q Xbypasses the automatic check for new newsgroups when starting X.IR trn . X.TP 5 X.B \-r Xcauses X.I trn Xto restart in the last newsgroup read during a previous session with X.IR 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 Xcauses X.I trn Xto enter subject search mode (^N) automatically whenever an unthreaded Xnewsgroup is Xstarted up with 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 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. XOrdinarily rn will eat typeahead to prevent your autorepeating space bar from Xdoing a very frustrating thing when you accidentally hold it down. XIf you don't have a repeating space bar, or you are working at low baud Xrate, you can set this switch to prevent this behavior. XYou may wish to use the baud-rate switch modifier below to disable typeahead Xonly at lower baud rates. X.TP 5 X.B \-u Xsets the unbroken-subject-line mode in the selector, which simply truncates Xsubjects that are too long instead of dumping the middle portion prior to Xthe last two words of the subject. X.TP 5 X.B \-U Xtells trn to not write the .newsrc file out after visiting each group. XWhile this is \*(L"unsafe\*(R" it can be faster if you have a really Xhuge .newsrc. X.TP 5 X.B \-v Xsets verification mode for commands. XWhen set, the command being executed is displayed to give some feedback that Xthe key has actually been typed. XUseful when the system is heavily loaded and you give a command that takes Xa while to start up. X.TP 5 X.B \-x{}{} XEnable the extended (threaded) features of X.I trn Xbeyond the X.I rn Xcompatibility mode X(this may be the default on your system, use +x if you yearn for the good Xol' days). XThe is the maximum number of article-tree lines (from 0 to 11) Xyou want displayed in your header. XUse the to choose which thread selector styles you like X(\*(L's\*(R'hort, \*(L'm\*(R'edium, or \*(L'l\*(R'ong), and in what order Xthey are selected with the \*(L'L\*(R' command. XFor example, use X.B \-xms Xto start with the medium display mode and only switch between it and Xthe short mode. XYou can omit either or both of the parameters, in which case a default of X.B \-x6lms Xis assumed. X.TP 5 X.B \-X{}{} XIf you like using the selector, you'll probably want to use this Xoption to make the selector command (+) the default when a newsgroup Xis started up with at least unread articles. X(Your installer may have chosen to make -X1 the default on your system.) XIt is also used to select which commands you want to be the defaults while Xusing the thread selector. XFor example, X.B \-X2XD Xwill make the thread selector the default command for entering a newsgroup Xwith at least 2 unread articles, and set the default command for the LAST Xpage of the thread selector to be the X.B X Xcommand and the default command for all other pages to be the X.B D Xcommand. XEither or both parameters can be omitted, as well as the second default Xcommand (e.\|g. X.B \-XX Xwould change the default newsgroup entry to use the selector and the default Xcommand for the last page of the selector to be \*(L'X\*(R'). XThe default is X.B \-X1Z> Xif just X.B \-X Xis specified. XTo set the default selector commands without having \*(L'+\*(R' be the Xdefault entry into a newsgroup, specify a high number, like 9999. X.TP 5 X.B \-z Xsets the minimum number of minutes that must elaps before the active file Xis refetched to look for new articles. XA value of 0 or using +z turns this off. X.TP 5 X.B \-Z Xis used to select what style of database you want trn to access. XUse \-Zt for thread files, \-Zo for overview files, and +Z for none. XThe default is whatever your newsadmin compiled into trn, and can Xbe \-Zot to try to access either one. X.TP 5 X.B \-/ Xsets SAVEDIR to \*(L"%p/%c\*(R" and SAVENAME to \*(L"%a\*(R", which means Xthat by default articles are saved in a subdirectory of your private news Xdirectory corresponding to the name of the the current newsgroup, with the Xfilename being the article number. X.B +/ Xsets SAVEDIR to \*(L"%p\*(R" and SAVENAME to \*(L"%^C\*(R", which by Xdefault saves articles directly to your private news directory, with the Xfilename being the name of the current newsgroup, first letter capitalized. X(Either X.B +/ Xor X.B \-/ Xmay be default on your system, depending on the feelings of your news Xadministrator when he, she or it installed X.IR trn .) XYou may, of course, explicitly set SAVEDIR and SAVENAME to other Xvalues \*(-- see discussion in the environment section. X.PP XAny switch may be selectively applied according to the current baud-rate. XSimply prefix the switch with +speed to apply the switch at that speed or Xgreater, and \%\-speed to apply the switch at that speed or less. XExamples: \%\-1200\-hposted suppresses the Posted line at 1200 baud or less; X\%+9600\-m enables marking at 9600 baud or more. XYou can apply the modifier recursively to itself also: \%+300\-1200\-t sets Xterse mode from 300 to 1200 baud. X.PP XSimilarly, switches may be selected based on terminal type: X.Sp X \-=vt100+T set +T on vt100 X.br X \-=tvi920\-ETERM=mytvi get a special termcap entry X.br X \-=tvi920\-ERNMACRO=%./.rnmac.tvi X.br X set up special key-mappings X.br X +=paper\-v set verify mode if not hardcopy X.PP XSome switch arguments, such as environment variable values, may require Xspaces in them. XSuch spaces should be quoted via ", ', or \e in the conventional fashion, Xeven when passed via TRNINIT or the & command. X.Sh "Regular Expressions" XThe patterns used in article searching are regular expressions such as Xthose used by X.IR ed (1). XIn addition, \ew matches an alphanumeric character and \eW a non-alphanumeric. XWord boundaries may be matched by \eb, and non-boundaries by \eB. XThe bracketing construct \e(\ ...\ \e) may also be used, and \edigit matches Xthe digit'th substring, where digit can range from 1 to 9. X\e0 matches whatever the last bracket match matched. XUp to 10 alternatives may given in a pattern, separated by \e|, with the Xcaveat that \e(\ ...\ \e|\ ...\ \e) is illegal. X.Sh "Interpretation and Interpolation" XMany of the strings that X.I trn Xhandles are subject to interpretations of several types. XUnder filename expansion, an initial \*(L"~/\*(R" is translated to the name Xof your home directory, and \*(L"~name\*(R" is translated to the login Xdirectory for the user specified. XFilename expansion will also expand an initial environment variable, and Xalso does the backslash, caret and percent expansion mentioned below. X.PP XAll interpreted strings go through backslash, caret and percent Xinterpretation. XThe backslash escapes are the normal ones (such as \en, \et, \e033, etc.). XThe caret escapes indicate control codes (such as ^i, ^l, etc.). XIf you wish to pass through a backslash or a caret it must be escaped with Xa backslash. XThe special percent escapes are similar to printf percent escapes. XThese cause the substitution of various run-time values into the string. XThe following are currently recognized: X.Ip %a 8 XCurrent article number. X.Ip %A 8 XFull name of current article (%P/%c/%a). X.Ip %b 8 XDestination of last save command, often a mailbox. X.Ip %B 8 XThe byte offset to the beginning of the part of the article to be saved, Xset by the save command. XThe \*(L's\*(R' and \*(L'S\*(R' commands set it to 0, and the \*(L'w\*(R' Xand \*(L'W\*(R' commands set it to the byte offset of the body of the article. X.Ip %c 8 XCurrent newsgroup, directory form. X.Ip %C 8 XCurrent newsgroup, dot form. X.Ip %d 8 XFull name of newsgroup directory (%P/%c). X.Ip %D 8 X\*(L"Distribution:\*(R" line from the current article. X.Ip %e 8 XThe last command executed to extract data from an article. X.Ip %E 8 XThe last directory where an extracted file went. X.Ip %f 8 X\*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R" Xline if there is one. XThis differs from %t in that comments (such as the full name) are not Xstripped out with %f. X.Ip %F 8 X\*(L"Newsgroups:\*(R" line for a new article, constructed from X\*(L"Newsgroups:\*(R" and \*(L"Followup-To:\*(R" lines of current article. X.Ip %h 8 XName of the header file to pass to the mail or news poster, Xcontaining all the information that the poster program needs in the Xform of a message header. XIt may also contain a copy of the current article. XThe format of the header file is controlled by the MAILHEADER and NEWSHEADER Xenvironment variables. X.Ip %H 8 XHost name (your machine's name). X.Ip %i 8 X\*(L"Message-I.D.:\*(R" line from the current article, with <> guaranteed. X.Ip %I 8 XThe reference indication mark (see the X.B \-F Xswitch.) X.Ip %l 8 XThe news administrator's login name, if any. X.Ip %L 8 XLogin name (yours). X.Ip %m 8 XThe current mode of X.I trn, Xfor use in conditional macros. X.Sp X.nf X i Initializing. X n Newsgroup-selection level. X f end (Finis) of newsgroup-selection level. X t the Thread/subject/article selector. X a Article level (What next?). X e End of the article level. X p Pager level (MORE prompt). X u Set-unread prompt. X d selector moDe prompt. X o selector Order prompt. X m Memorize thread command prompt. X r memoRize subject command prompt. X k processing memorized (KILL file) commands. X A Add this newsgroup? X B aBandon confirmation. X C Catchup confirmation. X D Delete bogus newsgroups? X F Is follow-up a new topic? X M Use mailbox format? X R Resubscribe to this newsgroup? X.fi X.Sp XNote that yes/no questions are all upper-case modes. XIf, for example, you wanted to disallow defaults on all yes/no questions, Xyou could define the following macro: X.Sp X.nf X\e040 %(%m=[A-Z]?h: ) X.fi X.Ip %M 8 XThe number of articles marked to return via the \*(L'M\*(R' command. XIf the same article is Marked multiple times, \*(L"%M\*(R" counts it Xmultiple times in the current implementation. X.Ip %n 8 X\*(L"Newsgroups:\*(R" line from the current article. X.Ip %N 8 XFull name (yours). X.Ip %o 8 XOrganization (yours). X.Ip %O 8 XOriginal working directory (where you ran rn from). X.Ip %p 8 XYour private news directory, normally ~/News. X.Ip %P 8 XPublic news spool directory, normally /usr/spool/news on systems that don't use NNTP. X.Ip %r 8 XLast reference on references line of current article (parent article id). X.Ip %R 8 XReferences list for a new article, constructed from the references and article XID of the current article. X.Ip %s 8 XSubject, with all Re's and (nf)'s stripped off. X.Ip %S 8 XSubject, with one \*(L"Re:\*(R" stripped off. X.Ip %t 8 X\*(L"To:\*(R" line derived from the \*(L"From:\*(R" and \*(L"Reply-To:\*(R" Xlines of the current article. XThis always returns an Internet format address. X.Ip %T 8 X\*(L"To:\*(R" line derived from the \*(L"Path:\*(R" line of the Xcurrent article to produce a uucp path. X.Ip %u 8 XThe number of unread articles in the current newsgroup. X.Ip %U 8 XThe number of unread articles in the current newsgroup, not counting the Xthe current article. XWhen threads are selected, this count reflects only selected articles. X.Ip %v 8 XThe number of unselected articles, not counting the current article Xif it is unselected. X.Ip %w 8 XThe directory where mthreads keeps its tmp files. X.Ip %W 8 XThe directory where thread files are placed. X.Ip %x 8 XThe news library directory. X.Ip %X 8 XThe rn library directory. X.Ip %z 8 XThe length of the current article in bytes. X.Ip %Z 8 XThe number of selected threads. X.Ip %~ 8 XYour home directory. X.Ip %. 8 XThe directory containing your dot files, which is your home directory unless Xthe environment variable DOTDIR is defined when rn is invoked. X.Ip %# 8 XThe current count for a multi-file save, starting with 1. XThis value is incremented by one for each file saved or extracted within a Xsingle command. X.Ip %$ 8 XCurrent process number. X.Ip %/ 8 XLast search string. X.Ip %? 8 XA space unless the current interp string is > 79 characters, at which point Xit turns into a newline. X.Ip %% 8 XA percent sign. X.Ip "%{name} or %{name\-default}" 8 XThe environment variable \*(L"name\*(R". X.Ip %[name] 8 XThe value of header line \*(L"Name:\*(R" from the current article. XThe \*(L"Name:\ \*(R" is not included. XFor example \*(L"%D\*(R" and \*(L"%[distribution]\*(R" are equivalent. XThe name must be spelled out in full. X.Ip %`command` 8 XInserts the output of the command, with any embedded newlines translated Xto space. X.Ip %""prompt"" 8 XPrints prompt on the terminal, then inputs one string, and inserts it. X.Ip "%(test_text=pattern?then_text:else_text)" 8 XIf X.I test_text Xmatches X.IR pattern , Xhas the value X.IR then_text , Xotherwise X.IR else_text . XThe \*(L":else_text\*(R" is optional, and if absent, interpolates the null string. XThe = may be replaced with != to negate the test. XTo quote any of the meta-characters X(\*(L'=\*(R', \*(L'?\*(R', \*(L':\*(R', or \*(L')\*(R'), Xprecede with a backslash. X.Ip %digit 8 XThe digits 1 through 9 interpolate the string matched by the nth bracket Xin the last pattern match that had brackets. XIf the last pattern had alternatives, you may not know the number of the Xbracket you want \*(-- %0 will give you the last bracket matched. X.PP XModifiers: to capitalize the first letter, insert \*(L'^\*(R': X\*(L"%^C\*(R" produces something like \*(L"Rec.humor\*(R". XInserting \*(L'_\*(R' causes the first letter following the last X\&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"rec/Humor\*(R". X.PP XInserting \*(L'\\\*(R' will insert a backslash before any characters that Xwould be magic in a regular expression, including \*(L'%\*(R': X\*(L"%\\C\*(R" produces \*(L"rec\\.humor\*(R". X.PP XInserting \*(L"'\*(R" will single-quote the entire result and insert a Xbackslash before any single-quotes in the result itself: X\*(L"%'s\*(R" might produce \*(L"'I\\'m a subject'\*(R". X.PP XInserting \*(L":FMT\*(R" will format the result according to the printf-style XFMT string: \*(L"%:-50.50s\*(R" left-justifies the subject into a 50 Xcharacter field. X.SH ENVIRONMENT XThe following environment variables are paid attention to by X.IR trn . XIn general the default values assumed for these variables by X.I trn Xare reasonable, so if you are using X.I trn Xfor the first time, you can safely ignore this section. XNote that the defaults below may not correspond precisely to the defaults Xon your system. XTo find the actual defaults you would need to look in config.h and common.h Xin the trn source directory, and the file INIT in the trn library directory. X.PP XThose variables marked (%) are subject to % interpolation, and those marked X(~) are subject to both % interpolation and ~ interpretation. X.Ip "ATTRIBUTION (%)" 8 XGives the format of the attribution line in front of the quoted article Xincluded by an F command. X.Sp XDefault: In article %i,%?%)f <%>f> wrote: X.Ip "AUTOSUBSCRIBE" 8 XWhen X.I trn Xis checking for new newsgroups and finds one Xmatching one of the patterns in AUTOSUBSCRIBE, the new group is Xautomatically added to the end of the .newsrc, subscribed. XNewsgroups not matching this or AUTOUNSUBSCRIBE, below, are offered Xto the user. X.Sp XAUTOSUBSCRIBE is a comma separated list of newsgroup patterns ala X\&\*(L'o\*(R', \*(L'/\*(R', etc. XIt can also include \*(L"but not\*(R" entries preceded by \*(L'!\*(R'. X\*(L"a,b,!c,d\*(R" is read as \*(L"matching a or b, unless it also Xmatches c; matching d regardless\*(R". XAnother way to look at it is \*(L"(((a or b) and not c) or d)\*(R". XTo automatically subscribe to all local Xgroups but be choosy about non-local groups, one might say \*(L"*,!*.*\*(R". X.Sp XDefault: (none) X.Ip "AUTOUNSUBSCRIBE" 8 XAUTOUNSUBSCRIBE is very similar to AUTOSUBSCRIBE, above, but Xnew newsgroups matching it are automatically added to the end Xof the .newsrc file, unsubscribed. XIf a newsgroup matches AUTOSUBSCRIBE, AUTOUNSUBSCRIBE is not consulted. X.Sp XDefault: (none) X.Ip "CANCEL (~)" 8 XThe shell command used to cancel an article. X.Sp XDefault: inews \-h < %h X.Ip "CANCELHEADER (%)" 8 13v XThe format of the file to pass to the CANCEL command in order to cancel Xan article. X.Sp XDefault: X.br XNewsgroups: %n X.br XSubject: cmsg cancel %i X.br XReferences: %R X.br XReply-To: %L@%H (%N) X.br XDistribution: %D X.br XOrganization: %o X.sp 1 X%i cancelled from rn. X.Ip DOTDIR 8 XWhere to find your dot files, if they aren't in your home directory. XCan be interpolated using \*(L"%.\*(R". X.Sp XDefault: $HOME X.Ip "EDITOR (~)" 8 XThe name of your editor, if VISUAL is undefined. X.Sp XDefault: whatever your news administrator compiled in, usually vi. X.Ip "EXSAVER (%)" 8 XThe shell command to execute in order to extract data to either /bin/sh Xor a user-specified command. X.Sp XDefault: tail +%Bc %A | %e X.Ip "FIRSTLINE (%)" 8 XControls the format of the line displayed at the top of an article. XWarning: this may go away. X.Sp XThe default (ignoring the Marked to return display in unthreaded Xgroups) is approximately: X.Sp X%C #%a%(%Z=^0$?%(%U!=^0$? (%U more\e)): (%U + %v more\e)) X.Ip HIDELINE 8 XIf defined, contains a regular expression which matches article lines to Xbe hidden, in order, for instance, to suppress quoted material. XA recommended string for this purpose is \*(L"^>...\*(R", which \fIdoesn't\fR Xhide lines with only \*(L'>\*(R', to give some indication that quoted Xmaterial is being skipped. XIf you want to hide more than one pattern, you can use \*(L"\||\|\*(R" to Xseparate the alternatives. XYou can view the hidden lines by restarting the article with the \*(L'v\*(R' Xcommand. X.Sp XThere is some overhead involved in matching each line of the article against Xa regular expression. XYou might wish to use a baud-rate modifier to enable this feature only at Xlow baud rates. X.Sp XDefault: undefined X.Ip HOME 8 XYour home directory. XAffects ~ interpretation, and the location of your Xdot files if DOTDIR is not defined. X.Sp XDefault: $LOGDIR X.Ip "KILLGLOBAL (~)" 8 XWhere to find the KILL file to apply to every newsgroup. XSee the \*(L'^K\*(R' command at the newsgroup-selection level. X.Sp XDefault: %p/KILL X.Ip "KILLLOCAL (~)" 8 XWhere to find the KILL file for the current newsgroup. XSee the commands \*(L'K\*(R' and \*(L'^K\*(R' at the article selection level, Xand the search modifier \*(L'K\*(R'. X.Sp XDefault: %p/%c/KILL X.Ip LOGDIR 8 XYour home directory if HOME is undefined. XAffects ~ interpretation, and the location of your Xdot files if DOTDIR is not defined. X.Sp XDefault: none. X.Sp XExplanation: you must have either $HOME or $LOGDIR. X.Ip LOGNAME 8 XYour login name, if USER is undefined. XMay be interpolated using \*(L"%L\*(R". X.Sp XDefault: value of getlogin(). X.Ip LOCALTIMEFMT 8 XThe format used by strftime() to print the local time. XThe Date line is only displayed in local time if the group is threaded X(see the \-H option for more information on Date). X.Sp XDefault: %a %b %e %X %Z %Y X.Sp Xwhich is the same format as the X.IR date (1) Xcommand. X.Ip "MAILCALL (~)" 8 XWhat to say when there is new mail. X.Sp XDefault: (Mail) X.Ip "MAILFILE (~)" 8 XWhere to check for mail. X.Sp XDefault: /usr/spool/mail/%L X.Ip "MAILHEADER (%)" 8 XThe format of the header file for replies. XSee also MAILPOSTER. X.Sp XDefault: X.Sp XTo: %t X.br XSubject: %(%i=^$?:Re: %S X.br XNewsgroups: %n X.br XIn-Reply-To: %i) X.br X%(%[references]!=^$?References\\: %[references] X.br X)Organization: %o X.br XCc: X.br XBcc: \en\en X.Ip "MAILPOSTER (~)" 8 XThe shell command to be used by the reply commands (r and R) Xin order to allow you to enter and deliver the response. X.I trn Xwill not itself call upon an editor for replies \*(-- this Xis a function of the program called by X.IR trn . XSee also MAILHEADER. X.Sp XDefault: QUOTECHARS=%I Rnmail \-h %h X.Ip "MBOXSAVER (~)" 8 XThe shell command to save an article in mailbox format. X.Sp XDefault: %X/mbox.saver %A %P %c %a %B %C "%b" \e X.br X"From %t %`date`" X.Sp XExplanation: the first seven arguments are the same as for NORMSAVER. XThe eighth argument to the shell script is the new From line Xfor the article, including the posting date, Xderived either directly from the Posted: line, or not-so-directly from Xthe Date: line. XHeader munging at its finest. X.Ip MODSTRING 8 XThe string to insert in the group summary line, which heads each article, Xfor a moderated group. XSee also NOPOSTRING. X.Sp XDefault: " (moderated)" X.Ip NAME 8 XYour full name. XMay be interpolated using \*(L"%N\*(R". X.Sp XDefault: name from /etc/passwd, or ~/.fullname. X.Ip "NEWSHEADER (%)" 8 16v XThe format of the header file for follow-ups. XSee also NEWSPOSTER. X.Sp XDefault: X.Sp X%(%[followup-to]=^$?:X-ORIGINAL-NEWSGROUPS: %n X.br X)Newsgroups: %(%F=^$?%C:%F) X.br XSubject: %(%S=^$?%"\en\enSubject: ":Re: %S) X.br XSummary: X.br XExpires: X.br X%(%R=^$?:References: %R X.br X)Sender: X.br XFollowup-To: X.br X%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO} X.br X)Distribution: %(%i=^$?%"Distribution: ":%D) X.br XOrganization: %o X.br XKeywords: %[keywords] X.br XCc: \en\en X.Ip NEWSORG 8 XEither the name of your organization, or the name of a file containing the Xname of your organization. X(For use at sites where the ORGANIZATION environmental variable is already Xin use. XNEWSORG will override ORGANIZATION if both are present.) XMay be interpolated using \*(L"%o\*(R". X.Sp XDefault: whatever your news administrator compiled in. X.Ip "NEWSPOSTER (~)" 8 XThe shell command to be used by the follow-up commands (f and F) Xin order to allow you to enter and post a follow-up news article. X.I trn Xwill not itself call upon an editor for follow-ups \*(-- this Xis a function of the program called by X.IR trn . XSee also NEWSHEADER. X.Sp XDefault: QUOTECHARS=%I Pnews \-h %h X.Ip NEWSRC 8 XYour newsgroup subscription list. X.Sp XDefault: $HOME/.newsrc X.Ip NNTPSERVER 8 XThe hostname of your NNTPSERVER. X[This does not apply unless you are running the NNTP version of rn.] X.Sp XDefault: the hostname listed in the server file, usually X/usr/local/lib/rn/server. X.Ip NOPOSTRING 8 XThe string to insert in the group summary line, which heads each article, Xfor a group to which local posting is not allowed. XSee also MODSTRING. X.Sp XDefault: " (no posting)" X.Ip "NORMSAVER (~)" 8 XThe shell command to save an article in the normal (non-mailbox) format. X.Sp XDefault: %X/norm.saver %A %P %c %a %B %C "%b" X.Ip ORGANIZATION 8 XEither the name of your organization, or the name of a file containing the Xname of your organization. X(If NEWSORG is set, it will override ORGANIZATION.) XMay be interpolated using \*(L"%o\*(R". X.Sp XDefault: whatever your news administrator compiled in. X.Ip PAGESTOP 8 XIf defined, contains a regular expression which matches article lines to Xbe treated as form-feeds. XThere are at least two things you might want to do with this. XTo cause page breaks between articles in a digest, you might define it Xas \*(L"^--------\*(R". XTo force a page break before a signature, you could define it Xas \*(L"^-- $\*(R". X(Then, when you see \*(L"--\*(R" at the bottom of the page, you can skip Xthe signature if you so desire by typing \*(L'n\*(R' instead of space.) XTo do both, you could use \*(L"^--\*(R". XIf you want to break on more than one pattern, you can use \*(L"\||\|\*(R" to Xseparate the alternatives. X.Sp XThere is some overhead involved in matching each line of the article against Xa regular expression. XYou might wish to use a baud-rate modifier to enable this feature only at Xlow baud rates. X.Sp XDefault: undefined X.Ip "PIPESAVER (%)" 8 XThe shell command to execute in order to accomplish a save to a pipe X(\*(L"s\ |\ command\*(R" or \*(L"w\ |\ command\*(R"). XThe command typed by the user is substituted in as %b. X.Sp XDefault: %(%B=^0$?<%A:tail +%Bc %A |) %b X.Sp XExplanation: if %B is 0, the command is \*(L"<%A %b\*(R", otherwise Xthe command is \*(L"tail +%Bc %A | %b\*(R". X.Ip REPLYTO 8 XThe value of the \*(L"Reply-To:\*(R" header, if needed. X.Sp Default: \*(L" \*(R". X.Ip RNINIT 8 XThis variable is used when initializing trn in rn-compatibility mode X(see the \-x switch) or when the TRNINIT variable isn't defined. XSee the TRNINIT variable for a description. X.Ip "RNMACRO (~)" 8 XThe name of the file containing macros and key mappings when running trn Xas rn. XSee also the TRNMACRO variable and the CUSTOM MACROS section. X.Sp XDefault: %./.rnmac X.Ip "SAVEDIR (~)" 8 XThe name of the directory to save to, if the save command does not specify Xa directory name. X.Sp XDefault: X.br X If X.B \-/ Xis set: %p/%c X.br X If X.B +/ Xis set: %p X.Ip "SAVENAME (%)" 8 XThe name of the file to save to, if the save command contains only a Xdirectory name. X.Sp XDefault: X.br X If X.B \-/ Xis set: %a X.br X If X.B +/ Xis set: %^C X.Ip "SELECTCHARS" 8 XThe characters used by the thread selector to select the associated thread Xof discussion. XYou can specify up to 64 visible characters, including upper- and lower-case Xletters, numbers, and many punctuation characters. XSelection characters override command characters in the selector, but are Xnot excluded from macro expansion, so be careful. X.br XDefault: abdefgijlorstuvwxyz1234567890BCFGHIKMVW X.br X(You'll notice various characters are omitted to allow them to be typed Xas commands in the selector.) X.Ip SHELL 8 XThe name of your preferred shell. XIt will be used by the \*(L'!\*(R', \*(L'S\*(R' and \*(L'W\*(R' commands. X.Sp XDefault: whatever your news administrator compiled in. X.Ip "SUBJLINE (%)" 8 XControls the format of the lines displayed by the \*(L'=\*(R' command at Xthe article selection level. X.Sp XDefault: %s X.Ip "SUPERSEDEHEADER (%)" 8 16v XThe format of the header file for a supersede article. X.Sp XDefault: X.Sp XFrom: %L@%H (%N) X.br XNewsgroups: %n X.br XSubject: %S X.br XDistribution: %D X.br XOrganization: %o X.br XSupersedes: %i X.Ip TERM 8 XDetermines which termcap entry to use, unless TERMCAP contains the entry. X.Ip TERMCAP 8 XHolds either the name of your termcap file, or a termcap entry. X.Sp XDefault: /etc/termcap, normally. X.Ip TRNINIT 8 XDefault values for switches may be passed to X.I trn Xby placing them in the TRNINIT variable (or RNINIT if you're starting Xtrn in rn-compatibility mode). XAny switch that is set in this way may be overruled Xon the command line, or via the \*(L'&\*(R' command from within X.IR trn . XBinary-valued switches that are set with \*(L"\-switch\*(R" may be unset Xusing \*(L"+switch\*(R". X.Sp XIf TRNINIT begins with a \*(L'/\*(R' it is assumed to be the name of a file Xcontaining switches. XYou can put comments in this file by preceding them with a \*(L'#\*(R' Xas long as this is the first character on a line or it follows some Xwhite-space (which delimits the switches in the file). XIf you want to set many environment variables but don't want to keep Xthem all in your environment, or if the use of any of these variables Xconflicts with other programs, you can use this feature along with the X.B \-E Xswitch to set the environment variables upon startup. X.Sp XDefault: \*(L" \*(R". X.Ip "TRNMACRO (~)" 8 XThe name of the file containing macros and key mappings. XIf the file is not found, the RNMACRO variable is used to look for your Xrn macros. XFor information on what to put into this file, see the CUSTOM MACROS section. X.Sp XDefault: %./.trnmac X.Ip "UNSHAR (~)" 8 XThe shell command to execute in order to accomplish the unshar'ing of a Xshell archive. X.Sp XDefault: /bin/sh X.Ip USER 8 XYour login name. XMay be interpolated using \*(L"%L\*(R". X.Sp XDefault: $LOGNAME X.Ip "VISUAL (~)" 8 XThe name of your editor. X.Sp XDefault: $EDITOR X.Ip "YOUSAID (%)" 8 XGives the format of the attribution line in front of the quoted article Xincluded by an R command. X.Sp XDefault: In article %i you write: X.SH "AUTOMATIC MACROS" XOn startup X.I trn Xattempts to build a set of macros that map your keypad arrow keys to Xuseful functions. XThese default actions are mentioned in the prior description of each level's Xcommands. XIf you don't like this (or trn gets it wrong), you can disable the automatic Xmacros by using the X.B \-A Xoption. X.SH "CUSTOM MACROS" XWhen X.I trn Xstarts up it looks for a file containing macro definitions (see environment Xvariables TRNMACRO and RNMACRO). XAny sequence of commands may be bound to any sequence of keys, so you Xcould re-map your entire keyboard if you desire. XBlank lines or lines beginning with # in the macro file are considered Xcomments; otherwise X.I trn Xlooks for two fields separated by white space. XThe first field gives the sequence of keystrokes that trigger the macro, Xand the second field gives the sequence of commands to execute. XBoth fields are subject to % interpolation, which will also translate Xbackslash and caret sequences. X(The keystroke field is interpreted at startup time, but the command field Xis interpreted at macro execution time so that you may refer to % values Xin a macro.) XFor example, if you want to reverse the roles of carriage return and Xspace in X.I trn X.Sp X^J \e040 X.br X^M \e040 X.br X\e040 ^J X.Sp Xwill do just that. XBy default, all characters in the command field are interpreted as the Xcanonical X.I trn Xcharacters, i.\|e. no macro expansion is done. XOtherwise the above pair of macros would cause an infinite loop. XTo force macro expansion in the command field, enclose the Xmacro call with ^( ... ^) thusly: X.Sp X@s |mysavescript X.br X@w w^(@s^) X.Sp XYou can use the %() conditional construct to construct macros that work Xdifferently under different circumstances. XIn particular, the current mode (%m) of X.I trn Xcould be used to make a command that only works at a particular level. XThis is particularly vital for the selector which uses most of Xthe lower-case letters to select the associated item in its display. XFor example, X.Sp Xa %(%m=t?a:s art.hold\en) X.Sp Xwill return the original letter (a) in the selector, and the command X\*(L"s art.hold\en\*(R" everywhere else. X.Sp X%(%{TERM}=vt100?^[[O) /^J X.Sp Xwill do the binding only if the terminal type is vt100, Xthough if you have many of these it would be better to have separate Xfiles for each terminal. X.Sp XIf you want to bind a macro to a function key that puts a common garbage character Xafter the sequence (such as the carriage return on the end of Televideo 920 Xfunction sequences), DO NOT put the carriage return Xinto all the sequences or you will waste a CONSIDERABLE amount of internal Xstorage. XInstead of \*(L"^AF^M\*(R", put \*(L"^AF+1\*(R", which indicates to X.I trn Xthat it should gobble up one character after the F. X.SH "WHAT'S NEW" XHere's a quick run-down of X.IR trn 's Xfeatures and commands aimed at the knowledgeable X.I rn Xor X.I trn Xuser. X.PP XThe addition of true reference-line threading is one of the biggest Ximprovements over rn. XThis threading allows you to read a discussion in reply order with Xan article's replies being attached to the article that inspired them. XThreads will encompass multiple subjects whenever a reply to an article Xin the thread arrives with a different subject. XThis is usually done to better indicate the topic in the reply Xwhen it diverges from the original subject. X.PP XAnother big improvement is the selector, which is bound Xto the \*(L'+\*(R' key. XThe selector displays a list of threads, subjects, or individual articles Xto allow you to select the topics that interest you by typing their Xassociated letter. XThe difference between the thread and the subject selector is that the Xsubject selector displays all subjects with a separate selection letter, Xeven those tied together via their references. XThis can be quite useful if you select some threads and desire to weed Xout some extraneous discussions: you could switch the selector into Xexclusive mode (\*(L'E\*(R' shows only selected threads) and then into Xsubject mode (\*(L'Ss\*(R') to separate the threads into their component Xsubjects and deselect or kill the subjects you don't care about. XYou don't have to go to all this trouble using the selector if you prefer Xto just hit the \*(L'k\*(R' key when you start reading a subject you're not Xinterested in. XThe selector can also switch between showing unread articles and Xarticles that have already been read, allowing you to selectively re-read Xdiscussions (this is the \*(L'U\*(R' command in the selector). X.PP XAnother threaded addition is the article-tree display in the Xupper-right corner of the header. XLooking at the tree gives you a feel for how the articles you are Xreading relate to each other, allowing you to see at a glance when Xthere are lots of replies and decide if you want to junk an uninteresting Xset of replies or perhaps tough it out. X.PP XThe header display has also been modified to hide a few more lines by default X(e.\|g. References), but, as always, you can override these with \-h. XThere is also some more \*(L"magic\*(R" in the header: the From header can Xbe trimmed to be just the comment portion (if available), and the Date Xheader is displayed in local time (by default). XUse \-H and +H to turn header magic on and off. X.PP XOnce you begin reading articles, use the regular movement commands (n, N, Xp, P, etc.) as you normally would. XYou'll find that these commands track the reply order shown in the tree Xdisplay. XThen try using ^N and ^P, which follow a subject in the order the articles Xwere posted. XFinally, check out the [, ], (, ), {, and } commands to move around in the Xarticle tree a bit more directly. XThe first four commands should also be bound to your keypad's arrow keys, Xmaking them easier to type. XFor example, typing \*(L'[\*(R' (left) takes you to your parent article, Xeven if it was already read, which is very useful for tracking down the Xcited portion of the article in its original context. X.PP XThere are additional kill commands for the entire thread (J) and the Xcurrent article and all its replies (,). X.PP XThe KILL files have been extended and the commands inside them are now Xreferred to memorized commands, since they are often used for selection Xrather than killing of articles. XThere are new, easier ways to add memorized commands using the \*(L'A\*(R'dd Xand \*(L'T\*(R'hread commands. XThe \*(L'A\*(R' command is subject-oriented, while the \*(L'T\*(R' command Xis article-oriented (meaning they affect a specific set of articles rather Xthan any article that happens to have a matching subject). XThey both prompt you for what kind of command you want to add, Xmaking both auto-killing and auto-selecting just as easy. X.PP XThere is also an easy way to skip around among the various threads with Xthe < and > commands. XUse them if you want to skip a set of article and read them later instead Xof junking them. 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 pre-processed thread information available for use. XWhen X.I trn Xencounters such a group, it generates the thread information on the fly Xwhile entering the group. XFor really large groups (or really slow systems), this can take an Xappreciable amount of time. XIf you can't talk your news administrator into pre-threading the group, Xyou can turn off the threading on a group-by-group basis using Xthe \*(L't\*(R' command at the newsgroup-selection level. XGroups turned off in this way are read in the X.I rn Xstyle \*(-- articles arranged in arrival order unless you specify the X\-S option, which reads the articles in date order by subject. X.PP XTake note of the \*(L"e dir\*(R" command, which is used to extract a shell Xarchive or uuencoded file into the specified directory. XIt is even possible to extract other data formats if you specify the Xappropriate filter command (e.\|g. \*(L"e dir|cmd\*(R". X.PP XAlso, if you plan to use macro definitions, it is good to keep in mind Xthat the selector uses most of the lower-case letters for Xselection, and thus it is a good idea to explicitly set the mode(s) in Xwhich a macro applies. XFor example, if you want to press \*(L'f\*(R' from the article pager/selector Xto forward the current article to the user \*(L"smith\*(R", you could define: X.Sp X.nf X f %(%m=[pa]?|mail smith\en:f) X.fi X.Sp XThis checks the current mode (%m) and if it is \*(L'p\*(R' or \*(L'a\*(R' Xit expands it to the string \*(L"|mail smith\en\*(R", otherwise it returns Xthe letter \*(L'f\*(R'. XIn some cases, you may simply wish to exclude the selector from a Xmacro with the conditional \*(L"%m!=t\*(R". X.PP XFinally, you'll probably want to use the new options, X.B \-x Xand X.B \-X Xto ensure that all the newest features are available for use. XThese options might be on by default, depending on how your administrator Xdecided to install X.IR trn . X.SH AUTHORS XRn was created by Larry Wall X.br Xand is now under the direction of Stan Barber . X.br XThreaded version by Wayne Davison X.br X(Mail all bug reports for trn to Wayne.) X.br XRegular expression routines are borrowed from emacs, by James Gosling. X.SH FILES X.Ip "%./.newsrc" 1.25i Xstatus of your news reading X.Ip "%./.oldnewsrc" 1.25i Xbackup copy of your X.I .newsrc Xfrom start of session X.Ip "%./.rnlock" 1.25i Xlock file so you don't screw up your X.I .newsrc X.Ip "%./.rnlast" 1.25i Xinfo from last run of rn X.Ip "%./.rnsoft" 1.25i Xsoft pointers into /usr/lib/news/active to speed startup, synchronous with X.I .newsrc X.Ip "%./.rnhead" 1.25i Xtemporary header file to pass to a mailer or news poster X.Ip "%./.[t]rnmac" 1.25i Xmacro and keymap definitions X.Ip "%p" 1.25i Xyour news save directory, usually ~/News X.Ip "%x/active" 1.25i Xthe list of active newsgroups, usually /usr/lib/news/active on systems that don't use NNTP X.Ip "%P" 1.25i Xthe public news spool directory, usually /usr/spool/news on systems that don't use NNTP X.Ip "%X/INIT" 1.25i Xsystem-wide default switches X.SH SEE ALSO Xnewsrc(5), more(1), readnews(1), Pnews(1), Rnmail(1) X.SH DIAGNOSTICS XGenerally self-documenting, as they say. X.SH BUGS XThe X.B \-h Xswitch can only hide header lines that X.I trn Xknows about. X.PP XThe \*(L'\-\*(R' command doesn't cross newsgroup boundaries, and only undoes Xthe last article selection. X.PP XIf you edit your X.I .newsrc Xwhile X.I trn Xis running, X.I trn Xwill happily wipe out your changes when it decides to Xwrite out the X.I .newsrc Xfile. X.PP XMarking of duplicate articles as read in cross-referenced newsgroups will Xnot work unless the Xref patch is installed in inews. X.PP XIf you get carried away with % or escape substitutions, you can overflow Xbuffers. END_OF_FILE if test 95742 -ne `wc -c <'trn.1'`; then echo shar: \"'trn.1'\" unpacked with wrong size! fi # end of 'trn.1' fi echo shar: End of archive 12 \(of 12\). cp /dev/null ark12isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 12 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0