home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume23
/
trn
/
part02
/
trn.1.2
< prev
Wrap
Text File
|
1991-08-22
|
43KB
|
1,287 lines
.Ip ^G 8
This is a special version of the \*(L'g\*(R' command that is for skipping
articles in a digest.
It is equivalent to setting \*(L"\-g4\*(R" and then executing the command
\*(L"g^Subject:\*(R".
.Ip TAB 8
This is another special version of the \*(L'g\*(R' command that is for
skipping inclusions of older articles.
It is equivalent to setting \*(L"\-g4\*(R" and then executing the command
\*(L"g^[^c]\*(R", where \fIc\fR 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.
.Ip !command 8
Escape to a subshell.
.PP
The following commands skip the rest of the current article, then behave just
as if typed to the \*(L"What next?\*(R" prompt at the end of the article.
See the documentation at the article selection level for these commands.
.Sp
# $ & / = ? c C f F k K T ^K J , m M r R ^R u U v Y ^
.br
p P ^P - < > [ ] { } number
.br
range{,range} command{:command}
.Sp
The following commands also skip to the end of the article, but have the
additional effect of marking the current article as read:
.Sp
n N ^N e s S | w W
.Sp
.Sh "Miscellaneous facts about commands"
An \*(L'n\*(R' typed at either the \*(L"Last newsgroup\*(R" prompt or a
\*(L"Last article\*(R" prompt will cycle back to the top of the newsgroup
or article list, whereas a \*(L'q\*(R' will quit the level.
(Note that \*(L'n\*(R' does not mean \*(L"no\*(R", but rather
\*(L"next\*(R".)
A space will of course do whatever is shown as the
default, which will vary depending on whether
.I trn
thinks you have more articles or newsgroups to read.
.PP
The \*(L'b\*(R' (backup page) command may be repeated until the beginning of
the article is reached.
If
.I trn
is suspended (via a ^Z), then when the job is resumed, a refresh (^L) will
automatically be done (Berkeley-type systems only).
If you type a command such as \*(L'!\*(R' or \*(L's\*(R' which takes you
from the middle of the article to the end, you can always get back into the
middle by typing \*(L'^L\*(R'.
.PP
In multi-character commands such as \*(L'!\*(R', \*(L's\*(R', \*(L'/\*(R',
etc, you can interpolate various run-time values by typing escape and a
character.
To find out what you can interpolate, type escape and \*(L'h\*(R', or check
out the single character % substitutions for environment variables in the
Interpretation and Interpolation section, which are the same.
Additionally, typing a double escape will cause any % substitutions in the
string already typed in to be expanded.
.Sh "The Tree Display"
When reading a threaded newsgroup,
.I trn
displays a character representation of the article tree in the upper right
corner of the header.
For example, consider the following display:
.Sp
.nf
(1)+-(1)--(\fI2\fP)--\fI[2]\fP
|-(1)+-[3]
| \\-[1]
\\-(1)+-[1]--[1]
\\-[1]
.fi
.Sp
This tree represents an initial article that has three direct replies
(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.
When there is only one subject associated with a thread, all the nodes
are marked with the number 1.
When the first subject change arrives, it is 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.
The articles that have already been read are enclosed in ()'s.
Unread 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.
.Sh "Options"
.I Trn
has a nice set of options to allow you to tailor the interaction
to your liking.
(You might like to know that the author swears by
\*(L"\-x6ls \-e \+m \-S -XX -N\*(R".)
These options may be set on the command line, via the RNINIT
environment variable, via a file pointed to by the RNINIT variable, or
from within
.I trn
via the & command.
Options may generally be unset by typing \*(L"+switch\*(R".
Options include:
.TP 5
.B \-a
turns on the alpha-numeric mode of the thread-selector.
This option has no affect unless
.B \-x
is also specified (or is the default on your system).
.TP 5
.B \-c
checks for news without reading news.
If a list of newsgroups is given on the command line, only those newsgroups
will be checked; otherwise all subscribed-to newsgroups are checked.
Whenever the
.B \-c
switch is specified, a non-zero exit status from
.I trn
means that there is unread news in one of the checked newsgroups.
The
.B \-c
switch does not disable the printing of newsgroups with unread news;
this is controlled by the
.B \-s
switch.
(The
.B \-c
switch is not meaningful when given via the & command.)
.TP 5
.B \-C<number>
tells
.I trn
how often to checkpoint the
.IR .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
.I .newsrc
is checkpointed willy-nilly.
.TP 5
.B \-d<directory name>
sets the default save directory to something other than ~/News.
The directory name will be globbed (via csh) if necessary (and if possible).
Articles saved by
.I trn
may be placed in the save directory or in a subdirectory thereof depending
on the command that you give and the state of the environment variables
SAVEDIR and SAVENAME.
Any KILL files (see the K command in the Article Selection section)
also reside in this directory and its subdirectories, by default.
In addition, shell escapes leave you in this directory.
.TP 5
.B \-D<flags>
enables debugging output.
See common.h for flag values.
Warning: normally
.I trn
attempts to restore your
.I .newsrc
when an unexpected signal or internal error occurs.
This is disabled when any debugging flags are set.
.TP 5
.B \-e
causes each page within an article to be started at the top of the screen,
not just the first page.
(It is similar to the
.B \-c
switch of
.IR more (1).)
You never have to read scrolling text with this switch.
This is helpful especially at certain baud rates because you can start reading
the top of the next page without waiting for the whole page to be printed.
It works nicely in conjuction with the
.B \-m
switch, especially if you use half-intensity for your highlight mode.
See also the
.B \-L
switch.
.TP 5
.B \-E<name>=<val>
sets the environment variable <name> to the value specified.
Within
.IR trn ,
\*(L"&\-ESAVENAME=%t\*(R" is similar to \*(L"setenv SAVENAME '%t'\*(R" in
.IR csh ,
or \*(L"SAVENAME='%t'; export SAVENAME\*(R" in
.IR sh .
Any environment variables set with
.B \-E
will be inherited by subprocesses of
.IR trn .
.TP 5
.B \-F<string>
sets the prefix string for the \*(L'F\*(R' followup command to use in
prefixing each line of the quoted article.
For example, \*(L"\-F<tab>\*(R" inserts a tab on the front of each line
(which will cause long lines to wrap around, unfortunately),
\*(L"\-F>>>>\*(R" inserts \*(L">>>>\*(R" on every line, and
\*(L"\-F\*(R" by itself causes nothing to be inserted, in case you want to
reformat the text, for instance.
The initial default prefix is \*(L">\*(R".
.TP 5
.B \-g<line>
tells
.I trn
which line of the screen you want searched-for strings to show up on when
you search with the \*(L'g\*(R' command within an article.
The lines are numbered starting with 1.
The initial default is \*(L"\-g1\*(R", meaning the first line of the screen.
Setting the line to less than 1 or more than the number of lines on the screen
will set it to the last line of the screen.
.TP 5
.B \-h<string>
hides (disables the printing of) all header lines beginning with
.I string.
For instance, \-hexp will disable the printing of the \*(L"Expires:\*(R" line.
Case is insignificant.
If <string> is null, all header lines except Subject are hidden, and you
may then use
.B +h
to select 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.
.TP 5
.B \-H<string>
works just like
.B \-h
except 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 Newsgroups line will only print when there are multiple newsgroups;
the Subject line will be underlined and (when threaded) the
keyword \*(L'Subject:\*(R' is replaced by its subject number (e.g. [1]);
the Expires line will always be suppressed if there is nothing on it;
the name line is shortened to just the comment portion (the part
within parenthesis) if available; the date line is displayed in local
time if the group is threaded.
In fact, all of these actions are the default, and you must use
.B +H
to undo them.
.TP 5
.B \-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
.B \(bsh
switch.)
.TP 5
.B \-l
disables the clearing of the screen at the beginning of each
article, in case you have a bizarre terminal.
.TP 5
.B \-L
tells
.I 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.
(The
.IR more (1)
program does this.)
This feature works only if you have the requisite termcap
capabilities.
The switch has no effect unless the
.B \-e
switch is set.
.TP 5
.B \-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
.B \-e
switch, in which case the page is erased, and the first line (which is
the last line of the previous page) is highlighted.
If
.B \-m=s
is specified, the standout mode will be used, but if
.B \-m=u
is specified, underlining will be used.
If neither
.B =s
or
.B =u
is specified, standout is the default.
Use
.B +m
to disable highlighting.
.TP 5
.B \-M
forces mailbox format in creating new save files.
Ordinarily you are asked which format you want.
.TP 5
.B \-N
forces normal (non-mailbox) format in creating new save files.
Ordinarily you are asked which format you want.
.TP 5
.B \-q
bypasses the automatic check for new newsgroups when starting
.I trn.
.TP 5
.B \-r
causes
.I trn
to restart in the last newsgroup read during a previous session with
.I trn.
It is equivalent to starting up normally and then getting to the newsgroup
with a g command.
.TP 5
.B \-s
with no argument suppresses the initial listing of newsgroups with unread
news, whether
.B \-c
is specified or not.
Thus
.B \-c
and
.B \-s
can be used together to test \*(L"silently\*(R" the status of news from
within your
.I .login
file.
If
.B \-s
is followed by a number, the initial listing is suppressed after that many
lines have been listed.
Presuming that you have your
.I .newsrc
sorted into order of interest,
.B \-s5
will tell you the 5 most interesting newsgroups that have unread news.
This is also a nice feature to use in your
.I .login
file, 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
.B \-s
switch is given
.B \-s5
is assumed, so just putting \*(L"rn \-c\*(R"
into your
\&.login file is fine.
.TP 5
.B \-S<number>
causes
.I trn
to enter subject search mode (^N) automatically whenever an unthreaded
newsgroup is
started up with <number> unread articles or more.
Additionally, it causes any \*(L'n\*(R' typed while in subject search mode
to be interpreted as \*(L'^N\*(R' instead.
(To get back out of subject search mode, the best command is probably
\&\*(L'^\*(R'.)
If <number> is omitted, 3 is assumed.
.TP 5
.B \-t
puts
.I trn
into terse mode.
This is more cryptic but useful for low baud rates.
(Note that your system administrator may have compiled
.I 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.
.TP 5
.B \-T
allows you to type ahead of rn.
Ordinarily rn 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.
.TP 5
.B \-v
sets verification mode for commands.
When set, the command being executed is displayed to give some feedback that
the key has actually been typed.
Useful when the system is heavily loaded and you give a command that takes
a while to start up.
.TP 5
.B \-x<number><list>
Enable the extended (threaded) features of
.I trn
beyond the traditional
.I rn
compatibility mode.
(This may be the default on your system, use +x if you yearn for the good
ol' days.)
The <number> is the maximum number of article-tree lines (from 0 to 11)
you want displayed in your header.
Use the <list> to choose which thread selector modes you like (s \- short,
m \- medium, or l \- long), and in what order they are selected with the
\&\*(L'L\*(R' command.
For example, use
.B \-xls
to start with the long 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
.B \-x6lsm
is assumed.
.TP 5
.B \-X<number><commands>
If you like using the thread selector, you'll probably want to use this
option to make the thread selector command (+) the default when a newsgroup
is started up with at least <number> unread articles.
(Your installer may have chosen to make -X1 the default on your system.)
It is also used to select which commands you want to be the defaults while
using the thread selector.
For example,
.B \-X2XD
will 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 the
.B X
command and the default command for all other pages to be the
.B D
command.
Either or both parameters can be omitted, as well as the second default
command (e.g.
.B \-XX
would change the default newsgroup entry to use the selector and the default
command for the last page of the selector to be \*(L'X\*(R').
The default is
.B \-X1Z>
if just
.B \-X
is specified.
To set the default selector commands without affecting the default entry
into a newsgroup, specify a high number, like 9999.
.TP 5
.B \-/
sets SAVEDIR to \*(L"%p/%c\*(R" and SAVENAME to \*(L"%a\*(R", 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.
.B +/
sets SAVEDIR to \*(L"%p\*(R" and SAVENAME to \*(L"%^C\*(R", 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
.B +/
or
.B \-/
may be default on your system, depending on the feelings of your news
administrator when he, she or it installed
.IR trn .)
You may, of course, explicitly set SAVEDIR and SAVENAME to other values\*(--see
discussion in the environment section.
.PP
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.
.PP
Similarly, switches may be selected based on terminal type:
.Sp
\-=vt100+T set +T on vt100
.br
\-=tvi920\-ETERM=mytvi get a special termcap entry
.br
\-=tvi920\-ERNMACRO=%./.rnmac.tvi
.br
set up special keymappings
.br
+=paper\-v set verify mode if not hardcopy
.PP
Some switch arguments, such as environment variable values, may require
spaces in them.
Such spaces should be quoted via ", ', or \e in the conventional fashion,
even when passed via RNINIT or the & command.
.Sh "Regular Expressions"
The patterns used in article searching are regular expressions such as
those used by
.IR ed (1).
In addition, \ew matches an alphanumeric character and \eW a nonalphanumeric.
Word boundaries may be matched by \eb, and non-boundaries by \eB.
The bracketing construct \e(\ ...\ \e) may also be used, and \edigit matches
the digit'th substring, where digit can range from 1 to 9.
\e0 matches whatever the last bracket match matched.
Up to 10 alternatives may given in a pattern, separated by \e|, with the
caveat that \e(\ ...\ \e|\ ...\ \e) is illegal.
.Sh "Interpretation and Interpolation"
Many of the strings that
.I trn
handles are subject to interpretations of several types.
Under filename expansion, an initial \*(L"~/\*(R" is translated to the name
of your home directory, and \*(L"~name\*(R" is translated to the login
directory for the user specified.
Filename expansion will also expand an initial environment variable, and
also does the backslash, uparrow and percent expansion mentioned below.
.PP
All interpreted strings go through backslash, uparrow and percent
interpretation.
The backslash escapes are the normal ones (such as \en, \et, \ennn, etc.).
The uparrow escapes indicate control codes in the normal fashion.
Backslashes or uparrows to be passed through should be escaped with 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:
.Ip %a 8
Current article number.
.Ip %A 8
Full name of current article (%P/%c/%a).
(On a Eunice system with the LINKART option, %P/%c/%a returns the name of
the article in the current newsgroup, while %A returns the real name of
the article, which may be different if the current article was posted to
multiple newsgroups.)
.Ip %b 8
Destination of last save command, often a mailbox.
.Ip %B 8
The byte offset to the beginning of the part of the article to be saved,
set by the save command.
The \*(L's\*(R' and \*(L'S\*(R' commands set it to 0, and the \*(L'w\*(R'
and \*(L'W\*(R' commands set it to the byte offset of the body of the article.
.Ip %c 8
Current newsgroup, directory form.
.Ip %C 8
Current newsgroup, dot form.
.Ip %d 8
Full name of newsgroup directory (%P/%c).
.Ip %D 8
\*(L"Distribution:\*(R" line from the current article.
.Ip %e 8
The last command executed to extract data from an article.
.Ip %E 8
The number of extra (unselected) articles, not counting the current article
if it is unselected.
.Ip %f 8
\*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
line if there is one.
This differs from %t in that comments (such as the full name) are not
stripped out with %f.
.Ip %F 8
\*(L"Newsgroups:\*(R" line for a new article, constructed from
\*(L"Newsgroups:\*(R" and \*(L"Followup-To:\*(R" lines of current article.
.Ip %h 8
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 the MAILHEADER and NEWSHEADER
environment variables.
.Ip %H 8
Host name (your machine's name).
.Ip %i 8
\*(L"Message-I.D.:\*(R" line from the current article, with <> guaranteed.
.Ip %I 8
The reference indication mark (see the
.B \-F
switch.)
.Ip %l 8
The news administrator's login name, if any.
.Ip %L 8
Login name (yours).
.Ip %m 8
The current mode of
.I trn,
for use in conditional macros.
.Sp
.nf
i Initializing.
n Newsgroup selection level.
t Thread selection level.
a Article selection level (What next?).
p Pager level (MORE prompt).
u Set unread? prompt.
A Add this newsgroup?
C Catchup confirmation.
D Delete bogus newsgroups?
M Use mailbox format?
R Resubscribe to this newsgroup?
.fi
.Sp
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:
.Sp
.nf
\e040 %(%m=[A-Z]?h: )
.fi
.Ip %M 8
The number of articles marked to return via the \*(L'M\*(R' command.
If the same article is Marked multiple times, \*(L"%M\*(R" counts it
multiple times in the current implementation.
.Ip %n 8
\*(L"Newsgroups:\*(R" line from the current article.
.Ip %N 8
Full name (yours).
.Ip %o 8
Organization (yours).
.Ip %O 8
Original working directory (where you ran rn from).
.Ip %p 8
Your private news directory, normally ~/News.
.Ip %P 8
Public news spool directory, normally /usr/spool/news on systems that don't use NNTP.
.Ip %r 8
Last reference on references line of current article (parent article id).
.Ip %R 8
References list for a new article, constructed from the references and article
ID of the current article.
.Ip %s 8
Subject, with all Re's and (nf)'s stripped off.
.Ip %S 8
Subject, with one \*(L"Re:\*(R" stripped off.
.Ip %t 8
\*(L"To:\*(R" line derived from the \*(L"From:\*(R" and \*(L"Reply-To:\*(R"
lines of the current article.
This always returns an Internet format address.
.Ip %T 8
\*(L"To:\*(R" line derived from the \*(L"Path:\*(R" line of the
current article to produce a uucp path.
.Ip %u 8
The number of unread articles in the current newsgroup.
.Ip %U 8
The number of unread articles in the current newsgroup, not counting the
the current article.
When threads are selected, this count reflects only selected articles.
.Ip %x 8
The news library directory.
.Ip %X 8
The rn library directory.
.Ip %z 8
The length of the current article in bytes.
.Ip %Z 8
The number of selected threads.
.Ip %~ 8
Your home directory.
.Ip %. 8
The directory containing your dot files, which is your home directory unless
the environment variable DOTDIR is defined when rn is invoked.
.Ip %# 8
A counter incremented during multiple-article commands.
Prior to executing any such commands, it will return 0.
During a multi-article command, it returns the current count starting from 1.
Afterward, it retains its final value.
For example, the command
.Sp
1003-1008 s my.%#
.Sp
would save articles 1003 through 1008 in the files my.1 through my.6.
.Ip %$ 8
Current process number.
.Ip %/ 8
Last search string.
.Ip %% 8
A percent sign.
.Ip "%{name} or %{name\-default}" 8
The environment variable \*(L"name\*(R".
.Ip %[name] 8
The value of header line \*(L"Name:\*(R" from the current article.
The \*(L"Name:\ \*(R" is not included.
For example \*(L"%D\*(R" and \*(L"%[distribution]\*(R" are equivalent.
The name must be spelled out in full.
.Ip %`command` 8
Inserts the output of the command, with any embedded newlines translated
to space.
.Ip %""prompt"" 8
Prints prompt on the terminal, then inputs one string, and inserts it.
.Ip "%(test_text=pattern?then_text:else_text)" 8
If
.I test_text
matches
.IR pattern ,
has the value
.IR then_text ,
otherwise
.IR else_text .
The \*(L":else_text\*(R" is optional, and if absent, interpolates the null string.
The = may be replaced with != to negate the test.
To quote any of the metacharacters
(\*(L'=\*(R', \*(L'?\*(R', \*(L':\*(R', or \*(L')\*(R'),
precede with a backslash.
.Ip %digit 8
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\*(--%0 will give you the last bracket matched.
.PP
Modifiers: to capitalize the first letter, insert \*(L'^\*(R':
\*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
Inserting \*(L'_\*(R' causes the first letter following the last
\&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
.SH ENVIRONMENT
The following environment variables are paid attention to by
.IR trn .
In general the default values assumed for these variables by
.I trn
are reasonable, so if you are using
.I trn
for the first time, you can safely ignore this section.
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.
.PP
Those variables marked (%) are subject to % interpolation, and those marked
(~) are subject to both % interpolation and ~ interpretation.
.Ip "ATTRIBUTION (%)" 8
Gives the format of the attribution line in front of the quoted article
included by an F command.
.Sp
Default: In article %i %f writes:
.Ip "CANCEL (~)" 8
The shell command used to cancel an article.
.Sp
Default: inews \-h < %h
.Ip "CANCELHEADER (%)" 8 13v
The format of the file to pass to the CANCEL command in order to cancel
an article.
.Sp
Default:
.br
Newsgroups: %n
.br
Subject: cmsg cancel %i
.br
References: %R
.br
Reply-To: %L@%H (%N)
.br
Distribution: %D
.br
Organization: %o
.sp 1
%i cancelled from rn.
.Ip DOTDIR 8
Where to find your dot files, if they aren't in your home directory.
Can be interpolated using \*(L"%.\*(R".
.Sp
Default: $HOME
.Ip "EDITOR (~)" 8
The name of your editor, if VISUAL is undefined.
.Sp
Default: whatever your news administrator compiled in, usually vi.
.Ip "EXSAVER (%)" 8
The shell command to execute in order to extract data to either /bin/sh
or a user-specified command.
.Sp
Default: tail +%Bc %A | %e
.Ip "FIRSTLINE (%)" 8
Controls the format of the line displayed at the top of an article.
Warning: this may go away.
.Sp
The default in an unthreaded group is approximately:
.Sp
Article %a %(%U%M!=^00$?(%U more%(%M!=^0$? + %M Marked to return)\e) )in %C:
.Sp
While the default in a threaded group is almost:
.Sp
%C #%a%(%Z=^0$?%(%U!=^0$? (%U more\e)): (%U + %E more\e))
.Ip HIDELINE 8
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 \*(L"^>...\*(R", which \fIdoesn't\fR
hide lines with only \*(L'>\*(R', to give some indication that quoted
material is being skipped.
If you want to hide more than one pattern, you can use \*(L"\||\|\*(R" to
separate the alternatives.
You can view the hidden lines by restarting the article with the \*(L'v\*(R'
command.
.Sp
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.
.Sp
Default: undefined
.Ip HOME 8
Your home directory.
Affects ~ interpretation, and the location of your
dot files if DOTDIR is not defined.
.Sp
Default: $LOGDIR
.Ip "KILLGLOBAL (~)" 8
Where to find the KILL file to apply to every newsgroup.
See the \*(L'^K\*(R' command at the newsgroup selection level.
.Sp
Default: %p/KILL
.Ip "KILLLOCAL (~)" 8
Where to find the KILL file for the current newsgroup.
See the commands \*(L'K\*(R' and \*(L'^K\*(R' at the article selection level,
and the search modifier \*(L'K\*(R'.
.Sp
Default: %p/%c/KILL
.Ip LOGDIR 8
Your home directory if HOME is undefined.
Affects ~ interpretation, and the location of your
dot files if DOTDIR is not defined.
.Sp
Default: none.
.Sp
Explanation: you must have either $HOME or $LOGDIR.
.Ip LOGNAME 8
Your login name, if USER is undefined.
May be interpolated using \*(L"%L\*(R".
.Sp
Default: value of getlogin().
.Ip "MAILCALL (~)" 8
What to say when there is new mail.
.Sp
Default: (Mail)
.Ip "MAILFILE (~)" 8
Where to check for mail.
.Sp
Default: /usr/spool/mail/%L
.Ip "MAILHEADER (%)" 8
The format of the header file for replies.
See also MAILPOSTER.
.Sp
Default:
.Sp
To: %T
.br
Subject: %(%i=^$?:Re: %S
.br
Newsgroups: %n
.br
In-Reply-To: %i)
.br
%(%[references]!=^$?References\\: %[references]
.br
)Organization: %o
.br
Cc:
.br
Bcc: \en\en
.Ip "MAILPOSTER (~)" 8
The shell command to be used by the reply commands (r and R)
in order to allow you to enter and deliver the response.
.I trn
will not itself call upon an editor for replies\*(--this
is a function of the program called by
.IR trn .
See also MAILHEADER.
.Sp
Default: Rnmail \-h %h
.Ip "MBOXSAVER (~)" 8
The shell command to save an article in mailbox format.
.Sp
Default: %X/mbox.saver %A %P %c %a %B %C "%b" \e
.br
"From: %T %`date`"
.Sp
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.
.Ip MODSTRING 8
The string to insert in the group summary line, which heads each article,
for a moderated group. See also NOPOSTRING.
.Sp
Default: " (moderated)"
.Ip NAME 8
Your full name.
May be interpolated using \*(L"%N\*(R".
.Sp
Default: name from /etc/passwd, or ~/.fullname.
.Ip "NEWSHEADER (%)" 8 16v
The format of the header file for followups.
See also NEWSPOSTER.
.Sp
Default:
.Sp
Newsgroups: %(%F=^$?%C:%F)
.br
Subject: %(%S=^$?%"\en\enSubject: ":Re: %S)
.br
Summary:
.br
Expires:
.br
%(%R=^$?:References: %R
.br
)Sender:
.br
Reply-To: %L@%H (%N)
.br
Followup-To:
.br
Distribution: %(%i=^$?%"\enDistribution: ":%D)
.br
Organization: %o
.br
Keywords: \en\en
.Ip "NEWSPOSTER (~)" 8
The shell command to be used by the followup commands (f and F)
in order to allow you to enter and post a followup news article.
.I trn
will not itself call upon an editor for followups\*(--this
is a function of the program called by
.IR trn .
See also NEWSHEADER.
.Sp
Default: Pnews \-h %h
.Ip NEWSRC 8
Your newsgroup subscription list.
.Sp
Default: $HOME/.newsrc
.Ip NNTPSERVER 8
The hostname of your NNTPSERVER. [This does not apply unless you are running
the NNTP version of rn.]
.Sp
Default: the hostname listed in the server file, usually
/usr/local/lib/rn/server.
.Ip NOPOSTRING 8
The string to insert in the group summary line, which heads each article,
for a group to which local posting is not allowed. See also MODSTRING.
.Sp
Default: " (no posting)"
.Ip "NORMSAVER (~)" 8
The shell command to save an article in the normal (non-mailbox) format.
.Sp
Default: %X/norm.saver %A %P %c %a %B %C "%b"
.Ip ORGANIZATION 8
Either the name of your organization, or the name of a file containing the
name of your organization.
May be interpolated using \*(L"%o\*(R".
.Sp
Default: whatever your news administrator compiled in.
.Ip PAGESTOP 8
If defined, contains a regular expression which 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 \*(L"^--------\*(R".
To force a page break before a signature, you could define it
as \*(L"^-- $\*(R".
(Then, when you see \*(L"--\*(R" at the bottom of the page, you can skip
the signature if you so desire by typing \*(L'n\*(R' instead of space.)
To do both, you could use \*(L"^--\*(R".
If you want to break on more than one pattern, you can use \*(L"\||\|\*(R" to
separate the alternatives.
.Sp
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.
.Sp
Default: undefined
.Ip "PIPESAVER (%)" 8
The shell command to execute in order to accomplish a save to a pipe
(\*(L"s\ |\ command\*(R" or \*(L"w\ |\ command\*(R").
The command typed by the user is substituted in as %b.
.Sp
Default: %(%B=^0$?<%A:tail +%Bc %A |) %b
.Sp
Explanation: if %B is 0, the command is \*(L"<%A %b\*(R", otherwise
the command is \*(L"tail +%Bc %A | %b\*(R".
.Ip RNINIT 8
Default values for switches may be passed to
.I trn
by placing them in RNINIT.
Any switch that is set in RNINIT may be overruled
on the command line, or via the \*(L'&\*(R' command from within
.IR trn .
Binary-valued switches that are set with \*(L"\-switch\*(R" may be unset
using \*(L"+switch\*(R".
.Sp
If RNINIT begins with a \*(L'/\*(R' it is assumed to be the name of a file
containing switches.
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
.B \-E
switch to set the environment variables upon startup.
.Sp
Default: \*(L" \*(R".
.Ip "RNMACRO (~)" 8
The name of the file containing macros and key mappings.
See the MACROS section.
.Sp
Default: %./.rnmac
.Ip "SAVEDIR (~)" 8
The name of the directory to save to, if the save command does not specify
a directory name.
.Sp
Default:
.br
If
.B \-/
is set: %p/%c
.br
If
.B +/
is set: %p
.Ip "SAVENAME (%)" 8
The name of the file to save to, if the save command contains only a
directory name.
.Sp
Default:
.br
If
.B \-/
is set: %a
.br
If
.B +/
is set: %^C
.Ip "SELECTCHARS" 8
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.
.br
Default: abcdefgijlorstuvwxz1234567890
that can be typed
.Ip SHELL 8
The name of your preferred shell.
It will be used by the \*(L'!\*(R', \*(L'S\*(R' and \*(L'W\*(R' commands.
.Sp
Default: whatever your news administrator compiled in.
.Ip "SUBJLINE (%)" 8
Controls the format of the lines displayed by the \*(L'=\*(R' command at
the article selection level.
.Sp
Default: %s
.Ip TERM 8
Determines which termcap entry to use, unless TERMCAP contains the entry.
.Ip TERMCAP 8
Holds either the name of your termcap file, or a termcap entry.
.Sp
Default: /etc/termcap, normally.
.Ip "UNSHAR (~)" 8
The shell command to execute in order to accomplish the unshar'ing of a
shell archive.
.Sp
Default: /bin/sh
.Ip USER 8
Your login name.
May be interpolated using \*(L"%L\*(R".
.Sp
Default: $LOGNAME
.Ip "VISUAL (~)" 8
The name of your editor.
.Sp
Default: $EDITOR
.Ip "YOUSAID (%)" 8
Gives the format of the attribution line in front of the quoted article
included by an R command.
.Sp
Default: In article %i you write:
.SH MACROS
When
.I trn
starts up, it looks for a file containing macro definitions (see environment
variable RNMACRO).
Any sequence of commands may be bound to any sequence of keys, so you
could remap your entire keyboard if you desire.
Blank lines or lines beginning with # in the macro file are considered
comments; otherwise
.I trn
looks for two fields separated by white space.
The first field gives the sequence of keystrokes that trigger the macro,
and the second field gives the sequence of commands to execute.
Both fields are subject to % interpolation, which will also translate
backslash and uparrow sequences.
(The keystroke field is interpreted at startup time, but the command field
is interpreted at macro execution time so that you may refer to % values
in a macro.)
For example, if you want to reverse the roles of carriage return and
space in
.I trn
.Sp
^J \e040
.br
^M \e040
.br
\e040 ^J
.Sp
will do just that.
By default, all characters in the command field are interpreted as the
canonical
.I 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:
.Sp
@s |mysavescript
.br
@w w^(@s^)
.Sp
You can use the %() conditional construct to construct macros that work
differently under different circumstances.
In particular, the current mode (%m) of
.I trn
could be used to make a command that only works at a particular level.
This is particularly vital for the thread selector, which uses most of
the lower-case letters to select the associated thread of discussion.
For example,
.Sp
a %(%m=t?a:s art.hold\en)
.Sp
will return the original letter (a) in the thread selector, and the command
\*(L"s art.hold\en\*(R" everywhere else.
.Sp
%(%{TERM}=vt100?^[[O) /^J
.Sp
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.
.Sp
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 \*(L"^AF^M\*(R", put \*(L"^AF+1\*(R", which indicates to
.I trn
that it should gobble up one character after the F.
.SH "WHAT'S NEW?"
Here's a quick run-down of
.IR trn 's
new features and commands aimed at the knowledgeable
.I rn
user.
.Sp
One of the biggest improvements is the Thread Selector, which is bound
to the \*(L'+\*(R' key.
The selector displays a list of subject threads and (by default) authors
to allow you to select the topics that interest you by typing their
associated letter.
The thread selector can also be used to browse articles that have already
been read, to selectively re-read discussions (use the \*(L'U\*(R' command).
.Sp
Another big improvement is the thread-ordered display of articles.
While reading each topic,
.I trn
displays each article and its replies in the order of their parent/child
relationship.
This lets you follow the flow of the discussion better, instead of jumping
around from idea to idea or even reading a reply before the original article.
.Sp
Along this same line is the addition of the article-tree display in the
upper-right corner of the header.
Glancing at the tree gives you a better feel for how the articles you are
reading relate to each other.
.Sp
The header has also been modified to hide a few more header-lines by default
(e.g. References), but, as always, you can override these with \-h.
There is also some new \*(L"magic\*(R" in the header: the From header is
trimmed to be just the comment portion (if available), and the Date header
is displayed in local time (in threaded groups).
Override these defaults with +H.
.Sp
Once you begin reading articles, use the regular movement commands (n, N,
p, P, etc.) as you normally would.
Then, check out the [, ], {, and } commands to move around in the article
tree a bit more directly.
For example, the \*(L'[\*(R' command takes you to your parent article,
even if it was already read, whichp is very useful for tracking down the
cited portion of the article in its original context.
.Sp
There are additional kill commands for the entire thread (J) and the
current article and all its replies (,).
The KILL files have been extended to allow killing by thread (T), which will
kill a topic even if people fine-tune the subject along the way.
.Sp
There is also an easy way to skip around in the various threads with
the < and > commands.
.Sp
There is a new command, \*(L"e dir\*(R", that extracts 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. \*(L"e dir|cmd\*(R".
.Sp
Also, if you plan to use macro definitions, it is good to keep in mind
that the thread selector uses most of the lower-case letters for thread
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 \*(L"smith\*(R", you could define:
.Sp
.nf
f %(%m=[pa]?|mail smith\en:f)
.fi
.Sp
This checks the current mode (%m) and if it is \*(L'p\*(R' or \*(L'a\*(R'
it expands it to the string \*(L"|mail smith\en\*(R", otherwise it returns
the letter \*(L'f\*(R'.
In some cases, you may simply wish to exclude the thread selector from a
macro with the conditional \*(L"%m!=t\*(R".
.Sp
Finally, you'll probably want to use the new options,
.B \-x
and
.B \-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
.IR trn .
.SH AUTHORS
Rn was created by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
.br
and is now under the direction of Stan Barber <sob@bcm.tmc.edu>.
.br
Threaded version by Wayne Davison <davison@borland.com>
.br
(Mail all bug reports for trn to Wayne.)
.br
Regular expression routines are borrowed from emacs, by James Gosling.
.SH FILES
.Ip "%./.newsrc" 1.25i
status of your news reading
.Ip "%./.oldnewsrc" 1.25i
backup copy of your
.I .newsrc
from start of session
.Ip "%./.rnlock" 1.25i
lock file so you don't screw up your
.I .newsrc
.Ip "%./.rnlast" 1.25i
info from last run of rn
.Ip "%./.rnsoft" 1.25i
soft pointers into /usr/lib/news/active to speed startup, synchronous with
.I .newsrc
.Ip "%./.rnhead" 1.25i
temporary header file to pass to a mailer or news poster
.Ip "%./.rnmac" 1.25i
macro and keymap definitions
.Ip "%p" 1.25i
your news save directory, usually ~/News
.Ip "%x/active" 1.25i
the list of active newsgroups, usually /usr/lib/news/active on systems that don't use NNTP
.Ip "%X/active2" 1.25i
the list of active newsgroups when running in threaded mode.
.Ip "%P" 1.25i
the public news spool directory, usually /usr/spool/news on systems that don't use NNTP
.Ip "%X/INIT" 1.25i
system-wide default switches
.SH SEE ALSO
newsrc(5), more(1), readnews(1), Pnews(1), Rnmail(1)
.SH DIAGNOSTICS
Generally self-documenting, as they say.
.SH BUGS
The
.B \-h
switch can only hide header lines that
.I trn
knows about.
.PP
The \*(L'\-\*(R' command doesn't cross newsgroup boundaries, and only undoes
the last article selection.
.PP
If you edit your
.I .newsrc
while
.I trn
is running,
.I trn
will happily wipe out your changes when it decides to
write out the
.I .newsrc
file.
.PP
Marking of duplicate articles as read in cross-referenced newsgroups will
not work unless the Xref patch is installed in inews.
.PP
If you get carried away with % or escape substitutions, you can overflow
buffers.
.PP
There should be no fixed limit on the number of newsgroups.
.PP
Some of the more esoteric features may be missing on machines with limited
address space.