TRN(1)
πΈ TRN(1) β General Commands Manual πΈ
okay bestie, welcome to the TRN(1) page β it's giving threaded news main character energy and we're gonna get through every single detail together. no skimming, no cap. π
β¨ NAME β¨
trn β threaded read news program. periodt.
π¦ SYNOPSIS π¦
trn [options] [newsgroups]
π DESCRIPTION π
Trn is a threaded version of rn, which is a replacement for the readnews(1) program. Being "threaded" means the articles are interconnected in reply order. Each discussion thread is a tree of articles where all the reply (child) articles branch off from their respective originating (parent) articles. A representation of this tree (or a portion of it) is displayed in the article header as you are reading news. This gives you a better feel for how all the articles are related, and even lets you see at a glance when an article has replies β a good thing to check before posting. In addition, trn has a thread selector that allows you to quickly browse through a list of subjects and choose the ones you find interesting. This thread selector sorts articles according to various criteria and can be switched into various display modes that allows you to pick all the subjects separately (threads can have multiple subjects) or even pick individual articles. Any items you don't select can be saved for reading later or marked as read with a single keystroke.
If you are already familiar with trn you may just want to read the WHAT'S NEW section. People upgrading from rn will probably want to pay attention to the sections on The Selector, The Tree Display, and the aforementioned WHAT'S NEW. If you're impatient, just dive in and get started. All the regular commands will be familiar to an rn or trn user, and the on-line help will give you a quick run-down of what commands are available (just type 'h' from any prompt). I'd also suggest using the command:
trn -x -X
to make sure some of the best features are turned on. slay. β¨
π Starting Trn π
If no newsgroups are specified, all the newsgroups which have unread news will be presented to the user in the order in which they occur in the .newsrc file. At the prompt for each group you can choose to read it, skip it, move it, etc. If a list of newsgroups is provided on the command line, trn will start up in "add" mode, using the list as a set of patterns to add new newsgroups and restrict which newsgroups are displayed (see also the discussion of the 'a' command on the newsgroup-selection level).
Trn operates on four levels: the newsgroup-selection level, the thread selector, the article-reading level, and the paging level. Each level has its own set of commands, and its own help menu. At the paging level (the bottom level) trn behaves much like the more(1) program. At the article-reading level articles are presented to you in the order of their replies, with the subjects being ordered by the date of the oldest unread article (though there are commands for changing the default display order). In the thread selector you are presented with the subjects and (usually) authors associated with each discussion thread, and given a chance to choose which ones you wish to read now, save for later, or manipulate in some way. At the newsgroup-selection level (the top level), you may specify which newsgroup you want next, or read them in the default order, which is the order that the newsgroups occur in your .newsrc file. (You will therefore want to rearrange your .newsrc file to put the most interesting newsgroups first. This can be done with the 'm' command on the Newsgroup Selection level.
WARNING: invokingreadnews/vnews(the old user interface) in any way (including as a news checker in your login sequence!) will cause your.newsrcto be disarranged again.
On any level, at ANY prompt, help is available by typing an 'h'. This gives you a summary of available commands and what they do. Remember this command, you'll need it. fr fr.
Typing space to any question means to do the normal thing. You will know what that is because every prompt has a list of several plausible commands enclosed in square brackets. The first command in the list is the one which will be done if you type a space. (All input is done in cbreak mode, so carriage returns should not be typed to terminate anything except certain multi-character commands. Those commands will be obvious in the discussion below because they take an argument.)
Upon startup, trn will do several things:
- It will look for your
.newsrcfile, which is your list of subscribed-to newsgroups. Iftrndoesn't find a.newsrc, it will create one. If it does find one, it will back it up under the name".oldnewsrc". - It will input your
.newsrcfile, listing out the first several newsgroups with unread news. - It will perform certain consistency checks on your
.newsrc. If your.newsrcis out of date in any of several ways,trnwill warn you and patch it up for you, but you may have to wait a little longer for it to start up. Trnwill next check to see if any new newsgroups have been created, and give you the opportunity to add them to your.newsrc.Trngoes into the top prompt level β the newsgroup-selection level.
π Newsgroup Selection Level π
In this section the words "next" and "previous" refer to the ordering of the newsgroups in your .newsrc file. On the newsgroup-selection level, the prompt looks like this:
====== 17 unread articles in talk.blurfl -- read now? [ynq]
unless the group is set for unthreaded reading, in which case the first six characters are "******". The following commands may be given at this level:
+β Enter this newsgroup through the selector.yβ Begin reading this newsgroup now.SPβ Enter the newsgroup by executing the default command listed in[]'s..commandβ Do this newsgroup now, but execute command before displaying anything. The command will be interpreted as if typed on the article selection level.=β Start this newsgroup, but list subjects before displaying articles.Uβ Enter this newsgroup through the unkill-articles prompt.tβ Toggle the newsgroup between threaded and unthreaded reading. The default is threaded, and the current setting is stored in your.newsrc.nβ Go to the next newsgroup with unread news.Nβ Go to the next newsgroup.pβ Go to the previous newsgroup with unread news. If there is none, stay at the current newsgroup.Pβ Go to the previous newsgroup.-β Go to the previously displayed newsgroup (regardless of whether it is before or after the current one in the list).1β Go to the first newsgroup.^β Go to the first newsgroup with unread news.$β Go to the end of the newsgroups list.gnewsgroup β Go to newsgroup, which can be the group's name or a zero-relative number of the groups in your.newsrc(see the'L'command to list your.newsrc). If it isn't currently subscribed to, you will be asked if you want to subscribe./pattern β Scan forward for a newsgroup matching pattern. Patterns do globbing like filenames, i.e., use*to match any sequence of characters, and[]to specify a list of characters to match. Use.to match a single character. Unlike normal filename globbing, newsgroup-searching is not anchored to the front and back of the filename, i.e."/ski"will findrec.skiing. You may use^or$to anchor the front or back of the search:"/^test$"will find newsgrouptestand nothing else. If you want to include newsgroups with 0 unread articles, append/r. If the newsgroup is not found between the current newsgroup and the last newsgroup, the search will wrap around to the beginning.?pattern β Same as/, but search backwards.uβ Unsubscribe from the current newsgroup.lstring β List newsgroups not subscribed to which contain the string specified.Lβ Lists the current state of the.newsrc, along with status information.<number>β Count of unread articles in newsgroup.READβ No unread articles in newsgroup.UNSUBβ Unsubscribed newsgroup.BOGUSβ Bogus newsgroup.JUNKβ Ignored line in.newsrc(e.g. readnews "options" line).
(A bogus newsgroup is one that is not in the list of active newsgroups in the active file, which on most systems is /usr/lib/news/active unless you use NNTP.)
m {name}β Move the named newsgroup somewhere else in the.newsrc. If no name is given, the current newsgroup is moved. There are a number of ways to specify where you want the newsgroup β typehfor help when it asks where you want to put it.cβ Catch up β mark all unread articles in this newsgroup as read.Aβ Abandon the changes made to the current newsgroup sincetrnwas started. Useful when you accidentally mark a group as read.o {pattern}β Only display those newsgroups whose name matches pattern. Patterns are the same as for the'/'command. Multiple patterns may be separated by spaces, just as on the command line. The restriction will remain in effect either until there are no articles left in the restricted set of newsgroups, or another restriction command is given. Since pattern is optional,'o'by itself will remove the restriction.O {pattern}β Same aso {pattern}, but using'O'will omit empty groups from the cycle.apattern β Add unsubscribed newsgroups matching pattern. If any matching newsgroups are found, you will be asked for each one whether you would like to add it. If you want to add all the newsgroups, you can type'Y'and they will be added to the end of the.newsrcfile. If you don't want to subscribe, all the remaining groups can be ignored by typing'N'. After any new newsgroups have been added, the'a'command also restricts the current set of newsgroups just like the'O'command does.&β Print out the current status of command-line switches and any newsgroup restrictions.&switch {switch}β Set additional command-line switches.&&β Print out the current macro definitions.&&keys commandsβ Define additional macros.!commandβ escape to a subshell, bestie π one single exclamation mark (!) drops you into your own news directory. A double!!drops you into the spool directory for news, which is usually/usr/spool/newsunless you're reading news with NNTP. The environment variableSHELLgets used if it's defined. If command is null, you get an interactive shell. periodt.vβ print the current version number plus the info on where to send bug reports. slay.qβ Quit.xβ Quit, but it restores.newsrcto its state at startup oftrnπ«Ά. The.newsrcyou would have had if you'd exited withqgets called.newnewsrc, in case you didn't really want to typexπ.^Kβ Edit the global list of memorized commands (in the globalKILLfile) that you want performed in every newsgroup as it starts up (aka when it's selected at the newsgroup-selection level). This file holds commands (one per line) such as/subject/:jor/author/f:+to kill or select articles based on the indicated search criteria. There's also a local list of commands for each newsgroup that can hold kill/selection commands tailored to each specific group. Because of the overhead involved in searching for articles to kill, it's better if possible to use a local list rather than the global one. Local memorized commands are usually maintained with theAorTcommands from the article/pager level or in the selector. There's also aKsearch modifier that appends any search command you desire to add. It's also possible to manually edit the file with the^Kcommand from anywhere inside a newsgroup. If either of the environment variablesVISUALorEDITORis set, the specified editor gets invoked; otherwise a default editor is invoked on theKILLfile. iconic behavior tbh.
π¦ The Selector π¦
Most people who don't have all day to read news will want to enter a newsgroup by way of the selector. You do this with the + command at the newsgroup-selection or article/pager levels β¨. In fact, this might be the default command for entering a newsgroup, depending on how your version of trn was configured and your use of the -X option.
The selector displays a list of articles by their subjects and (usually) authors πΈ. The articles are grouped into threads by default (which may list multiple subjects per selectable item if the subject changed during the discussion) and ordered by the date of their oldest unread article. Thread or subject groups also show up with a count of the number of articles in each group. Each selectable item is preceded by a letter or number that you can type to toggle its selection. Items that are selected get flagged with a + after their letter. Groups that have only some of their articles selected get flagged with a *. You can change the selector's mode (to pick each subject separately or pick individual articles), order the list by a variety of sort criteria, and switch the author display between its long, medium and short styles using the commands detailed below. no cap π
The following commands are available in the selector:
a-z,0-9,A-Zβ Select/deselect the indicated item by its letter or number. There are quite a few letters omitted from the alpha characters to be typed as commands β see below π. Also, the variableSELECTCHARSis available to customize which characters you want used as selection letters, overriding their command function. main character energy fr.SPβ Perform the default command. This is usually>for most pages, andZon the last page (althoughDandXare also quite popular).CRβ Begin reading. If no articles are selected, the current item is selected (unless you've marked it as killed).Z,TABβ Begin reading. If no articles are selected, read all unread articles π₯..β Toggle the current item's selection (the one under the cursor).*β Same as.except that it affects all articles with the same subject (useful in the article selector).#β Make an overriding selection that reads the current item only, temporarily ignoring all other selections.k,,β Mark the current item as killed π.m,\β Unmark the current item.-β Set a range, as ina - k. Repeats the last marking action: selection, deselection, killing, or unmarking.@β Toggle all visible selections.Mβ Mark the current item's article(s) to return on newsgroup exit and kill the item.Yβ Yank back and select the marked-to-return articles, clearing their to-return status π«Ά.Eβ Exclude all unselected items from the selection list (narrow the display). Press it again to pick from all available items.n,]β Move down to the next item (try the down-arrow keypad key also).p,[β Move up to the previous item (try the up-arrow keypad key also).<β Go to previous page (try the left-arrow keypad key also).>β Go to next page (try the right-arrow keypad key also).^β Go to the first page.$β Go to the last page.Sβ Set the items the selector displays: threads, subjects or articles. If the group is unthreaded, setting this to threads will thread the group β¨.=β Switch between the article selector and the subject/thread selector.Oβ Pick the order for the items: date, subject, author, item count (for thread/subject groups), and a subject-date grouping of individual articles. Typing the selection in lower-case sorts the articles in the default direction, while using upper-case reverses the sort π. There's a separate default sort order for the subject/thread selector and the article selector. See the-Ooption to set your favorite selector mode and sort order as the default.Rβ Reverse the current sort order.Lβ Switch the selector's display between the long, medium and short display styles. See the-xoption to set your favorite style as the default.Uβ Switch between selecting unread/read articles.Xβ Mark all unselected articles as read and start reading.Dβ Mark unselected articles on the current page as read and begin reading if articles are selected, otherwise go to the next page.Jβ Mark all selected articles as read (useful after performing some action on them with the:command).cβ Catch up β marks ALL articles as read without affecting their cross-posted counterparts.Aβ Add a subject-search command to the memorized list (a.k.a. aKILLfile) for this group. You get prompted to choose selection (+), junking (j), selection including all replies (.), or junking including all replies (,). If the thread has more than one subject, the first subject is the one chosen for the memorized command.Tβ Add a thread-oriented command to the memorized list for this group. You get prompted to choose selecting the thread (+), junking the thread (j), or clearing the auto-selection/junking for the thread (c). (Note: there are three other options (.,,, andC) on the article-reading level β look there for an explanation of their use.)^Kβ Edit the local list of memorized commands (a.k.a. aKILLfile) for this newsgroup. A detailed description of memorized commands is found in the Article Selection section.:commandβ Apply a command to all the selected threads or their selected articles. You can also use:Eto end a binary extraction or:pto post a new article. Use::commandto apply it to all non-selected threads/articles π .
Applicable commands include +/- (select/deselect an article), ++/-- (select/deselect a thread), T+ (auto-select the entire thread), TJ (auto-junk the entire thread), t (display article tree), s dest (save article to a destination), e dir (extract to directory), E (end partial uudecode), as well as: S, |, w, W, m, M, j, = and ,.
:.commandβ Apply a command to the current thread or the selected articles in the current thread. Use::.commandto apply a command to the unselected articles in the current thread./patternβ Scan all articles for a subject containing pattern and select it./pattern/modifiers:command{:command}β Apply the commands listed to articles matching the search command (possibly withh,a,b,r, orKmodifiers). The default action, if no command is specified, is to select the article's item in the selector (e.g. the entire thread (++) in the thread selector). See the section on Regular Expressions and the description of pattern searching in the Article Selection section π.
One example: to scan all the unread articles looking for "topic" anywhere in the article and then select its group and save the articles to the files topic.1, topic.2, etc. use /topic/a:++:s topic.%#.
Nβ Go to the next newsgroup with unread news.Pβ Go to the previous newsgroup with unread news.&β Display or set the current status of command-line switches.&&β Display or set the current macro definitions.!commandβ Escape to a subshell.qβ Quit this group.ESC,+β Quit the selector to the article level. Note:ESCwon't work iftrnhas mapped your arrow keys with default macros and the first character that your arrow keys send is anESCπ.Qβ Quit the current newsgroup and return to the newsgroup-selection prompt for this group.
π Article-Reading Level π
On the article-reading level, trn displays unread articles in thread sequence (reading each article and its replies before going on to another topic) unless threads are disabled for a particular group, in which case the default order is the order they arrived at your site (numeric sequence) π¦. In either case, if you use the subject-search command (^N) you'll switch to reading the articles in date order within each matching subject. (Making selections in the subject selector or using the -S switch will automatically turn subject search mode on in an unthreaded group.) obsessed π
okay so bestie, here's the β¨situationβ¨ at the article-reading level: nobody asks you beforehand whether you wanna read an article. That's not how this works. trn just goes ahead and shows you the first page β or, like, a fraction of a page if your baud rate is giving dial-up nostalgia πΈ β and then asks if you wanna keep going. The big main-character prompt shows up at the END of the article (although, lowkey, you can also throw article-reading commands from inside the middle of an article, alongside the pager level commands, no problem π
). The end-of-article prompt looks exactly like this:
End of article 248 (of 257) -- what next? [npq]
And here is your whole menu at that moment, bestie, no cap:
n,SPβ Scan forward for the next unread article. π¬ (Heads up tho: when you typen(next) at the end of an article, it does not mark the article as read, because an article gets automatically marked as read once its last line has been printed. So you can literally type a sequence likemnand walk away with the article still marked unread. The fact that an article does get marked as read when you typen,N,^N,F,R,e,s,S,βͺ,w, orWin the MIDDLE of the article is, in fact, a special case. π€―)Nβ Go to the next article.^Nβ Find the next article with the same subject, in date order. This also makes subject search mode (^N) the default command at the end of an article. π―pβ Scan backward for the previous unread article. If there isn't one, you just stay right where you are. No drama.Pβ Go to the previous article.-β Go to the previously displayed article (regardless of whether that article sits before or after this one in the normal sequence). Time travel, kinda π«^Pβ Find the previous article with the same subject, in date order. This makes subject search mode (^N) the default._Nβ Go to the next article in numeric sequence._Pβ Go to the previous article in numeric sequence.<,>β Browse the previous/next selected thread/subject. If you haven't made any selections, then every thread that had unread news when you entered the newsgroup (or when you last left the selector) counts as selected. And if you enter an empty newsgroup, all the already-read threads become available for browsing. π[,]β Proceed to the left/right in the article tree. This visits already-read articles and empty nodes. Try the left-/right-arrow keys too, they're cute. β¬ οΈβ‘οΈ{,}β Go to the root/leaf of the article tree, even if that node is already read or empty. And if you're already sitting at a root/leaf in a multi-root thread, it proceeds to the very first/last node instead. π³(,)β Go to the previous/next sibling in the thread, including "cousin" siblings. Up-/down-arrow keys work here too. π―tβ Display the entire article tree and all its associated subjects. If the group isn't currently threaded, it will become threaded to process this command. Glow-up moment β¨^Rβ Restart the current article.vβ Restart the current article verbosely, displaying the entire header. π^Lβ Refresh the screen.^Xβ Restart the current article, and decrypt as a rot13 message.Xβ Refresh the screen, and decrypt as a rot13 message.bβ Back up one page.^Eβ Display the last page of the article.qβ Quit this newsgroup and go back to the newsgroup-selection level. Bye bestie π^β Go to the first unread article.$β Go to the last article (well, actually, one past the last article, sneaky).numberβ Go to the numbered article._Cβ Switch to the next available charset conversion. π
range{,range}:command{:command}β Apply a whole set of commands to a whole set of articles. A range is either<article number>or<article number>-<article number>. A dot.means the current article, and a dollar sign$means the last article. π«- Applicable commands include
m(mark as unread),M(mark as read-until-exit),j(mark as read),s dest(save to a destination),e dir(extract to directory),!command(shell escape),=(print the subject),+/-(select/deselect the article),T+(auto-select the entire thread),TJ(auto-junk the entire thread),++/--(select/deselect the associated thread),C(cancel), as well asS,βͺ,w,W, andt.
- Applicable commands include
:commandβ Apply a command to all the selected threads or their selected articles. Use::commandto apply it to all the non-selected threads/articles instead. For which commands you can use, go peep the discussion above for the range command. π:.commandβ Apply a command to the current thread, or to the selected articles within the current thread. Use::.commandto apply a command to the unselected articles in the current thread.jβ Junk the current article (aka mark it as read). If you run this from inside an article, you get left at the end of the article β unliken, which goes hunting for the next article. ποΈmβ Mark the current article as still unread. (If you don't wanna see this article for a hot minute, you're probably better off usingMinstead ofm, otherwise this article might get picked again as the first available article sooner than you'd like. π)Mβ Mark the current article to return on newsgroup exit. Until then, the current article gets marked as read. This is genuinely useful for coming back to an article in another session. π«ΆYβ Yank back the marked-to-return articles, clearing their to-return status. And if you're reading selected articles, the yanked articles come back selected. π/patternβ Scan forward for an article containingpatternin the subject. See the Regular Expressions section. Paired with the escape substitution facility described later, it becomes easy to search for all sorts of attributes of the current article β subject, article ID, author name, etc. You can recall the previous pattern withESC. And ifpatternis omitted, the previous pattern is assumed. π/pattern/fβ Scan forward for an article containingpatternin the from line. If you're using thread files, the article data you're matching against MAY contain only the real name of the user. If you always wanna match the full from line, see the following header-matching option, which will read in the full from-line data if it isn't already available. π/pattern/Hheaderβ Scan forward for an article containingpatternin the indicated header. Because it scans the entire string up to the end of the modifiers, this modifier must be the last one. For example,/jsmoe@somesite.com/rHfrom:m+will mark all articles fromjsmoe@somesite.comas unread and select them. Note that if the header line isn't one thattrnrecognizes in its header parser, you'll have to use the following full-header matching instead. π§/pattern/hβ Scan forward for an article containingpatternin the header./pattern/aβ Scan forward for an article containingpatternanywhere in the article./pattern/bβ Scan forward for an article containingpatternin the body of the article, but not the signature. (The signature has to be properly delimited to get ignored, tho.)/pattern/Bβ Scan forward for an article containingpatternanywhere in the body of the article./pattern/rβ Scan read articles too. π/pattern/cβ Make the search case sensitive. Normally, upper- and lower-case are treated as the same thing./pattern/tβ Force the search to start at the top of the group (super handy while reading the group, since the default is to start at the current article). β¬οΈ/pattern/Iβ Force the search to ignore the THRU line when executed as a memorized command. If the command portion is a selection command (i.e. it starts with a+or a.), this is the default behavior./pattern/Nβ Force the search to NOT ignore the THRU line when executed as a memorized command (useful on selection commands β see also-k)./pattern/modifiers:command{:command}β Apply the listed commands to articles matching the search command (possibly withh,a,b, orrmodifiers). Applicable commands includem(mark as UNread),M(mark as read-until-exit),j(junk β mark as read in all groups),x(mark as read in this group),s dest(save to a dest),e dir(extract to dir),!command(shell escape),=(print the subject),+(select the article),-deselect the article,T+(auto-select the entire thread),TJ(auto-junk the entire thread),++(select the associated thread),--deselect the associated thread), andC(cancel). If the first command ismorM, modifierris assumed. AKmay be included in the modifiers (not the commands) to cause the entire command (sansK) to be saved to the local KILL file, where it will be applied to every article that shows up in the newsgroup. π- For example, to save all articles in a given newsgroup to the line printer and mark them read, use
/^/βͺlpr:j. And if you type/^/Kβͺlpr:j, this will happen every single time you enter the newsgroup. Obsessed. π₯
- For example, to save all articles in a given newsgroup to the line printer and mark them read, use
?patternβ Scan backward for an article containingpatternin the subject. May be modified just like the forward search is:?pattern?modifiers[:commands]. Chances are you'll want anrmodifier when scanning backward, bestie. βͺkβ Mark as read all articles with the same subject as the current article. (Note: there is no single character command to temporarily mark as read (Mcommand) articles matching the current subject. That can be done with/<ESC>s/M, however.) β¨
Mark the current article and all its replies as read.
Jβ Junk all the articles in the current thread, even if it contains multiple subjects. ποΈβ¨Aβ Add a subject-search command to the memorized list for this group (in the KILL file). You get prompted to choose selection (+), junking (j), selection including all replies (.), or junking including all replies (,). Choose wisely πKβ This is a synonym for the commandAj, which adds a command to junk the current subject to the memorized commands for the group. See also theKmodifier on searches above.Tβ okay bestie, this adds a thread-oriented command to the memorized list for this group. You are prompted to choose selection of entire thread (+), junking of entire thread (j), selection of an article and its replies (.), junking of an article and its replies (,), clearing the auto-selection/junking for this thread (c), or clearing the auto-selection/junking for an article and its replies (C). π^Kβ the way that this edits the local list of memorized commands (a.k.a. a KILL file) for this newsgroup. Each line of the KILL file is either a subject-affecting command of the form/pattern/xor a thread-affecting command of the form<message-id> Tx. The first line in the KILL file has the form"THRU <number>", which tells trn the maximum article number that the KILL file has been applied to. The THRU value is usually only used to keep header or article searches from happening multiple times. Subject and from-line searches are quite fast if the group has cached data around (e.g. a.threador.overviewfile). If it doesn't, the THRU line is used to set a lower boundary on the search to keep the startup time as short as possible. If trn skipped some selections (or you're not sure), wait for the group to finish being cached (e.g. visiting the selector forces the caching of all unread articles), quit the group, and re-enter.
To see only newgroup articles in the control newsgroup, for instance, you might include the line
/newgroup/:+
which selects all subjects containing "newgroup". You can add lines automatically via the A and T commands as well as the K search modifier, but editing is the only way to remove subject commands (thread commands die automatically as the thread dies). If either of the environment variables VISUAL or EDITOR is set, the specified editor will be invoked; otherwise a default editor (normally vi) is invoked on the KILL file.
The KILL file may also contain switch-setting lines beginning with & (see the section on "Options") and special commands beginning with *. There are two such commands at the moment: "*j" (junk all articles from THRU to the end of the group) and "*X" (junk all unselected articles from THRU to the end of the group). Additionally, any line beginning with X is executed on exit from the newsgroup rather than on entrance. This can be used to set switches back to a default value. One use for this capability is to set your save directory to a custom value upon entry to a newsgroup and set it back on exit using the -ESAVEDIR option. See also the -/ option for another solution to multiple save directories without using KILL files. β¨
rβ reply through net mail. The environment variablesMAILPOSTERandMAILHEADERmay be used to modify the mailing behavior of trn (see the environment section). If the current article does not exist (such as the "End of newsgroup" pseudo-article you can get to with a$command), invokes the mailer to nobody in particular. πRβ reply, including the current article in the header file generated. (SeeFcommand below). TheYOUSAIDenvironment variable controls the format of the attribution line.^Fβ forward the current article. π€fβ submit a follow-up article. If the current article does not exist (such as the "End of newsgroup" pseudo-article you can get to with a$command), posts an original (root) article.Fβ submit a follow-up article, and include the old article, with lines prefixed either by">"or by the argument to the-Fswitch. Trn will attempt to provide an attribution line in front of the quoted article, generated from theFrom:line of the article. Unfortunately, theFrom:line doesn't always contain the right name; you should double check it against the signature and change it if necessary, or you may have to apologize for quoting the wrong person. π The environment variablesNEWSPOSTER,NEWSHEADERandATTRIBUTIONmay be used to modify the posting behavior of trn (see environment section).Cβ cancel the current article, but only if you are the contributor or superuser. π«zβ supersede the current article, but only if you are the contributor.Zβ same as thezcommand, but you start with a copy of the original article to work with.cβ catch up in this newsgroup; i.e., mark all articles as read. βUβ unkill articles. You can choose to unkill the current thread, sub-thread (the current article and its replies), all the articles, or start up the selector to choose specific articles to unkill. π§uβ unsubscribe from this newsgroup. πsdestination β save to a filename or pipe usingsh. If the first character of the destination is a vertical bar, the rest of the command is considered a shell command to which the article is passed through standard input. The command is subject to filename expansion. (See also the environment variablePIPESAVER.) If the destination does not begin with a vertical bar, the rest of the command is assumed to be a filename of some sort. An initial tilde~will be translated to the name of the home directory, and an initial environment variable substitution is also allowed. If only a directory name is specified, the environment variableSAVENAMEis used to generate the actual name. If a non-absolute filename is specified, the environment variableSAVEDIRwill be used to generate the actual directory. If nothing is specified, then obviously both variables will be used. Since the current directory for trn while doing a save command is your private news directory, typing"s ./filename"will force the file to your news directory. Save commands are also run through%interpretation, so that you can enter"s %O/filename"to save to the directory you were in when you ran trn, and"s %t"to save to a filename consisting of the Internet address of the sender.
After generating the full pathname of the file to save to, trn determines if the file exists already, and if so, appends to it. trn will attempt to determine if an existing file is a mailbox or a normal file, and save the article in the same format. If the output file does not yet exist, trn will by default ask you which format you want, or you can make it skip the question with either the -M or -N switch. If the article is to be saved in mailbox format, the command to do so is generated from the environment variable MBOXSAVER. Otherwise, NORMSAVER is used. πΎ
Sdestination β save to a filename or pipe using a preferred shell, such ascsh. Which shell is used depends first on what you have the environment variableSHELLset to, and in the absence of that, on what your news administrator set for the preferred shell when he or she installed trn.βͺcommand β shorthand for"s βͺ command".wdestination β the same as"s destination", but saves without the header.Wdestination β the same as"S destination", but saves without the header.edirectory β extract a shell archive or uuencoded binary to the designated directory. The article is first scanned to try discover what type of data is encapsulated. If a "cut here" line is found, the first non-blank line after it must be either the start of a shar header, or the"begin"or"table"line of a uuencoded binary. The default for extracting shars is to send the data portion of the file to/bin/sh, but that can be overridden with theUNSHARvariable (see the ENVIRONMENT section). Uudecoding is done internally by a decoder that can handle the data being split up over multiple articles, and extracted one piece at a time. To decode a multi-article file, either execute theecommand in each article in sequence, use an article range to execute the command, or use the":e"command to repeat the command for each of the currently selected articles. When theecommand is not followed by any arguments, it will repeat the arguments from the last extraction. All directory specifications are relative to the value ofSAVEDIR, so you can use the command"e ."to force an extraction toSAVEDIRitself. If a uudecoding is in progress (i.e. the last piece wasn't extracted yet) and you exit the group, the partial file will be removed. This also occurs if you start to extract a new uuencoded file before the previous one was finished. See also theEcommand for ending a multi-part uudecoding manually.
There is one special case that is handled differently: if the first file in a recognizable shar file is a uuencoded binary that was packed with lines starting with an X, we will not unshar the file but instead uudecode it. If this causes problems, you can override the default extraction method by following the directory with an explicit command to execute, as described below. π¦
edirectoryβͺcommand β this form of theecommand allows you to extract other data formats than shar or uuencoded files or to override the decisions made by the automatic extraction selection described above. In normal operation, all data following what we recognize as a "cut here" line will be sent to the specified command. Additionally, the distinctive beginning of a shell archive is also recognized without a preceding cut line. When the command is run, the default directory will be set to the specified directory, or the value ofSAVEDIRif unspecified. Entering theecommand without arguments will repeat your previous extract command. You can use the command"e dirβͺ"to extract to a new directory using the previously-specified command.Eβ this command ends any multi-part uuencoded file extraction that you began, but are unable (or unwilling) to complete. The partially extracted file is removed. ποΈ&β shows you the current status of all your command-line switches. a lil vibe check for your options β¨&switch {switch}β sets extra command-line switches. add more slay to your setup π&&β prints out the macro definitions you've got going rn.&&keys commandsβ defines one more macro, bestie. stack 'em up π!commandβ escape to a subshell! one exclamation mark (!) drops you in your own news directory. a double one (!!) drops you in the spool directory of the current newsgroup. the environment variableSHELLgets used if it's defined. if command is null, you get an interactive shell instead π
you can use the escape key substitutions described later to reach a bunch of run-time values. the command also gets run through % interpretation, in case it's being called from a range or a search command.
+β starts the selector in whatever mode you used last. if the newsgroup is unthreaded and the default selector mode is threads, we temporarily switch to subject selection, unless you manually overrode it. ngl it's adaptive π_aβ starts the selector in article mode._sβ starts the selector in subject mode._tβ starts the selector in thread mode._Tβ starts the selector in thread mode, unless the group isn't threaded, in which case we settle for the subject selector. it's giving "we tried" π¦=β lists the subjects of unread articles. the og scroll π#β prints the last article number._+β selects the entire thread associated with the current article. all of it. periodt._-β deselects the entire thread associated with the current article. bye bestie π
πΈ Pager Level πΈ
okay so once you're at the pager level (aka you're inside an article), the prompt looks exactly like this:
--MORE--(17%)
and you've got a whole menu of commands to choose from, no cap:
SPβ displays the next page.xβ displays the next page and decrypts it as a rot13 message πdβ displays half a page more.CRβ displays one more line. baby steps πΌqβ goes to the end of the current article (and doesn't mark it read or unread). leaves you at the"What next?"prompt.jβ junks the current article. marks it read and goes to the end of the article. iconic behavior π^Lβ refreshes the screen. the classic glow-up β¨Xβ refreshes the screen and decrypts as a rot13 message.bβ backs up one page.^Eβ displays the last page of the article._Cβ switches to the next available charset conversion. multilingual queen πtβ displays the entire article tree, including its associated subjects, and keeps reading. if the group isn't currently threaded, it gets threaded first. no shortcuts here π³gpatternβ goto (search forward for) pattern within the current article. heads up: there is no space between the command and the pattern. if the pattern is found, the page containing the pattern gets displayed. where on the page the matching line lands depends on the value of the-gswitch β by default the matched line goes at the top of the screen.Gβ searches for thegpattern again. encore performance π€^Gβ this is a special version of thegcommand made for skipping articles in a digest. it's equivalent to setting"-g4"and then executing the command"g^Subject:".TABβ another special version of thegcommand, this one for skipping inclusions of older articles. it's equivalent to setting"-g4"and then executing the command"g^[^c]", where c is the first character of the last line on the screen. it searches for the first line that doesn't begin with the same character as the last line on the screen. detective energy π!commandβ escape to a subshell.
the following commands skip the rest of the current article, then behave exactly as if you'd typed them at the "What next?" prompt at the end of the article. see the documentation at the article selection level for these commands:
# $ & / = ? A c C f F k K T ^K J , m M r R ^R u U v Y ^
p P ^P - < > [ ] { } number
range{,range} command{:command}
and these ones also skip to the end of the article, but they have the additional effect of marking the current article as read:
n N ^N e s S βͺ w W
π Miscellaneous facts about commands π
an n typed at either the "Last newsgroup" prompt or a "Last article" prompt cycles you back to the top of the newsgroup or article list, whereas a q quits the level. (and yes β n does not mean "no" here, it means "next". we know. we know π) a space will of course do whatever's shown as the default, which varies depending on whether trn thinks you have more articles or more newsgroups to read.
the b (backup page) command can be repeated until you hit the beginning of the article. if trn gets suspended (via a ^Z), then when the job is resumed, a refresh (^L) is automatically done β Berkeley-type systems only, bestie, don't @ us. and if you type a command like ! or s that yeets you from the middle of the article to the end, you can always get back into the middle by typing ^L. the rewind button is real π«Ά
in multi-character commands like !, s, /, etc., you can interpolate various run-time values by typing escape and a character. to find out what you can interpolate, type escape and h, or check out the single character % substitutions for environment variables in the Interpretation and Interpolation section β they're the same thing. additionally, typing a double escape will cause any % substitutions in the string you've already typed in to be expanded. magic β¨
π³ The Tree Display π³
when you're reading a threaded newsgroup, trn displays a character representation of the article tree in the upper right corner of the header. for example, consider the following display:
(1)+-(1)--(2)--[2]
βͺ-(1)+-<3>
βͺ \-[1]
\-(1)+-[1]--[1]
\-[1]
this tree represents an initial article that has three direct replies (that's the second column with three (1)'s). each reply has further replies branching off from them. in two cases the subject line was altered in the reply, as indicated by the increasing numbers.
the third subject is not selected for reading, as indicated by the <>'s. note that you can always forcefully visit an unselected article with N and P, as well as with the thread-navigation commands (which are typically macro'ed to the arrow keys on your keypad). bold of that article to hide from you π
when there's only one subject associated with a thread, all the nodes are marked with the number 1. when the first subject change arrives, it's marked with the number 2, and so on. if you were to look at this thread in the thread selector, the three subjects associated with it would be listed in the same order as the ascending digits. in those rare cases where more than 9 subjects are associated with each thread, the nodes are marked with the letters A-Z, and then by a-z. alphabet girlie π€
the articles that have already been read are enclosed in ()'s. unread articles are displayed in []'s, and unread-but-unselected articles are displayed in <>'s. the currently displayed article has its entire node highlighted in the display. the previously displayed article has only its number highlighted. if the group hasn't been completely threaded yet, some articles will appear as (?) until trn can determine if the referenced article truly exists or not. if you visit such an article and wait for trn to finish threading the group, the screen will refresh as soon as the presence or absence of the article is determined. mystery solved πβ¨
π Options π
trn has a nice set of options so you can tailor the interaction to your exact liking. (you might like to know that the author swears by "-x6ms +e -mu -S -XX -N -B -p" β an absolute icon π
) these options may be set on the command line, via the TRNINIT environment variable, via a file pointed to by the TRNINIT variable, or from within trn via the & command. options may generally be unset by typing "+switch". options include:
-aβ causestrnto always thread the unread articles on entry to a group. without this optiontrnmay enter a group in a partially-threaded state and process the unthreaded articles in the background. the down side of this? the tree display may not be complete when it's first displayed, and you may start out at an odd position in the first thread's article tree. chaotic entry, ngl π΅βπ«-Aβ tellstrnto attempt to create some default macros that will map your arrow keys to usefultrnfunctions (this is the default). use+Ato turn this behavior off.-bβ will forcetrnto read each thread in a breadth-first order, rather than depth-first.-Bβ will turn on a spinner that twirls whentrnis doing background article-processing. a gizmo for those interested in what's going on behind the scenes π-cβ checks for news without reading news. if a list of newsgroups is given on the command line, only those newsgroups get checked; otherwise all subscribed-to newsgroups are checked. whenever the-cswitch is specified, a non-zero exit status fromtrnmeans that there is unread news in one of the checked newsgroups. the-cswitch does not disable the printing of newsgroups with unread news; that's controlled by the-sswitch. (the-cswitch is not meaningful when given via the&command.) π-C<number>β tellstrnhow often to checkpoint the.newsrc, in articles read. actually, this number says when to start thinking about doing a checkpoint if the situation is right. if a reasonable checkpointing situation doesn't arise within 10 more articles, the.newsrcis check-pointed willy-nilly. no thoughts, just checkpoints π-d<directory name>β sets your private news directory to something other than~/News. the directory name will be globbed (viacsh) if necessary (and if possible). the value ofSAVEDIR(where articles are saved) is initially set to this directory, but is often manipulated via the-/option or by manipulatingSAVEDIRdirectly (perhaps via the memorized commands (the KILL file) for a group. any KILL files (see theKcommand in the Article Selection section) also reside in this directory and its subdirectories, by default. in addition, shell escapes leave you in this directory. home sweet home π π-D<flags>β enables debugging output. seecommon.hfor flag values.
β οΈ Warning: normallytrnattempts to restore your.newsrcwhen an unexpected signal or internal error occurs. this is disabled when any debugging flags are set. so likeβ¦ be careful bestie π
-eβ okay so bestie, this one makes every page inside an article start at the top of your screen, not just the first one. It's giving the same energy as the-cswitch inmore(1). With this on you literally never have to read scrolling text. It's lowkey a lifesaver at certain baud rates because you can start reading the top of the next page without waiting for the whole page to print out. It also pairs beautifully with-m, especially if you're using half-intensity for your highlight mode. See also the-Lswitch. π-E<name>=<val>β sets the environment variable<name>to the value you specify. Inside trn, "&-ESAVENAME=%t" is similar to "setenv SAVENAME '%t'" incsh, or "SAVENAME='%t'; export SAVENAME" insh. Any env vars you set with-Eget inherited by subprocesses of trn, no cap.-fβ makes trn skip various sleep calls and the prompt after processing memorized commands β the ones that exist to give you a sec to read a message before the screen clears. So the advanced user can cruise along a lil faster, at the expense of readability. The-t(terse) option turns on-fby default, but you can override that by specifying+fafter the-toption. Slay. β¨-F<string>β sets the prefix string for theFfollow-up command, used to prefix each line of the quoted article. For example,-F<tab>inserts a tab on the front of each line (which will cause long lines to wrap around, unfortunately π),-F>>>>inserts>>>>on every line, and-Fby itself causes nothing to be inserted, in case you want to reformat the text, for instance. The initial default prefix is>.-g<line>β tells trn which line of the screen you want searched-for strings to show up on when you search with thegcommand inside an article. Lines are numbered starting with1. The initial default is-g1, meaning the first line of the screen. Setting the line to less than1or more than the number of lines on the screen will set it to the last line of the screen. π-Gβ selects the "fuzzy" processing on the go command when you don't type in a valid group name. With this on, trn will attempt to find the group you probably meant to type, but it can be a little slow about it, so it's not on by default. She's thorough but she takes her time. π-h<string>β hides (disables the printing of) all header lines beginning with string. For instance,-hx-will disable the printing of all "X-Foo:" headers. Case is not significant. The default for unrecognized headers can be set with the-hunrecognizedoption. Alternately you could use-h(no string) to disable all headers except the Subject line and then use+hto select only those lines you want to see. You may wish to use the baud-rate switch modifier below to hide more lines at lower baud rates.-H<string>β works just like-hexcept that instead of setting the hiding flag for a header line, it sets the magic flag for that header line. Certain header lines have magic behavior that can be controlled this way. At present, the following actions are caused by the flag for the particular line:- the Date line prints the date in local time if the group is threaded;
- the From line will only print the commented portion of the user name;
- the Newsgroups line will only print when there are multiple newsgroups;
- the Subject line will be underlined and (when threaded) the keyword
Subject:is replaced by its subject number (e.g.[1]); - and the Expires line will always be suppressed if there is nothing on it.
In fact, all of these actions are the default, and you must use +H to undo them. π¦
-i=<number>β specifies how long (in lines) to consider the initial page of an article β normally this is determined automatically depending on baud rate. (Note that an entire article header will always be printed regardless of the specified initial page length. If you are working at low baud rate and wish to reduce the size of the headers, you may hide certain header lines with the-hswitch.)-Iβ tells trn to append all new, unsubscribed groups to the end of the.newsrc.-jβ forces trn to leave control characters unmolested in messages.-J{<number>}β causes trn to join similar subjects into a common thread if they are the same up to the indicated number of characters (the default is30). You can turn this on and off for specific groups by putting the following lines into your kill file for the group(s):
&-J30
X&+J
-kβ tells trn to ignore theTHRUline when processing selection searches (i.e. searches with a command portion that starts with a+or a.) in the memorized commands (aka kill files). This is turned on by default, so use+kif you want to turn it off. π-Kβ is used to keep a trn from checking for new news while you're in the group. Use this when your kill-file processing is so slow that you don't want the group to expand while you're reading. If you only want specific groups to be affected, put these lines into your kill file for the group(s):
&-K
X&+K
-lβ disables the clearing of the screen at the beginning of each article, in case you have a bizarre terminal. π-Lβ tells trn to leave information on the screen as long as possible by not blanking the screen between pages, and by using clear to end-of-line. (Themore(1)program does this.) This feature works only if you have the requisite termcap capabilities. The switch has no effect unless the-eswitch is set.-m=<mode>β enables the marking of the last line of the previous page printed, to help the user see where to continue reading. This is most helpful when less than a full page is going to be displayed. It may also be used in conjunction with the-eswitch, in which case the page is erased, and the first line (which is the last line of the previous page) is highlighted. If-m=sis specified, the standout mode will be used, but if-m=uis specified, underlining will be used. If neither=sor=uis specified, standout is the default. Use+mto disable highlighting.-Mβ forces mailbox format in creating new save files. Ordinarily you are asked which format you want.-Nβ forces normal (non-mailbox) format in creating new save files. Ordinarily you are asked which format you want.-oβ will act like old versions of trn and not junk cross-referenced articles when using thread commands to junk articles in the current group (such as the selector'sXcommand).-O<mode>{<order>}β specifies the selector's mode and (optionally) the sort order. The modes are'a'rticle,'s'ubject, or't'hread. The orders are'd'ate,'s'ubject,'a'uthor, article'c'ountper group,'n'umeric, or subject-date'g'roups. The order can be capitalized to reverse the indicated order. For example, to choose the article selector in subject order specify"-Oas". π-p{opt}β tells trn to auto-select your postings and their replies as it encounters them in the various groups you read. The optional parameter is either a.,p, or+(it defaults to.if omitted) and affects what command trn should execute when it encounters your postings. The default is to execute the command"T."on each of your postings which tells trn to memorize the auto-selection of this article and all its replies. Using-pptells trn to use the same command, but start the selection with the parent article, so that you see any other replies to the same article. Using-p+tells trn to select the whole thread that contains your reply. π-qβ bypasses the automatic check for new newsgroups when starting trn.-Q<set>β defines the set of available charset conversions. This can be useful to restrict the available conversions to those your terminal can handle and/or to specify an alternate default. The first element of this set is taken as default for each article.-rβ causes trn to restart in the last newsgroup read during a previous session with trn. It is equivalent to starting up normally and then getting to the newsgroup with agcommand. β¨-sβ with no argument, suppresses the initial listing of newsgroups with unread news, whether-cis specified or not. Thus-cand-scan be used together to test "silently" the status of news from within your.loginfile. If-sis followed by a number, the initial listing is suppressed after that many lines have been listed. Presuming that you have your.newsrcsorted into order of interest,-s5will tell you the 5 most interesting newsgroups that have unread news. This is also a nice feature to use in your.loginfile, since it not only tells you whether there is unread news, but also how important the unread news is, without having to wade through the entire list of unread newsgroups. If no-sswitch is given-s5is assumed, so just putting"rn -c"into your.loginfile is fine. π-S<number>β causes trn to enter subject search mode (^N) automatically whenever an unthreaded newsgroup is started up with<number>unread articles or more. Additionally, it causes anyntyped while in subject search mode to be interpreted as^Ninstead. (To get back out of subject search mode, the best command is probably^.) If<number>is omitted,3is assumed.-tβ puts trn into terse mode. This is more cryptic but useful for low baud rates. (Note that your system administrator may have compiled trn with either verbose or terse messages only to save memory.) You may wish to use the baud-rate switch modifier below to enable terse mode only at lower baud rates.-Tβ allows you to type ahead of trn. Ordinarily trn will eat typeahead to prevent your autorepeating space bar from doing a very frustrating thing when you accidentally hold it down. If you don't have a repeating space bar, or you are working at low baud rate, you can set this switch to prevent this behavior. You may wish to use the baud-rate switch modifier below to disable typeahead only at lower baud rates. π€-uβ sets the unbroken-subject-line mode in the selector, which simply truncates subjects that are too long instead of dumping the middle portion prior to the last two words of the subject. π§-Uβ bestie, this tellstrnto NOT write the.newsrcfile out after every group you visit. It's technically "unsafe" (their words, not mine π) but it can be way faster if your.newsrcis absolutely enormous. Do with that what you will. π-vβ sets verification mode for commands. When it's on, the command being executed gets displayed, so you get that lil feedback confirming your key actually registered. Iconic for when the system is heavily loaded and you type a command that takes a hot minute to start up. π¦-Vβ will outputtrn's version number and quit. That's it. That's the whole vibe. β¨-x{<number>}{<list>}β enables the extended (threaded) features oftrnbeyond therncompatibility mode (this may already be the default on your system, so use+xif you're out here yearning for the good ol' days π₯²). The<number>is the max number of article-tree lines (from0to11) you want displayed in your header. Use the<list>to pick which thread selector styles you like ('s'hort,'m'edium, or'l'ong) and in what order they get selected with the'L'command. For example, use-xmsto start with the medium display mode and only switch between it and the short mode. You can omit either or both of the parameters, in which case a default of-x6lmsis assumed. π-X{<number>}{<commands>}β if you like using the selector, you'll probs want this option to make the selector command (+) the default when a newsgroup is started up with at least<number>unread articles. (Your installer may have chosen to make-X0the default on your system.) It's also used to select which commands you want to be the defaults while using the thread selector. For example,-X2XDwill make the thread selector the default command for entering a newsgroup with at least 2 unread articles, and set the default command for the LAST page of the thread selector to be theXcommand and the default command for all other pages to be theDcommand. Either or both parameters can be omitted, as well as the second default command (e.g.-XXwould change the default newsgroup entry to use the selector and the default command for the last page of the selector to be'X'). The default is-X0Z>if just-Xis specified. To set the default selector commands without having'+'be the default entry into a newsgroup, specify a high number, like9999. π₯-zβ sets the minimum number of minutes that must elapse before the active file is refetched to look for new articles. A value of0or using+zturns this off. No cap. π-/β setsSAVEDIRto"%p/%c"andSAVENAMEto"%a", which means that by default articles are saved in a subdirectory of your private news directory corresponding to the name of the the current newsgroup, with the filename being the article number.+/setsSAVEDIRto"%p"andSAVENAMEto"%^C", which by default saves articles directly to your private news directory, with the filename being the name of the current newsgroup, first letter capitalized. (Either+/or-/may be default on your system, depending on the feelings of your news administrator when he, she or it installedtrn.) You may, of course, explicitly setSAVEDIRandSAVENAMEto other values β see discussion in the environment section. πΈ
Any switch may be selectively applied according to the current baud-rate. Simply prefix the switch with +speed to apply the switch at that speed or greater, and -speed to apply the switch at that speed or less. Examples: -1200-hposted suppresses the Posted line at 1200 baud or less; +9600-m enables marking at 9600 baud or more. You can apply the modifier recursively to itself also: +300-1200-t sets terse mode from 300 to 1200 baud. β¨
Similarly, switches may be selected based on terminal type:
-=vt100+T set +T on vt100
-=tvi920-ETERM=mytvi get a special termcap entry
-=tvi920-ERNMACRO=%./.rnmac.tvi
set up special key-mappings
+=paper-v set verify mode if not hardcopy
Some switch arguments, such as environment variable values, may require spaces in them. Such spaces should be quoted via ", ', or \ in the conventional fashion, even when passed via TRNINIT or the & command. π
π Regular Expressions π
The patterns used in article searching are regular expressions such as those used by ed(1). In addition, \w matches an alphanumeric character and \W a non-alphanumeric. Word boundaries may be matched by \b, and non-boundaries by \B. The bracketing construct \( ... \) may also be used, and \digit matches the digit'th substring, where digit can range from 1 to 9. \0 matches whatever the last bracket match matched. Up to 10 alternatives may given in a pattern, separated by \βͺ, with the caveat that \( ... \βͺ ... \) is illegal. β
π¦ Character Set Conversions π¦
trn can use character set conversions when displaying articles. This helps users in non-English-speaking countries to display special characters on 7-bit displays. trn assumes that articles use the ISO-8859-1 character set and converts the special characters (e.g., "umlauts") to a string of ASCII characters. Currently the following conversions are supported (see the -Q option):
pβ Plain. No change. This is the default. β¨aβISO->ASCII. Special characters are mapped to ASCII, e.g. the umlaut-o character becomesoe.mβISO->ASCIImonospaced. Special characters are mapped to exactly one similar-looking ASCII character, e.g. umlaut-o becomeso. Used where correct spacing is more important than accuracy. πtβTeX->ISO. Assuming your display can handle theISO-8859-1charset,trntransforms umlauts in the TeX notation, which is commonly used in Germany, to real ISO characters, e.g."abecomes umlaut-a.
The selected conversion, if different from p, will be displayed in the article level and pager prompt. The conversion is also used when including original articles in a reply or followup. It is not used when saving articles to files. π
π Interpretation and Interpolation π
Many of the strings that trn handles are subject to interpretations of several types. Under filename expansion, an initial "~/" is translated to the name of your home directory, and "~name" is translated to the login directory for the user specified. Filename expansion will also expand an initial environment variable, and also does the backslash, caret and percent expansion mentioned below. πΈ
All interpreted strings go through backslash, caret and percent interpretation. The backslash escapes are the normal ones (such as \n, \t, \033, etc.). The caret escapes indicate control codes (such as ^i, ^l, etc.). If you wish to pass through a backslash or a caret it must be escaped with a backslash. The special percent escapes are similar to printf percent escapes. These cause the substitution of various run-time values into the string. The following are currently recognized:
%aβ Current article number.%Aβ Full name of current article (%P/%c/%a).%bβ Destination of last save command, often a mailbox.%Bβ The byte offset to the beginning of the part of the article to be saved, set by the save command. The's'and'S'commands set it to0, and the'w'and'W'commands set it to the byte offset of the body of the article.%cβ Current newsgroup, directory form.%Cβ Current newsgroup, dot form.%dβ Full name of newsgroup directory (%P/%c).%Dβ"Distribution:"line from the current article.%eβ The last command executed to extract data from an article.%Eβ The last directory where an extracted file went.%fβ"From:"line from the current article, or the"Reply-To:"line if there is one. This differs from%tin that comments (such as the full name) are not stripped out with%f.%Fβ"Newsgroups:"line for a new article, constructed from"Newsgroups:"and"Followup-To:"lines of current article.%gβ The general mode oftrn, for use in conditional macros.Iβ Init mode.sβ Selector mode.rβ Rn mode.iβ Input mode (newline terminated).pβ Prompt mode (single-character input).cβ Choice mode (multi-choice input).
%hβ Name of the header file to pass to the mail or news poster, containing all the information that the poster program needs in the form of a message header. It may also contain a copy of the current article. The format of the header file is controlled by theMAILHEADERandNEWSHEADERenvironment variables.%Hβ Host name (your machine's name).%iβ"Message-I.D.:"line from the current article, with<>guaranteed.%Iβ The reference indication mark for citing prior articles (see the-Fswitch.)%lβ The news administrator's login name, if any.%Lβ Login name (yours).%mβ The current mode oftrn, for use in conditional macros.iβ Initializing.nβ Newsgroup-list level.fβ End (finis) of newsgroup-list level.tβ The thread/subject/article selector.cβ Newsrc selector.wβ Newsgroup selector.jβ Addgroup selector.lβ Option selector.aβ Article level ("What next?").eβ End of the article level.pβ Pager level ("MORE"prompt).uβ Unkill prompt.dβ Selector mode prompt.oβ Selector order prompt.mβ Memorize thread command prompt.rβ Memorize subject command prompt.zβ Option edit prompt.kβ Processing memorized (KILL-file) commands.Aβ Add this newsgroup?Bβ Abandon confirmation.Cβ Catchup confirmation.Dβ Delete bogus newsgroups?Fβ Is follow-up a new topic?Mβ Use mailbox format?Rβ Resubscribe to this newsgroup?Kβ Press any key prompt.
Note that yes/no questions are all upper-case modes. If, for example, you wanted to disallow defaults on all yes/no questions, you could define the following macro:
\040 %(%m=[A-Z]?h: )
%Mβ The number of articles marked to return via the'M'command. If the same article is Marked multiple times,"%M"counts it multiple times in the current implementation.%nβ"Newsgroups:"line from the current article.%Nβ Full name (yours).%oβ Organization (yours).%Oβ Original working directory (where you rantrnfrom).%pβ your private news directory, normally~/News. that's your personal stash, bestie π%Pβ public news spool directory, normally/usr/spool/newson systems that don't use NNTP. old school vibes%qβ the value of the last"quoted"input string (see the%"interp). iykyk%rβ last reference on the references line of the current article (parent article id). the mothership%Rβ references list for a new article, constructed from the references and article ID of the current article. β¨%sβ subject, with allRe's and(nf)'s stripped off. clean af%Sβ subject, with one"Re:"stripped off. just one tho%tβ"To:"line derived from the"From:"and"Reply-To:"lines of the current article. This always returns an Internet format address. internet famous%Tβ"To:"line derived from the"Path:"line of the current article to produce a uucp path. throwback%uβ the number of unread articles in the current newsgroup. unread count, periodt%Uβ the number of unread articles in the current newsgroup, not counting the current article. When threads are selected, this count reflects only selected articles. don't count me tho%vβ the number of unselected articles, not counting the current article if it is unselected. left on read%wβ the directory where mthreads keeps its tmp files. tmp szn%Wβ the directory where thread files are placed. thread goals%xβ the news library directory. bookshelf energy%Xβ the trn library directory. our special place%zβ the length of the current article in bytes. byte me%Zβ the number of selected threads. chosen ones%~β your home directory. home sweet home π%.β the directory containing your dot files, which is your home directory unless the environment variableDOTDIRis defined whentrnis invoked. dot dot dot%#β the current count for a multi-file save, starting with 1. This value is incremented by one for each file saved or extracted within a single command. counting up%$β current process number. pid moment%/β last search string. what were we looking for again%?β a space unless the current interp string is > 79 characters, at which point it turns into a newline. line break era%%β a percent sign. yes, just a percent%{name}or%{name-default}β the environment variable"name". env var realness%[name]β the value of header line"Name:"from the current article. The"Name: "is not included. For example"%D"and"%[distribution]"are equivalent. The name must be spelled out in full. no abbreviations, bestie%`command`β inserts the output of the command, with any embedded newlines translated to space. shell go brrr%""prompt""β prints prompt on the terminal, then inputs one string, and inserts it. interactive queen%(test_text=pattern?then_text:else_text)β iftest_textmatchespattern, has the valuethen_text, otherwiseelse_text. The":else_text"is optional, and if absent, interpolates the null string. The=may be replaced with!=to negate the test. To quote any of the meta-characters ('=','?',':', or')'), precede with a backslash. conditional slay%digitβ the digits 1 through 9 interpolate the string matched by the nth bracket in the last pattern match that had brackets. If the last pattern had alternatives, you may not know the number of the bracket you want --%0will give you the last bracket matched. bracket math
Modifiers: to capitalize the first letter, insert '^': "%^C" produces something like "Rec.humor". Inserting '_' causes the first letter following the last '/' to be capitalized: "%_c" produces "rec/Humor".
Inserting '\' will insert a backslash before any characters that would be magic in a regular expression, including '%': "%\C" produces "rec\.humor".
Inserting "'" will insert a backslash before any single-quotes in the result, suitable for enclosing in single-quotes and sending to a shell: "'%'s'" might produce "'I'\''m a subject'".
Inserting "''" will insert a backslash before any double-quotes in the result, suitable for enclosing in double-quotes and sending to a shell.
Inserting ">" will strip out just the address portion of an address string such as the From line.
Inserting ")" will strip out just the comment (real name) portion of an address string such as the From line.
Inserting ":FMT" will format the result according to the printf-style FMT string: "%:-50.50s" left-justifies the subject into a 50 character field.
β¨ ENVIRONMENT β¨
The following environment variables are paid attention to by trn. In general the default values assumed for these variables by trn are reasonable, so if you are using trn for the first time, you can safely ignore this section. no cap, you can skip this if you're new Note that the defaults below may not correspond precisely to the defaults on your system. To find the actual defaults you would need to look in config.h and common.h in the trn source directory, and the file INIT in the trn library directory.
Those variables marked (%) are subject to % interpolation, and those marked (~) are subject to both % interpolation and ~ interpretation.
ATTRIBUTION(%) β gives the format of the attribution line in front of the quoted article included by anFcommand.
Default: In article %i,%?%)f <%>f> wrote:
AUTOSUBSCRIBEβ whentrnis checking for new newsgroups and finds one matching one of the patterns inAUTOSUBSCRIBE, the new group is automatically added to the end of the.newsrc, subscribed. Newsgroups not matching this orAUTOUNSUBSCRIBE, below, are offered to the user.
AUTOSUBSCRIBE is a comma separated list of newsgroup patterns ala 'o', '/', etc. It can also include "but not" entries preceded by '!'. "a,b,!c,d" is read as "matching a or b, unless it also matches c; matching d regardless". Another way to look at it is "(((a or b) and not c) or d)". To automatically subscribe to all local groups but be choosy about non-local groups, one might say "*,!*.*".
Default: (none)
AUTOUNSUBSCRIBEβ very similar toAUTOSUBSCRIBE, above, but new newsgroups matching it are automatically added to the end of the.newsrcfile, unsubscribed. If a newsgroup matchesAUTOSUBSCRIBE,AUTOUNSUBSCRIBEis not consulted.
Default: (none)
CANCEL(~) β the shell command used to cancel an article.
Default: inews -h < %h
CANCELHEADER(%) β the format of the file to pass to theCANCELcommand in order to cancel an article.
Default:
Newsgroups: %n
Subject: cmsg cancel %i
References: %R
Reply-To: %L@%H (%N)
Distribution: %D
Organization: %o
%i cancelled from trn.
DOTDIRβ where to find your dot files, if they aren't in your home directory. Can be interpolated using"%.".
Default: $HOME
EDITOR(~) β the name of your editor, ifVISUALis undefined.
Default: whatever your news administrator compiled in, usually vi.
EXSAVER(%) β the shell command to execute in order to extract data to either/bin/shor a user-specified command.
Default: tail -c +%B %A βͺ %e
FIRSTLINE(%) β controls the format of the line displayed at the top of an article. Warning: this may go away.
The default (ignoring the Marked to return display in unthreaded groups) is approximately:
%C #%a%(%Z=^0$?%(%U!=^0$? (%U more\)): (%U + %v more\))
FORWARDHEADER(%) β the format of the header file for forwarding messages. See alsoFORWARDPOSTER.
Default:
To:
Subject: %(%i=^$?:[subject] (fwd\\)
%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}
)Newsgroups: %n
In-Reply-To: %i)
%(%[references]=^$?:References: %[references]
)Organization: %o
Cc:
Bcc: \n\n
FORWARDPOSTER(~) β the shell command to be used by the forward command (^F) in order to allow you to edit and deliver the file.trnwill not itself call upon an editor for replies -- this is a function of the program referenced byFORWARDPOSTER. See alsoFORWARDHEADERandMAILPOSTER.
Default: Rnmail -h %h
FROM(%) β what to put in theFrom:header of your posts, email replies, and email forwards, instead of whatever the default name and address are for your system. This will only work if you use the default settings for theNEWSHEADER,MAILHEADER, andFORWARDHEADERvariables, or if your custom ones useFROMto set theFrom:header.
Regardless of the settings of NEWSHEADER, MAILHEADER, and FORWARDHEADER, the setting of FROM is used to determine which articles may be cancelled or superseded.
Default: undefined
HIDELINEβ if defined, contains a regular expression which matches article lines to be hidden, in order, for instance, to suppress quoted material. A recommended string for this purpose is"^>...", which doesn't hide lines with only'>', to give some indication that quoted material is being skipped. If you want to hide more than one pattern, you can use"βͺ"to separate the alternatives. You can view the hidden lines by restarting the article with the'v'command.
There is some overhead involved in matching each line of the article against a regular expression. You might wish to use a baud-rate modifier to enable this feature only at low baud rates.
Default: undefined
HOMEβ your home directory. Affects~interpretation, and the location of your dot files ifDOTDIRis not defined.
Default: $LOGDIR
KILLGLOBAL(~) β where to find the KILL file to apply to every newsgroup. See the'^K'command at the newsgroup-selection level.
Default: %p/KILL
KILLLOCAL(~) β where to find the KILL file for the current newsgroup. See the commands'K'and'^K'at the article selection level, and the search modifier'K'.
Default: %p/%c/KILL
LOGDIRβ your home directory ifHOMEis undefined. Affects~interpretation, and the location of your dot files ifDOTDIRis not defined.
Default: none.
Explanation: you must have either $HOME or $LOGDIR.
LOGNAMEβ your login name, ifUSERis undefined. May be interpolated using"%L".
Default: value of getlogin().
LOCALTIMEFMTβ the format thatstrftime()uses to print local time. The Date line only shows up in local time if the group is threaded (peep the-Hoption for more deets on Date). Default:%a %b %e %X %Z %Yβ literally the same format as thedate(1)command. πMAILCALL(~) β what to say when there's new mail. Default:(Mail)π¬MAILFILE(~) β where to check for mail. Default:/usr/spool/mail/%LπͺMAILHEADER(%) β the format of the header file for replies. See alsoMAILPOSTER. Default:
To: %t
Subject: %(%i=^$?:Re: %S
%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}
)Newsgroups: %n
In-Reply-To: %i)
%(%[references]=^$?:References: %[references]
)Organization: %o
Cc:
Bcc: \n\n
MAILPOSTER(~) β the shell command that the reply commands (randR) use so you can enter and deliver your response.trnwill not itself call an editor for replies β that's a job for the program referenced byMAILPOSTER. See alsoMAILHEADER. Default:Rnmail -h %hπMBOXSAVER(~) β the shell command to save an article in mailbox format. Default:
%X/mbox.saver %A %P %c %a %B %C "%b" \
"From %t %`date`"
Explanation: the first seven arguments are the same as for NORMSAVER. The eighth argument to the shell script is the new From line for the article, including the posting date, derived either directly from the Posted: line, or not-so-directly from the Date: line. Header munging at its finest. π
MODSTRINGβ the string to insert in the group summary line (the one that heads each article) for a moderated group. See alsoNOPOSTRING. Default:" (moderated)"πNAMEβ your full name. May be interpolated using"%N". Default: name from/etc/passwd, or~/.fullname. πͺͺNEWSHEADER(%) β the format of the header file for follow-ups. See alsoNEWSPOSTER. Default:
%(%[followup-to]=^$?:%(%[followup-to]=^%n$?:X-ORIGINAL-
NEWSGROUPS: %n
))Newsgroups: %(%F=^$?%C:%F)
Subject: %(%S=^$?%"\n\nSubject: ":Re: %S)
Summary:
Expires:
%(%R=^$?:References: %R
)Sender:
Followup-To:
%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}
)Distribution: %(%i=^$?%"Distribution: ":%D)
Organization: %o
Keywords: %[keywords]
Cc: \n\n
NEWSORGβ either the name of your organization, or the name of a file containing the name of your organization. (For use at sites where theORGANIZATIONenvironmental variable is already in use.NEWSORGwill overrideORGANIZATIONif both are present.) May be interpolated using"%o". Default: whatever your news administrator compiled in. π’NEWSPOSTER(~) β the shell command used by the follow-up commands (fandF) to let you enter and post a follow-up news article. If not set,trnhandles the whole process and callsinewsdirectly. See alsoNEWSHEADER. π°NNTPSERVERβ the hostname of yourNNTPSERVER. [This does not apply unless you are running the NNTP version oftrn.] Default: the hostname listed in the server file, usually/usr/local/lib/rn/server. πNOPOSTRINGβ the string to insert in the group summary line (the one that heads each article) for a group where local posting is not allowed. See alsoMODSTRING. Default:" (no posting)"π«NORMSAVER(~) β the shell command to save an article in the normal (non-mailbox) format. Default:%X/norm.saver %A %P %c %a %B %C "%b"πΎORGANIZATIONβ either the name of your organization, or the name of a file containing the name of your organization. (IfNEWSORGis set, it will overrideORGANIZATION.) May be interpolated using"%o". Default: whatever your news administrator compiled in. ποΈPAGESTOPβ if defined, contains a regular expression that matches article lines to be treated as form-feeds. There are at least two things you might want to do with this. To cause page breaks between articles in a digest, you might define it as"^--------". To force a page break before a signature, you could define it as"^-- $". (Then, when you see"--"at the bottom of the page, you can skip the signature if you so desire by typing'n'instead of space.) To do both, you could use"^--". If you want to break on more than one pattern, you can use"βͺ"to separate the alternatives. There is some overhead involved in matching each line of the article against a regular expression. You might wish to use a baud-rate modifier to enable this feature only at low baud rates. Default: undefined. πPIPESAVER(%) β the shell command to execute in order to accomplish a save to a pipe ("s βͺ command"or"w βͺ command"). The command typed by the user is substituted in as%b. Default:%(%B=^0$?<%A:tail -c +%B %A βͺ) %b. Explanation: if%Bis 0, the command is"<%A %b", otherwise the command is"tail -c +%B %A βͺ %b". π°REPLYTOβ the value of the"Reply-To:"header, if needed. β©οΈRNINITβ this variable is used when initializingtrnin rn-compatibility mode (see the-xswitch) or when theTRNINITvariable isn't defined. See theTRNINITvariable for a description. πRNMACRO(~) β the name of the file containing macros and key mappings when runningtrnasrn. See also theTRNMACROvariable and theCUSTOM MACROSsection. Default:%./.rnmacποΈSAVEDIR(~) β the name of the directory to save to, if the save command does not specify a directory name. Default:- If
-/is set:%p/%c - If
+/is set:%p
- If
SAVENAME(%) β the name of the file to save to, if the save command contains only a directory name. Default:- If
-/is set:%a - If
+/is set:%^C
- If
SELECTCHARSβ the characters used by the thread selector to select the associated thread of discussion. You can specify up to 64 visible characters, including upper- and lower-case letters, numbers, and many punctuation characters. Selection characters override command characters in the selector, but are not excluded from macro expansion, so be careful. Default:abdefgijlorstuvwxyz1234567890BCFGHIKMVW(You'll notice various characters are omitted to allow them to be typed as commands in the selector.) πSHELLβ the name of your preferred shell. It will be used by the'!','S'and'W'commands. Default: whatever your news administrator compiled in. πSUBJLINE(%) β controls the format of the lines displayed by the'='command at the article selection level. Default:%sπSUPERSEDEHEADER(%) β the format of the header file for a supersede article. Default:
From: %L@%H (%N)
Newsgroups: %n
Subject: %S
Distribution: %D
Organization: %o
Supersedes: %i
TERMβ determines which termcap entry to use, unlessTERMCAPcontains the entry. π₯οΈTERMCAPβ holds either the name of your termcap file, or a termcap entry. Default:/etc/termcap, normally. πTRNINITβ default values for switches may be passed totrnby placing them in theTRNINITvariable (orRNINITif you're startingtrnin rn-compatibility mode). Any switch that is set in this way may be overruled on the command line, or via the'&'command from withintrn. Binary-valued switches that are set with"-switch"may be unset using"+switch". IfTRNINITbegins with a'/'it is assumed to be the name of a file containing switches. You can put comments in this file by preceding them with a'#'as long as this is the first character on a line or it follows some white-space (which delimits the switches in the file). If you want to set many environment variables but don't want to keep them all in your environment, or if the use of any of these variables conflicts with other programs, you can use this feature along with the-Eswitch to set the environment variables upon startup. Default:" ". βοΈTRNMACRO(~) β the name of the file containing macros and key mappings. If the file is not found, theRNMACROvariable is used to look for yourrnmacros. For information on what to put into this file, see theCUSTOM MACROSsection. Default:%./.trn/macrosπUNSHAR(~) β the shell command to execute in order to accomplish the unshar'ing of a shell archive. Default:/bin/shπUSERβ your login name. May be interpolated using"%L". Default:$LOGNAMEπ€VISUAL(~) β the name of your editor. Default:$EDITORβοΈXTERMMOUSEβ if you set this variable to'y'(yes),trnwill enable the use of the xterm mouse in the selector if you are using an xterm. Once enabled left-clicking on an item selects it while middle-clicking an item will move to that item. If you click the top (header) line of the selector it moves up a page. If you click the bottom (footer) line of the selector it executes the default command for the page (left click) or goes down a page (middle click). You can also use the right mouse button to move up or down a page by clicking in the upper-half or lower-half of the screen, respectively. π±οΈYOUSAID(%) β gives the format of the attribution line in front of the quoted article included by anRcommand. Default:In article %i you write:π¬
β¨ AUTOMATIC MACROS β¨
On startup trn attempts to build a set of macros that map your keypad arrow keys to useful functions. These default actions are mentioned in the prior description of each level's commands. If you don't like this (or trn gets it wrong), you can disable the automatic macros by using the -A option. ποΈ
β¨ CUSTOM MACROS β¨
okay so when trn boots up, it's lowkey looking for a file full of macro definitions (peep the env vars TRNMACRO and RNMACRO, bestie). You can bind any sequence of commands to any sequence of keys β like, you could literally re-map your entire keyboard if you want. π
Blank lines or lines starting with # in the macro file? Those are comments, periodt. Otherwise trn hunts for two fields separated by white space. First field = the keystroke sequence that triggers the macro. Second field = the command sequence to execute. Both fields get the % interpolation treatment, which also translates backslash and caret sequences. (The keystroke field is interpreted at startup time, but the command field is interpreted at macro execution time so you can refer to % values in a macro. iykyk.)
For example, if you want to reverse the roles of carriage return and space in trn:
^J \040
^M \040
\040 ^J
will do just that. By default, all characters in the command field are interpreted as the canonical trn characters, i.e. no macro expansion is done. Otherwise the above pair of macros would cause an infinite loop. π To force macro expansion in the command field, enclose the macro call with ^( ... ^) thusly:
@s βͺmysavescript
@w w^(@s^)
You can use the %() conditional construct to construct macros that work differently under different circumstances. In particular, the current mode (%m) of trn could be used to make a command that only works at a particular level. This is particularly vital for the selector which uses most of the lower-case letters to select the associated item in its display. For example,
a %(%m=t?a:s art.hold\n)
will return the original letter (a) in the selector, and the command "s art.hold\n" everywhere else.
%(%{TERM}=vt100?^[[O) /^J
will do the binding only if the terminal type is vt100, though if you have many of these it would be better to have separate files for each terminal.
If you want to bind a macro to a function key that puts a common garbage character after the sequence (such as the carriage return on the end of Televideo 920 function sequences), DO NOT put the carriage return into all the sequences or you will waste a CONSIDERABLE amount of internal storage. Instead of "^AF^M", put "^AF+1", which indicates to trn that it should gobble up one character after the F. π«Ά
π WHAT'S NEW π
Here's a quick run-down of trn's features and commands aimed at the knowledgeable rn or trn user.
The addition of true reference-line threading is one of the biggest improvements over rn. This threading allows you to read a discussion in reply order with an article's replies being attached to the article that inspired them. Threads will encompass multiple subjects whenever a reply to an article in the thread arrives with a different subject. This is usually done to better indicate the topic in the reply when it diverges from the original subject.
Another big improvement is the selector, which is bound to the '+' key. The selector displays a list of threads, subjects, or individual articles to allow you to select the topics that interest you by typing their associated letter. The difference between the thread and the subject selector is that the subject selector displays all subjects with a separate selection letter, even those tied together via their references. This can be quite useful if you select some threads and desire to weed out some extraneous discussions: you could switch the selector into exclusive mode ('E' shows only selected threads) and then into subject mode ('Ss') to separate the threads into their component subjects and deselect or kill the subjects you don't care about. You don't have to go to all this trouble using the selector if you prefer to just hit the 'k' key when you start reading a subject you're not interested in. The selector can also switch between showing unread articles and articles that have already been read, allowing you to selectively re-read discussions (this is the 'U' command in the selector).
Another threaded addition is the article-tree display in the upper-right corner of the header. Looking at the tree gives you a feel for how the articles you are reading relate to each other, allowing you to see at a glance when there are lots of replies and decide if you want to junk an uninteresting set of replies or perhaps tough it out.
The header display has also been modified to hide a few more lines by default (e.g. References), but, as always, you can override these with -h. There is also some more "magic" in the header: the From header can be trimmed to be just the comment portion (if available), and the Date header is displayed in local time (by default). Use -H and +H to turn header magic on and off.
Once you begin reading articles, use the regular movement commands (n, N, p, P, etc.) as you normally would. You'll find that these commands track the reply order shown in the tree display. Then try using ^N and ^P, which follow a subject in the order the articles were posted. Finally, check out the [, ], (, ), {, and } commands to move around in the article tree a bit more directly. The first four commands should also be bound to your keypad's arrow keys, making them easier to type. For example, typing '[' (left) takes you to your parent article, even if it was already read, which is very useful for tracking down the cited portion of the article in its original context.
There are additional kill commands for the entire thread (J) and the current article and all its replies (,).
The KILL files have been extended and the commands inside them are now referred to memorized commands, since they are often used for selection rather than killing of articles. There are new, easier ways to add memorized commands using the 'A'dd and 'T'hread commands. The 'A' command is subject-oriented, while the 'T' command is article-oriented (meaning they affect a specific set of articles rather than any article that happens to have a matching subject). They both prompt you for what kind of command you want to add, making both auto-killing and auto-selecting just as easy.
There is also an easy way to skip around among the various threads with the < and > commands. Use them if you want to skip a set of article and read them later instead of junking them.
Note: your news administrator has the option of turning thread processing off for individual groups, and thus it is possible for some groups to not have any pre-processed thread information available for use. Whentrnencounters such a group, it generates the thread information on the fly while entering the group. For really large groups (or really slow systems), this can take an appreciable amount of time. If you can't talk your news administrator into pre-threading the group, you can turn off the threading on a group-by-group basis using the't'command at the newsgroup-selection level. Groups turned off in this way are read in thernstyle -- articles arranged in arrival order unless you specify the-Soption, which reads the articles in date order by subject.
Take note of the "e dir" command, which is used to extract a shell archive or uuencoded file into the specified directory. It is even possible to extract other data formats if you specify the appropriate filter command (e.g. "e dirβͺcmd").
Also, if you plan to use macro definitions, it is good to keep in mind that the selector uses most of the lower-case letters for selection, and thus it is a good idea to explicitly set the mode(s) in which a macro applies. For example, if you want to press 'f' from the article pager/selector to forward the current article to the user "smith", you could define:
f %(%m=[pa]?βͺmail smith\n:f)
This checks the current mode (%m) and if it is 'p' or 'a' it expands it to the string "βͺmail smith\n", otherwise it returns the letter 'f'. In some cases, you may simply wish to exclude the selector from a macro with the conditional "%m!=t".
Finally, you'll probably want to use the new options, -x and -X to ensure that all the newest features are available for use. These options might be on by default, depending on how your administrator decided to install trn.
π AUTHORS π
Rn was created by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> and is now under the direction of Stan Barber <sob@bcm.tmc.edu>. Threaded version by Wayne Davison <wayne@clari.net> (Mail all bug reports for trn to Wayne.) Regular expression routines are borrowed from emacs, by James Gosling. Hashing routines are modified versions from Geoffrey Collyer.
π FILES π
%./.newsrcβ status of your news reading%./.oldnewsrcβ backup copy of your.newsrcfrom start of session%./.rnlockβ lock file so you don't screw up your.newsrc%./.rnlastβ info from last run oftrn%./.rnsoftβ soft pointers into/usr/lib/news/activeto speed startup, synchronous with.newsrc%./.rnheadβ temporary header file to pass to a mailer or news poster%./.[t]rnmacβ macro and keymap definitions%pβ your news save directory, usually~/News%x/activeβ the list of active newsgroups, usually/usr/lib/news/activeon systems that don't use NNTP%Pβ the public news spool directory, usually/usr/spool/newson systems that don't use NNTP%X/INITβ system-wide default switches
π SEE ALSO π
newsrc(5), more(1), readnews(1), Pnews(1), Rnmail(1)
π©Ί DIAGNOSTICS π©Ί
Generally self-documenting, as they say.
π BUGS π
- The
-hswitch can only hide header lines thattrnknows about. - The
'-'command doesn't cross newsgroup boundaries, and only undoes the last article selection. - If you edit your
.newsrcwhiletrnis running,trnwill happily wipe out your changes when it decides to write out the.newsrcfile. - Marking of duplicate articles as read in cross-referenced newsgroups will not work unless the Xref patch is installed in
inews. - If you get carried away with
%or escape substitutions, you can overflow buffers.
okay bestie, that's the whole page, mwah π β footer vibes: 4.3 Berkeley Distribution, LOCAL, TRN(1). No date listed, so I'm not inventing one, periodt. β¨
π¦ where this page comes from
- debian bookworm: trn4 4.0-test77-16
- debian trixie: trn4 4.0-test77-18
- ubuntu jammy: trn4 4.0-test77-14
- ubuntu noble: trn4 4.0-test77-17build1
- ubuntu questing: trn4 4.0-test77-18
- ubuntu resolute: trn4 4.0-test77-19
- ubuntu stonking: trn4 4.0-test77-19
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms