BSD 4_3 development
[unix-history] / usr / contrib / rn / rn.1
CommitLineData
1cd0e254
C
1''' $Header: rn.1,v 4.3.1.5 85/09/10 11:05:55 lwall Exp $
2'''
3''' $Log: rn.1,v $
4''' Revision 4.3.1.5 85/09/10 11:05:55 lwall
5''' Improved %m in in_char().
6'''
7''' Revision 4.3.1.4 85/07/23 18:26:40 lwall
8''' Added MAILCALL.
9'''
10''' Revision 4.3.1.3 85/05/23 17:14:14 lwall
11''' Now allows 'r' and 'f' on null articles.
12'''
13''' Revision 4.3.1.2 85/05/13 09:27:53 lwall
14''' Added CUSTOMLINES option.
15'''
16''' Revision 4.3.1.1 85/05/10 11:38:22 lwall
17''' Branch for patches.
18'''
19''' Revision 4.3 85/05/01 11:48:26 lwall
20''' Baseline for release with 4.3bsd.
21'''
22'''
23.de Sh
24.br
25.ne 5
26.PP
27\fB\\$1\fR
28.PP
29..
30.de Sp
31.if t .sp .5v
32.if n .sp
33..
34.de Ip
35.br
36.ie \\n.$>=3 .ne \\$3
37.el .ne 3
38.IP "\\$1" \\$2
39..
40'''
41''' Set up \*(-- to give an unbreakable dash;
42''' string Tr holds user defined translation string.
43''' Bell System Logo is used as a dummy character.
44'''
45.tr \(bs-|\(bv\*(Tr
46.ie n \{\
47.ds -- \(bs-
48.if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
49.if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
50.ds L" ""
51.ds R" ""
52.ds L' '
53.ds R' '
54'br\}
55.el\{\
56.ds -- \(em\|
57.tr \*(Tr
58.ds L" ``
59.ds R" ''
60.ds L' `
61.ds R' '
62'br\}
63.TH RN 1 LOCAL
64.SH NAME
65rn - new read news program
66.SH SYNOPSIS
67.B rn [options] [newsgroups]
68.SH DESCRIPTION
69.I Rn
70is a replacement for the readnews(1) program that was written to be as
71efficient as possible, particularly in human interaction.
72.I Rn
73attempts to minimize the amount of \*(L"dead\*(R" time spent reading
74news\*(--it tries to get things done while the user is reading or deciding
75whether to read, and attempts to get useful information onto the screen as
76soon as possible, highlighting spots that the eye makes frequent reference
77to, like subjects and previously read lines.
78Whether or not it's faster, it SEEMS faster.
79.PP
80If no newsgroups are specified, all the newsgroups which have unread news
81are displayed, and then the user is asked for each one whether he wants to
82read it, in the order in which the newsgroups occur in the
83.I .newsrc
84file.
85With a list of newsgroups,
86.I rn
87will start up in \*(L"add\*(R" mode, using the list as a set of patterns to
88add new newsgroups and restrict which newsgroups are displayed.
89See the discussion of the \*(L'a\*(R' command on the newsgroup selection
90level.
91.PP
92.I Rn
93operates on three levels: the newsgroup selection level, the article
94selection level, and the paging level.
95Each level has its own set of commands, and its own help menu.
96At the paging level (the bottom level),
97.I rn
98behaves much like the
99.IR more (1)
100program.
101At the article selection level, you may specify which article you want
102next, or read them in the default order, which is either in order of
103arrival on your system, or by subject threads.
104At the newsgroup selection level (the top level), you may specify which
105newsgroup you want next, or read them in the default order, which is the
106order that the newsgroups occur in your
107.I .newsrc
108file.
109(You will therefore want to rearrange your
110.I .newsrc
111file to put the most interesting newsgroups first.
112This can be done with the \*(L'm\*(R' command on the Newsgroup Selection level.
113WARNING: invoking readnews/vnews (the old user interface) in any way (including
114as a news checker in your login sequence!) will cause your
115.I .newsrc
116to be disarranged again.)
117.PP
118On any level, at ANY prompt, an \*(L'h\*(R' may be typed for a list of
119available commands.
120This is probably the most important command to remember, so don't you
121forget it.
122Typing space to any question means to do the normal thing.
123You will know what that is because
124every prompt has a list of several plausible commands enclosed in
125square brackets.
126The first command in the list is the one which will be done if you type
127a space.
128(All input is done in cbreak mode, so carriage returns should not be typed
129to terminate anything except certain multi-character commands.
130Those commands will be obvious in the discussion below because they take an
131argument.)
132.PP
133Upon startup,
134.I rn
135will do several things:
136.Ip 1. 4
137It will look for your
138.I .newsrc
139file, which is your list of subscribed-to
140newsgroups.
141If
142.I rn
143doesn't find a
144.IR .newsrc ,
145it will create one.
146If it does find one, it will back it up under the name \*(L".oldnewsrc\*(R".
147.Ip 2. 4
148It will input your
149.I .newsrc
150file, listing out the first several newsgroups
151with unread news.
152.Ip 3. 4
153It will perform certain consistency checks on your
154.IR .newsrc .
155If your
156.I .newsrc
157is out of date in any of several ways,
158.I rn
159will warn you and patch it up for you, but you may have to wait a little
160longer for it to start up.
161.Ip 4. 4
162.I Rn
163will next check to see if any new newsgroups have been created, and give
164you the opportunity to add them to your
165.IR .newsrc .
166.Ip 5. 4
167.I Rn
168goes into the top prompt level\*(--the newsgroup selection level.
169.Sh "Newsgroup Selection Level"
170In this section the words \*(L"next\*(R" and \*(L"previous\*(R" refer to
171the ordering of the newsgroups in your
172.I .newsrc
173file.
174On the newsgroup selection level, the prompt looks like this:
175.Sp
176******** 17 unread articles in net.blurfl\*(--read now? [ynq]
177.Sp
178and the following commands may be given at this level:
179.Ip y,SP 8
180Do this newsgroup now.
181.Ip .command 8
182Do this newsgroup now, but execute
183.I command
184before displaying anything.
185The command will be interpreted as if given on the article selection level.
186.Ip = 8
187Do this newsgroup now, but list subjects before displaying articles.
188.Ip n 8
189Go to the next newsgroup with unread news.
190.Ip N 8
191Go to the next newsgroup.
192.Ip p 8
193Go to the previous newsgroup with unread news.
194If there is none, stay at the current newsgroup.
195.Ip P 8
196Go to the previous newsgroup.
197.Ip \- 8
198Go to the previously displayed newsgroup (regardless of whether it is
199before or after the current one in the list).
200.Ip 1 8
201Go to the first newsgroup.
202.Ip ^ 8
203Go to the first newsgroup with unread news.
204.Ip $ 8
205Go to the end of the newsgroups list.
206.Ip "g newsgroup" 8
207Go to
208.IR newsgroup .
209If it isn't currently subscribed to, you will be asked if you want to
210subscribe.
211.Ip "/pattern" 8
212Scan forward for a newsgroup matching
213.IR pattern .
214Patterns do globbing like filenames, i.e., use ? to match a single
215character, * to match any sequence of characters, and [] to specify a list
216of characters to match.
217(\*(L"all\*(R" may be used as a synonym for \*(L"*\*(R".)
218Unlike normal filename globbing, newsgroup searching is not anchored to
219the front and back of the filename, i.e. \*(L"/jok\*(R" will find
220net.jokes.
221You may use ^ or $ to anchor the front or back of the search:
222\*(L"/^test$\*(R" will find newsgroup test and nothing else
223If you want to include newsgroups with 0 unread articles, append /r.
224If the newsgroup is not found between the current newsgroup and the last
225newsgroup, the search will wrap around to the beginning.
226.Ip "?pattern" 8
227Same as /, but search backwards.
228.Ip u 8
229Unsubscribe from current newsgroup.
230.Ip "l string" 8
231List newsgroups not subscribed to which contain the string specified.
232.Ip L 8 13v
233Lists the current state of the
234.IR .newsrc ,
235along with status information.
236.Sp
237.nf
238 \h'|0.5i'Status \h'|2i'Meaning
239 \h'|0.5i'<number> \h'|2i'Count of unread articles in newsgroup.
240 \h'|0.5i'READ \h'|2i'No unread articles in newsgroup.
241 \h'|0.5i'UNSUB \h'|2i'Unsubscribed newsgroup.
242 \h'|0.5i'BOGUS \h'|2i'Bogus newsgroup.
243 \h'|0.5i'JUNK \h'|2i'Ignored line in .newsrc
244\h'|2i'(e.g. readnews \*(L"options\*(R" line).
245.fi
246.Sp
247(A bogus newsgroup is one that is not in the list of active newsgroups
248in the active file, which on most systems is /usr/lib/news/active.)
249.Ip "m name" 8
250Move the named newsgroup somewhere else in the
251.IR .newsrc .
252If no name is given, the current newsgroup is moved.
253There are a number of ways to specify where you want the newsgroup\*(--type
254h for help when it asks where you want to put it.
255.Ip c 8
256Catch up\*(--mark all unread articles in this newsgroup as read.
257.Ip "o pattern" 8
258Only display those newsgroups whose name matches
259.IR pattern .
260Patterns are the same as for the \*(L'/\*(R' command.
261Multiple patterns may be separated by spaces, just as on the
262command line.
263The restriction will remain in effect either until there are no articles
264left in the restricted set of newsgroups, or another restriction command
265is given.
266Since
267.I pattern
268is optional, \*(L'o\*(R' by itself will remove the
269restriction.
270.Ip "a pattern" 8
271Add new newsgroups matching
272.IR pattern .
273Newsgroups which are already in your
274.I .newsrc
275file, whether subscribed to or
276not, will not be listed.
277If any new newsgroups are found, you will be asked for each one whether
278you would like to add it.
279After any new newsgroups have been added, the \*(L'a\*(R' command also
280restricts the current set of newsgroups just like the \*(L'o\*(R' command
281does.
282.Ip & 8
283Print out the current status of command line switches and any newsgroup
284restrictions.
285.Ip "&switch {switch}" 8
286Set additional command line switches.
287.Ip && 8
288Print out the current macro definitions.
289.Ip "&&keys commands" 8
290Define additional macros.
291.Ip !command 8
292Escape to a subshell.
293One exclamation mark (!) leaves you in your own news directory.
294A double exclamation mark (!!) leaves you in the spool
295directory for news, which on most systems is /usr/spool/news.
296The environment variable SHELL will be used if defined.
297If
298.I command
299is null, an interactive shell is started.
300.Ip q 8
301Quit.
302.Ip x 8
303Quit, restoring .newsrc to its state at startup of
304.IR rn .
305The .newsrc you would have had if you had exited with \*(L'q\*(R' will be
306called .newnewsrc, in case you didn't really want to type \*(L'x\*(R'.
307.Ip ^K 8
308Edit the global KILL file.
309This is a file which contains /pattern/j commands (one per line) to be
310applied to every newsgroup as it is started up, that is, when it is
311selected on the newsgroup selection level.
312The purpose of a KILL file is to mark articles as read on the basis of some
313set of patterns.
314This saves considerable wear and tear on your \*(L'n\*(R' key.
315There is also a local KILL file for each newsgroup.
316Because of the overhead involved in searching for articles to kill, it is
317better if possible to use a local KILL file.
318Local KILL files are edited with a \*(L'^K\*(R' on the article selection level.
319There are also automatic ways of adding search commands to the local KILL
320file\*(--see the \*(L'K\*(R' command and the K search modifier on the
321article selection level.
322.Sp
323If either of the environment variables VISUAL or EDITOR is set, the
324specified editor will be invoked; otherwise a default editor (normally vi(1))
325is invoked on the KILL file.
326.Sh "Article Selection Level"
327On the article selection level,
328.I rn
329selects (by default) unread articles in numerical order (the order in which
330articles have arrived at your site).
331If you do a subject search (^N), the default order is modified to be
332numerical order within each subject thread.
333You may switch back and forth between numerical order and subject thread
334order at will.
335The
336.B \-S
337switch can be used to make subject search mode the default.
338.Sp
339On the article selection level you are
340.I not
341asked whether you want to read an article before the article is displayed;
342rather,
343.I rn
344simply displays the first page (or portion of a page, at low baud rates) of the
345article and asks if you want to continue.
346The normal article selection prompt comes at the END of the article
347(though article selection commands can be given from within the middle
348of the article (the pager level) also).
349The prompt at the end of an article looks like this:
350.Sp
351End of article 248 (of 257)\*(--what next? [npq]
352.Sp
353The following are the options at this point:
354.Ip n,SP 8
355Scan forward for next unread article.
356(Note: the \*(L'n\*(R' (next) command when typed at the end of an article
357does not mark the article as read, since an article is automaticaly marked
358as read after the last line of it is printed.
359It is therefore possible to type a sequence such as \*(L'mn\*(R' and leave
360the article marked as unread.
361The fact that an article is marked as read by typing \*(L'n\*(R',
362\&\*(L'N\*(R', \*(L'^N\*(R', \*(L's\*(R', or \*(L'S\*(R' within the MIDDLE of
363the article is in fact a special case.)
364.Ip N 8
365Go to the next article.
366.Ip ^N 8
367Scan forward for the next article with the same subject, and make ^N default
368(subject search mode).
369.Ip p 8
370Scan backward for previous unread article.
371If there is none, stay at the current article.
372.Ip P 8
373Go to the previous article.
374.Ip \- 8
375Go to the previously displayed article (regardless of whether that article
376is before or after this article in the normal sequence).
377.Ip ^P 8
378Scan backward for the previous article with the same subject, and make
379^N default (subject search mode).
380.Ip ^R 8
381Restart the current article.
382.Ip v 8
383Restart the current article verbosely, displaying the entire header.
384.Ip ^L 8
385Refresh the screen.
386.Ip ^X 8
387Restart the current article, and decrypt as a rot13 message.
388.Ip X 8
389Refresh the screen, and decrypt as a rot13 message.
390.Ip b 8
391Back up one page.
392.Ip q 8
393Quit this newsgroup and go back to the newsgroup selection level.
394.Ip ^ 8
395Go to the first unread article.
396.Ip $ 8
397Go to the last article (actually, one past the last article).
398.Ip "number" 8
399Go to the numbered article.
400.Ip "range{,range} command{:command}" 8
401Apply a set of commands to a set of articles.
402A range consists of either <article number> or
403<article\ number>\-<article\ number>.
404A dot \*(L'.\*(R' represents the current article, and a dollar
405sign \*(L'$\*(R' represents the last article.
406.Sp
407Applicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
408(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
409(save to a destination), \*(L"!command\*(R" (shell escape), \*(L"=\*(R"
410(print the subject) and \*(L"C\*(R" (cancel).
411.Ip j 8
412Junk the current article\*(--mark it as read.
413If this command is used from within an article, you are left at the end of
414the article, unlike \*(L'n\*(R', which looks for the next article.
415.Ip m 8
416Mark the current article as still unread.
417(If you are in subject search mode you probably want to use M instead of m.
418Otherwise the current article may be selected as the beginning of the next
419subject thread.)
420.Ip M 8
421Mark the current article as still unread, but not until the newsgroup
422is exited.
423Until then, the current article will be marked as read.
424This is useful for returning to an article in another session, or in another
425newsgroup.
426.Ip /pattern 8
427Scan forward for article containing
428.I pattern
429in the subject.
430See the section on Regular Expressions.
431Together with the escape substitution facility described later, it becomes
432easy to search for various attributes of the current article, such as
433subject, article ID, author name, etc.
434The previous pattern can be recalled with \*(L"<esc>/\*(R".
435If
436.I pattern
437is omitted, the previous pattern is assumed.
438.Ip /pattern/h 8
439Scan forward for article containing
440.I pattern
441in the header.
442.Ip /pattern/a 8
443Scan forward for article containing
444.I pattern
445anywhere in article.
446.Ip /pattern/r 8
447Scan read articles also.
448.Ip /pattern/c 8
449Make search case sensitive.
450Ordinarily upper and lower case are considered the same.
451.Ip "/pattern/modifiers:command{:command}" 8
452Apply the commands listed to articles matching the search command (possibly
453with h, a, or r modifiers).
454Applicable commands include \*(L'm\*(R' (mark as unread), \*(L'M\*(R'
455(delayed mark as unread), \*(L'j\*(R' (mark as read), \*(L"s dest\*(R"
456(save to a destination), \*(L"!command\*(R" (shell escape), \*(L"=\*(R"
457(print the subject) and \*(L"C\*(R" (cancel).
458If the first command is \*(L'm\*(R' or \*(L'M\*(R', modifier r is assumed.
459A K may be included in the modifiers (not the commands) to cause the
460entire command (sans K) to be saved to the local KILL file, where it will
461be applied to every article that shows up in the newsgroup.
462.Sp
463For example, to save all articles in a given newsgroup to the line printer
464and mark them read, use \*(L"/^/\||\|lpr:j\*(R".
465If you say \*(L"/^/K\||\|lpr:j\*(R", this will happen every time you enter the
466newsgroup.
467.Ip ?pattern 8
468Scan backward for article containing
469.I pattern
470in the subject.
471May be modified as the forward search is: ?pattern?modifiers[:commands].
472It is likely that you will want an r modifier when scanning backward.
473.Ip k 8
474Mark as read all articles with the same subject as the current article.
475(Note: there is no single character command to temporarily mark as read (M
476command) articles matching the current subject.
477That can be done with \*(L"/<esc>s/M\*(R", however.)
478.Ip K 8
479Do the same as the k command, but also add a line to the local KILL file for
480this newsgroup to kill this subject every time the newsgroup is started up.
481For a discussion of KILL files, see the \*(L'^K\*(R' command below.
482See also the K modifier on searches above.
483.Ip ^K 8
484Edit the local KILL file for this newsgroup.
485Each line of the KILL file should be a command of the form /pattern/j.
486(With the exception that
487.I rn
488will insert a line at the beginning of the form \*(L"THRU <number>\*(R",
489which tells
490.I rn
491the maximum article number that the KILL file has been applied to. You
492may delete the THRU line to force a rescan of current articles.)
493You may also have reason to use the m, h, or a modifiers.
494Be careful with the M modifier in a kill file\*(--there are more efficient
495ways to never read an article.
496You might have reason to use it if a particular series of articles is posted
497to multiple newsgroups.
498In this case, M would force you to view the article in a different newsgroup.
499.Sp
500To see only newgroup articles in the control newsgroup, for instance, you
501might put
502.Sp
503/^/j
504.br
505/newgroup/m
506.Sp
507which kills all subjects not containing \*(L"newgroup\*(R".
508You can add lines automatically via the K command and K search modifiers,
509but editing is the only way to remove lines.
510If either of the environment variables VISUAL or EDITOR is set, the
511specified editor will be invoked; otherwise a default editor (normally vi)
512is invoked on the KILL file.
513.Sp
514The KILL file may also contain switch setting lines beginning with \*(L'&\*(R'.
515Additionally, any line beginning with \*(L'X\*(R' is executed on exit
516from the newsgroup rather than on entrance.
517This can be used to set switches back to a default value.
518.Ip r 8
519Reply through net mail.
520The environment variables MAILPOSTER and MAILHEADER may be used to modify
521the mailing behavior of
522.I rn
523(see environment section).
524If on a nonexistent article such as the "End of newsgroup" pseudo-article
525(which you can get to with a \*(L'$\*(R' command), invokes the mailer to
526nobody in particular.
527.Ip R 8
528Reply, including the current article in the header file generated.
529(See \*(L'F\*(R' command below).
530The YOUSAID environment variable controls the format of the attribution line.
531.Ip f 8
532Submit a followup article.
533If on a nonexistent article such as the "End of newsgroup" pseudo-article
534(which you can get to with a \*(L'$\*(R' command), posts an original
535article (basenote).
536.Ip F 8
537Submit a followup article, and include the old article, with lines prefixed
538either by \*(L">\*(R" or by the argument to a
539.B \-F
540switch.
541.I Rn
542will attempt to provide an attribution line in front of the quoted article,
543generated from the From: line of the article.
544Unfortunately, the From: line doesn't always contain the right name; you
545should double check it against the signature and change it if necessary,
546or you may have to apologize for quoting the wrong person.
547The environment variables NEWSPOSTER, NEWSHEADER and ATTRIBUTION may be
548used to modify the posting behavior of
549.I rn
550(see environment section).
551.Ip C 8
552Cancel the current article, but only if you are the contributor or superuser.
553.Ip c 8
554Catch up in this newsgroup; i.e., mark all articles as read.
555.Ip u 8
556Unsubscribe to this newsgroup.
557.Ip "s destination" 8
558Save to a filename or pipe using sh.
559If the first character of the destination is a vertical bar, the rest of
560the command is considered a shell command to which the article is passed
561through standard input.
562The command is subject to filename expansion.
563(See also the environment variable PIPESAVER.)
564If the destination does not begin with a vertical bar, the rest of the
565command is assumed to be a filename of some sort.
566An initial tilde \*(L'~\*(R' will be translated to the name of the home
567directory, and an initial environment variable substitution is also allowed.
568If only a directory name is specified, the environment variable SAVENAME
569is used to generate the actual name.
570If only a filename is specified (i.e. no directory), the environment variable
571SAVEDIR will be used to generate the actual directory.
572If nothing is specified, then obviously both variables will be used.
573Since the current directory for rn while doing a save command is your
574private news directory, saying \*(L"s ./filename\*(R" will force the file
575to your news directory.
576Save commands are also run through % interpretation, so that you can
577say \*(L"s %O/filename\*(R" to save to the directory you were in when you ran
578.IR rn ,
579and \*(L"s %t\*(R" to save to a filename consisting of the Internet address
580of the sender.
581.Sp
582After generating the full pathname of the file to save to,
583.I rn
584determines if the file exists already, and if so, appends to it.
585.I Rn
586will attempt to determine if an existing file is a mailbox or a normal file,
587and save the article in the same format.
588If the output file does not yet exist,
589.I rn
590will by default ask you which format you want, or you can make it skip the
591question with either the
592.B \-M
593or
594.B \-N
595switch.
596If the article is to be saved in mailbox format, the command to do so is
597generated from the environment variable MBOXSAVER.
598Otherwise, NORMSAVER is used.
599.Ip "S destination" 8
600Save to a filename or pipe using a preferred shell, such as csh.
601Which shell is used depends first on what you have the environment variable
602SHELL set to, and in the absence of that, on what your news administrator
603set for the preferred shell when he or she installed
604.IR rn .
605.Ip "| command" 8
606Shorthand for \*(L"s | command\*(R".
607.Ip "w destination" 8
608The same as \*(L"s destination\*(R", but saves without the header.
609.Ip "W destination" 8
610The same as \*(L"S destination\*(R", but saves without the header.
611.Ip & 8
612Print out the current status of command line switches.
613.Ip "&switch {switch}" 8
614Set additional command line switches.
615.Ip && 8
616Print out current macro definitions.
617.Ip "&&keys commands" 8
618Define an additional macro.
619.Ip !command 8
620Escape to a subshell.
621One exclamation mark (!) leaves you in your own news directory.
622A double exclamation mark (!!) leaves you in the spool
623directory of the current newsgroup.
624The environment variable SHELL will be used if defined.
625If
626.I command
627is null, an interactive shell is started.
628.Sp
629You can use escape key substitutions described later to get to many
630run-time values.
631The command is also run through % interpretation, in case it is being called
632from a range or search command.
633.Ip = 8
634List subjects of unread articles.
635.Ip # 8
636Print last article number.
637.Sh "Pager Level"
638At the pager level (within an article), the prompt looks like this:
639.Sp
640\*(--MORE\*(--(17%)
641.Sp
642and a number of commands may be given:
643.Ip SP 8
644Display next page.
645.Ip x 8
646Display next page and decrypt as a rot13 message.
647.Ip d,^D 8
648Display half a page more.
649.Ip CR 8
650Display one more line.
651.Ip q 8
652Go to the end of the current article (don't mark it either read or unread).
653Leaves you at the \*(L"What next?\*(R" prompt.
654.Ip j 8
655Junk the current article.
656Mark it read and go to the end of the article.
657.Ip ^L 8
658Refresh the screen.
659.Ip X 8
660Refresh the screen and decrypt as a rot13 message.
661.Ip b,^B 8
662Back up one page.
663.Ip gpattern 8
664Goto (search forward for)
665.I pattern
666within current article.
667Note that there is no space between the command and the pattern.
668If the pattern is found, the page containing the pattern will be displayed.
669Where on the page the line matching the pattern goes depends on the value
670of the
671.B \-g
672switch.
673By default the matched line goes at the top of the screen.
674.Ip G 8
675Search for g pattern again.
676.Ip ^G 8
677This is a special version of the \*(L'g\*(R' command that is for skipping
678articles in a digest.
679It is equivalent to setting \*(L"\-g4\*(R" and then executing the command
680\*(L"g^Subject:\*(R".
681.Ip TAB 8
682This is another special version of the \*(L'g\*(R' command that is for
683skipping inclusions of older articles.
684It is equivalent to setting \*(L"\-g4\*(R" and then executing the command
685\*(L"g^[^c]\*(R", where \fIc\fR is the first character of the last line
686on the screen.
687It searches for the first line that doesn't begin with the same character
688as the last line on the screen.
689.Ip !command 8
690Escape to a subshell.
691.PP
692The following commands skip the rest of the current article, then behave just
693as if typed to the \*(L"What next?\*(R" prompt at the end of the article.
694See the documentation at the article selection level for these commands.
695.Sp
696 # $ & / = ? c C f F k K ^K m M r R ^R u v Y ^
697.br
698 number
699.br
700 range{,range} command{:command}
701.Sp
702The following commands also skip to the end of the article, but have the
703additional effect of marking the current article as read:
704.Sp
705 n N ^N s S | w W
706.Sp
707.Sh "Miscellaneous facts about commands"
708An \*(L'n\*(R' typed at either the \*(L"Last newsgroup\*(R" prompt or a
709\*(L"Last article\*(R" prompt will cycle back to the top of the newsgroup
710or article list, whereas a \*(L'q\*(R' will quit the level.
711(Note that \*(L'n\*(R' does not mean \*(L"no\*(R", but rather
712\*(L"next\*(R".)
713A space will of course do whatever is shown as the
714default, which will vary depending on whether rn thinks you have more
715articles or newsgroups to read.
716.PP
717The \*(L'b\*(R' (backup page) command may be repeated until the beginning of
718the article is reached.
719If
720.I rn
721is suspended (via a ^Z), then when the job is resumed, a refresh (^L) will
722automatically be done (Berkeley-type systems only).
723If you type a command such as \*(L'!\*(R' or \*(L's\*(R' which takes you
724from the middle of the article to the end, you can always get back into the
725middle by typing \*(L'^L\*(R'.
726.PP
727In multi-character commands such as \*(L'!\*(R', \*(L's\*(R', \*(L'/\*(R',
728etc, you can interpolate various run-time values by typing escape and a
729character.
730To find out what you can interpolate, type escape and \*(L'h\*(R', or check
731out the single character % substitutions for environment variables in the
732Interpretation and Interpolation section, which are the same.
733Additionally, typing a double escape will cause any % substitutions in the
734string already typed in to be expanded.
735.Sh "Options"
736.I Rn
737has a nice set of options to allow you to tailor the interaction
738to your liking.
739(You might like to know that the author swears by \*(L"\-e \-m \-S \-/\*(R".)
740These options may be set on the command line, via the RNINIT
741environment variable, via a file pointed to by the RNINIT variable, or
742from within rn via the & command.
743Options may generally be unset by saying \*(L"+switch\*(R".
744Options include:
745.TP 5
746.B \-c
747checks for news without reading news.
748If a list of newsgroups is given on the command line, only those newsgroups
749will be checked; otherwise all subscribed-to newsgroups are checked.
750Whenever the
751.B \-c
752switch is specified, a non-zero exit status from
753.I rn
754means that there is unread news in one of the checked newsgroups.
755The
756.B \-c
757switch does not disable the printing of newsgroups with unread news;
758this is controlled by the
759.B \-s
760switch.
761(The
762.B \-c
763switch is not meaningful when given via the & command.)
764.TP 5
765.B \-C<number>
766tells
767.I rn
768how often to checkpoint the
769.IR .newsrc ,
770in articles read.
771Actually, this number says when to start thinking about doing a checkpoint
772if the situation is right.
773If a reasonable checkpointing situation doesn't arise within 10 more
774articles, the
775.I .newsrc
776is checkpointed willy-nilly.
777.TP 5
778.B \-d<directory name>
779sets the default save directory to something other than ~/News.
780The directory name will be globbed (via csh) if necessary (and if possible).
781Articles saved by
782.I rn
783may be placed in the save directory or in a subdirectory thereof depending
784on the command that you give and the state of the environment variables
785SAVEDIR and SAVENAME.
786Any KILL files (see the K command in the Article Selection section)
787also reside in this directory and its subdirectories, by default.
788In addition, shell escapes leave you in this directory.
789.TP 5
790.B \-D<flags>
791enables debugging output.
792See common.h for flag values.
793Warning: normally
794.I rn
795attempts to restore your
796.I .newsrc
797when an unexpected signal or internal error occurs.
798This is disabled when any debugging flags are set.
799.TP 5
800.B \-e
801causes each page within an article to be started at the top of the screen,
802not just the first page.
803(It is similar to the
804.B \-c
805switch of
806.IR more (1).)
807You never have to read scrolling text with this switch.
808This is helpful especially at certain baud rates because you can start reading
809the top of the next page without waiting for the whole page to be printed.
810It works nicely in conjuction with the
811.B \-m
812switch, especially if you use half-intensity for your highlight mode.
813See also the
814.B \-L
815switch.
816.TP 5
817.B \-E<name>=<val>
818sets the environment variable <name> to the value specified.
819Within
820.IR rn ,
821\*(L"&\-ESAVENAME=%t\*(R" is similar to \*(L"setenv SAVENAME '%t'\*(R" in
822.IR csh ,
823or \*(L"SAVENAME='%t'; export SAVENAME\*(R" in
824.IR sh .
825Any environment variables set with
826.B \-E
827will be inherited by subprocesses of
828.IR rn .
829.TP 5
830.B \-F<string>
831sets the prefix string for the \*(L'F\*(R' followup command to use in
832prefixing each line of the quoted article.
833For example, \*(L"\-F<tab>\*(R" inserts a tab on the front of each line
834(which will cause long lines to wrap around, unfortunately),
835\*(L"\-F>>>>\*(R" inserts \*(L">>>>\*(R" on every line, and
836\*(L"\-F\*(R" by itself causes nothing to be inserted, in case you want to
837reformat the text, for instance.
838The initial default prefix is \*(L">\*(R".
839.TP 5
840.B \-g<line>
841tells
842.I rn
843which line of the screen you want searched-for strings to show up on when
844you search with the \*(L'g\*(R' command within an article.
845The lines are numbered starting with 1.
846The initial default is \*(L"\-g1\*(R", meaning the first line of the screen.
847Setting the line to less than 1 or more than the number of lines on the screen
848will set it to the last line of the screen.
849.TP 5
850.B \-h<string>
851hides (disables the printing of) all header lines beginning with
852.I string.
853For instance, \-hexp will disable the printing of the \*(L"Expires:\*(R" line.
854Case is insignificant.
855If <string> is null, all header lines except Subject are hidden, and you
856may then use
857.B +h
858to select those lines you want to see.
859You may wish to use the baud-rate switch modifier below to hide more lines
860at lower baud rates.
861.TP 5
862.B \-H<string>
863works just like
864.B \-h
865except that instead of setting the hiding flag for a header line, it sets
866the magic flag for that header line.
867Certain header lines have magic behavior that can be controlled this way.
868At present, the following actions are caused by the flag for the particular
869line:
870the Newsgroups line will only print when there are multiple newsgroups,
871the Subject line will be underlined, and the Expires line will always be
872suppressed if there is nothing on it.
873In fact, all of these actions are the default, and you must use
874.B +H
875to undo them.
876.TP 5
877.B \-i=<number>
878specifies how long (in lines) to consider the initial page of an
879article\*(--normally this is determined automatically depending on baud rate.
880(Note that an entire article header will always be printed regardless of the
881specified initial page length.
882If you are working at low baud rate and wish to reduce the size of the
883headers, you may hide certain header lines with the
884.B \(bsh
885switch.)
886.TP 5
887.B \-l
888disables the clearing of the screen at the beginning of each
889article, in case you have a bizarre terminal.
890.TP 5
891.B \-L
892tells
893.I rn
894to leave information on the screen as long as possible by not blanking
895the screen between pages, and by using clear to end-of-line.
896(The
897.IR more (1)
898program does this.)
899This feature works only if you have the requisite termcap
900capabilities.
901The switch has no effect unless the
902.B \-e
903switch is set.
904.TP 5
905.B \-m=<mode>
906enables the marking of the last line of the previous page
907printed, to help the user see where to continue reading.
908This is most helpful when less than a full page is going to be displayed.
909It may also be used in conjunction with the
910.B \-e
911switch, in which case the page is erased, and the first line (which is
912the last line of the previous page) is highlighted.
913If
914.B \-m=s
915is specified, the standout mode will be used, but if
916.B \-m=u
917is specified, underlining will be used.
918If neither
919.B =s
920or
921.B =u
922is specified, standout is the default.
923Use
924.B +m
925to disable highlighting.
926.TP 5
927.B \-M
928forces mailbox format in creating new save files.
929Ordinarily you are asked which format you want.
930.TP 5
931.B \-N
932forces normal (non-mailbox) format in creating new save files.
933Ordinarily you are asked which format you want.
934.TP 5
935.B \-r
936causes
937.I rn
938to restart in the last newsgroup read during a previous session with
939.I rn.
940It is equivalent to starting up normally and then getting to the newsgroup
941with a g command.
942.TP 5
943.B \-s
944with no argument suppresses the initial listing of newsgroups with unread
945news, whether
946.B \-c
947is specified or not.
948Thus
949.B \-c
950and
951.B \-s
952can be used together to test \*(L"silently\*(R" the status of news from
953within your
954.I .login
955file.
956If
957.B \-s
958is followed by a number, the initial listing is suppressed after that many
959lines have been listed.
960Presuming that you have your
961.I .newsrc
962sorted into order of interest,
963.B \-s5
964will tell you the 5 most interesting newsgroups that have unread news.
965This is also a nice feature to use in your
966.I .login
967file, since it not only tells you whether there is unread news, but also how
968important the unread news is, without having to wade through the entire
969list of unread newsgroups.
970If no
971.B \-s
972switch is given
973.B \-s5
974is assumed, so just putting \*(L"rn \-c\*(R"
975into your
976\&.login file is fine.
977.TP 5
978.B \-S<number>
979causes
980.I rn
981to enter subject search mode (^N) automatically whenever a newsgroup is
982started up with <number> unread articles or more.
983Additionally, it causes any \*(L'n\*(R' typed while in subject search mode
984to be interpreted as \*(L'^N\*(R' instead.
985(To get back out of subject search mode, the best command is probably
986\&\*(L'^\*(R'.)
987If <number> is omitted, 3 is assumed.
988.TP 5
989.B \-t
990puts
991.I rn
992into terse mode.
993This is more cryptic but useful for low baud rates.
994(Note that your system administrator may have compiled
995.I rn
996with either verbose or terse messages only to save memory.)
997You may wish to use the baud-rate switch modifier below to enable terse mode
998only at lower baud rates.
999.TP 5
1000.B \-T
1001allows you to type ahead of rn.
1002Ordinarily rn will eat typeahead to prevent your autorepeating space bar from
1003doing a very frustrating thing when you accidentally hold it down.
1004If you don't have a repeating space bar, or you are working at low baud
1005rate, you can set this switch to prevent this behavior.
1006You may wish to use the baud-rate switch modifier below to disable typeahead
1007only at lower baud rates.
1008.TP 5
1009.B \-v
1010sets verification mode for commands.
1011When set, the command being executed is displayed to give some feedback that
1012the key has actually been typed.
1013Useful when the system is heavily loaded and you give a command that takes
1014a while to start up.
1015.TP 5
1016.B \-/
1017sets SAVEDIR to \*(L"%p/%c\*(R" and SAVENAME to \*(L"%a\*(R", which means
1018that by default articles are saved in a subdirectory of your private news
1019directory corresponding to the name of the the current newsgroup, with the
1020filename being the article number.
1021.B +/
1022sets SAVEDIR to \*(L"%p\*(R" and SAVENAME to \*(L"%^C\*(R", which by
1023default saves articles directly to your private news directory, with the
1024filename being the name of the current newsgroup, first letter capitalized.
1025(Either
1026.B +/
1027or
1028.B \-/
1029may be default on your system, depending on the feelings of your news
1030administrator when he, she or it installed
1031.IR rn .)
1032You may, of course, explicitly set SAVEDIR and SAVENAME to other values\*(--see
1033discussion in the environment section.
1034.PP
1035Any switch may be selectively applied according to the current baud-rate.
1036Simply prefix the switch with +speed to apply the switch at that speed or
1037greater, and \%\-speed to apply the switch at that speed or less.
1038Examples: \%\-1200\-hposted suppresses the Posted line at 1200 baud or less;
1039\%+9600\-m enables marking at 9600 baud or more.
1040You can apply the modifier recursively to itself also: \%+300\-1200\-t sets
1041terse mode from 300 to 1200 baud.
1042.PP
1043Similarly, switches may be selected based on terminal type:
1044.Sp
1045 \-=vt100+T set +T on vt100
1046.br
1047 \-=tvi920\-ETERM=mytvi get a special termcap entry
1048.br
1049 \-=tvi920\-ERNMACRO=%./.rnmac.tvi
1050.br
1051 set up special keymappings
1052.br
1053 +=paper\-v set verify mode if not hardcopy
1054.PP
1055Some switch arguments, such as environment variable values, may require
1056spaces in them.
1057Such spaces should be quoted via ", ', or \e in the conventional fashion,
1058even when passed via RNINIT or the & command.
1059.Sh "Regular Expressions"
1060The patterns used in article searching are regular expressions such as
1061those used by
1062.IR ed (1).
1063In addition, \ew matches an alphanumeric character and \eW a nonalphanumeric.
1064Word boundaries may be matched by \eb, and non-boundaries by \eB.
1065The bracketing construct \e(\ ...\ \e) may also be used, and \edigit matches
1066the digit'th substring, where digit can range from 1 to 9.
1067\e0 matches whatever the last bracket match matched.
1068Up to 10 alternatives may given in a pattern, separated by \e|, with the
1069caveat that \e(\ ...\ \e|\ ...\ \e) is illegal.
1070.Sh "Interpretation and Interpolation"
1071Many of the strings that
1072.I rn
1073handles are subject to interpretations of several types.
1074Under filename expansion, an initial \*(L"~/\*(R" is translated to the name
1075of your home directory, and \*(L"~name\*(R" is translated to the login
1076directory for the user specified.
1077Filename expansion will also expand an initial environment variable, and
1078also does the backslash, uparrow and percent expansion mentioned below.
1079.PP
1080All interpreted strings go through backslash, uparrow and percent
1081interpretation.
1082The backslash escapes are the normal ones (such as \en, \et, \ennn, etc.).
1083The uparrow escapes indicate control codes in the normal fashion.
1084Backslashes or uparrows to be passed through should be escaped with backslash.
1085The special percent escapes are similar to printf percent escapes.
1086These cause the substitution of various run-time values into the string.
1087The following are currently recognized:
1088.Ip %a 8
1089Current article number.
1090.Ip %A 8
1091Full name of current article (%P/%c/%a).
1092(On a Eunice system with the LINKART option, %P/%c/%a returns the name of
1093the article in the current newsgroup, while %A returns the real name of
1094the article, which may be different if the current article was posted to
1095multiple newsgroups.)
1096.Ip %b 8
1097Destination of last save command, often a mailbox.
1098.Ip %B 8
1099The byte offset to the beginning of the part of the article to be saved,
1100set by the save command.
1101The \*(L's\*(R' and \*(L'S\*(R' commands set it to 0, and the \*(L'w\*(R'
1102and \*(L'W\*(R' commands set it to the byte offset of the body of the article.
1103.Ip %c 8
1104Current newsgroup, directory form.
1105.Ip %C 8
1106Current newsgroup, dot form.
1107.Ip %d 8
1108Full name of newsgroup directory (%P/%c).
1109.Ip %D 8
1110\*(L"Distribution:\*(R" line from the current article.
1111.Ip %f 8
1112\*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
1113line if there is one.
1114This differs from %t in that comments (such as the full name) are not
1115stripped out with %f.
1116.Ip %F 8
1117\*(L"Newsgroups:\*(R" line for a new article, constructed from
1118\*(L"Newsgroups:\*(R" and \*(L"Followup-To:\*(R" lines of current article.
1119.Ip %h 8
1120Name of the header file to pass to the mail or news poster,
1121containing all the information that the poster program needs in the
1122form of a message header.
1123It may also contain a copy of the current article.
1124The format of the header file is controlled by the MAILHEADER and NEWSHEADER
1125environment variables.
1126.Ip %H 8
1127Host name (your machine's name).
1128.Ip %i 8
1129\*(L"Message-I.D.:\*(R" line from the current article, with <> guaranteed.
1130.Ip %I 8
1131The reference indication mark (see the
1132.B \-F
1133switch.)
1134.Ip %l 8
1135The news administrator's login name, if any.
1136.Ip %L 8
1137Login name (yours).
1138.Ip %m 8
1139The current mode of rn, for use in conditional macros.
1140.Sp
1141.nf
1142 i Initializing.
1143 n Newsgroup selection level.
1144 a Article selection level (What next?).
1145 p Pager level (MORE prompt).
1146 A Add this newsgroup?
1147 C Catchup confirmation.
1148 D Delete bogus newsgroups?
1149 M Use mailbox format?
1150 R Resubscribe to this newsgroup?
1151.fi
1152.Sp
1153Note that yes/no questions are all upper-case modes.
1154If, for example, you wanted to disallow defaults on all yes/no questions,
1155you could define the following macro:
1156.Sp
1157.nf
1158\e040 %(%m=[A-Z]?h: )
1159.fi
1160.Ip %M 8
1161The number of articles marked to return via the \*(L'M\*(R' command.
1162If the same article is Marked multiple times, \*(L"%M\*(R" counts it
1163multiple times in the current implementation.
1164.Ip %n 8
1165\*(L"Newsgroups:\*(R" line from the current article.
1166.Ip %N 8
1167Full name (yours).
1168.Ip %o 8
1169Organization (yours).
1170.Ip %O 8
1171Original working directory (where you ran rn from).
1172.Ip %p 8
1173Your private news directory, normally ~/News.
1174.Ip %P 8
1175Public news spool directory, normally /usr/spool/news.
1176.Ip %r 8
1177Last reference on references line of current article (parent article id).
1178.Ip %R 8
1179References list for a new article, constructed from the references and article
1180ID of the current article.
1181.Ip %s 8
1182Subject, with all Re's and (nf)'s stripped off.
1183.Ip %S 8
1184Subject, with one \*(L"Re:\*(R" stripped off.
1185.Ip %t 8
1186\*(L"To:\*(R" line derived from the \*(L"From:\*(R" and \*(L"Reply-To:\*(R"
1187lines of the current article.
1188This always returns an Internet format address.
1189.Ip %T 8
1190\*(L"To:\*(R" line derived from the \*(L"Path:\*(R" line of the
1191current article to produce a uucp path.
1192.Ip %u 8
1193The number of unread articles in the current newsgroup.
1194.Ip %U 8
1195The number of unread articles in the current newsgroup, not counting the
1196current article.
1197.Ip %x 8
1198The news library directory.
1199.Ip %X 8
1200The rn library directory.
1201.Ip %z 8
1202The length of the current article in bytes.
1203.Ip %~ 8
1204Your home directory.
1205.Ip %. 8
1206The directory containing your dot files, which is your home directory unless
1207the environment variable DOTDIR is defined when rn is invoked.
1208.Ip %$ 8
1209Current process number.
1210.Ip %/ 8
1211Last search string.
1212.Ip %% 8
1213A percent sign.
1214.Ip "%{name} or %{name\-default}" 8
1215The environment variable \*(L"name\*(R".
1216.Ip %[name] 8
1217The value of header line \*(L"Name:\*(R" from the current article.
1218The \*(L"Name:\ \*(R" is not included.
1219For example \*(L"%D\*(R" and \*(L"%[distribution]\*(R" are equivalent.
1220The name must be spelled out in full.
1221.Ip %`command` 8
1222Inserts the output of the command, with any embedded newlines translated
1223to space.
1224.Ip %""prompt"" 8
1225Prints prompt on the terminal, then inputs one string, and inserts it.
1226.Ip "%(test_text=pattern?then_text:else_text)" 8
1227If
1228.I test_text
1229matches
1230.IR pattern ,
1231has the value
1232.IR then_text ,
1233otherwise
1234.IR else_text .
1235The \*(L":else_text\*(R" is optional, and if absent, interpolates the null string.
1236The = may be replaced with != to negate the test.
1237To quote any of the metacharacters
1238(\*(L'=\*(R', \*(L'?\*(R', \*(L':\*(R', or \*(L')\*(R'),
1239precede with a backslash.
1240.Ip %digit 8
1241The digits 1 through 9 interpolate the string matched by the nth bracket
1242in the last pattern match that had brackets.
1243If the last pattern had alternatives, you may not know the number of the
1244bracket you want\*(--%0 will give you the last bracket matched.
1245.PP
1246Modifiers: to capitalize the first letter, insert \*(L'^\*(R':
1247\*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
1248Inserting \*(L'_\*(R' causes the first letter following the last
1249\&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
1250.SH ENVIRONMENT
1251The following environment variables are paid attention to by
1252.IR rn .
1253In general the default values assumed for these variables by
1254.I rn
1255are reasonable, so if you are using
1256.I rn
1257for the first time, you can safely ignore this section.
1258Note that the defaults below may not correspond precisely to the defaults
1259on your system.
1260To find the actual defaults you would need to look in config.h and common.h
1261in the rn source directory, and the file INIT in the rn library.
1262.PP
1263Those variables marked (%) are subject to % interpolation, and those marked
1264(~) are subject to both % interpolation and ~ interpretation.
1265.Ip "ATTRIBUTION (%)" 8
1266Gives the format of the attribution line in front of the quoted article
1267included by an F command.
1268.Sp
1269Default: In article %i %f writes:
1270.Ip "CANCEL (~)" 8
1271The shell command used to cancel an article.
1272.Sp
1273Default: inews \-h < %h
1274.Ip "CANCELHEADER (%)" 8 13v
1275The format of the file to pass to the CANCEL command in order to cancel
1276an article.
1277.Sp
1278Default:
1279.br
1280Newsgroups: %n
1281.br
1282Subject: cmsg cancel %i
1283.br
1284References: %R
1285.br
1286Reply-To: %L@%H.UUCP (%N)
1287.br
1288Distribution: %D
1289.br
1290Organization: %o
1291.sp 1
1292%i cancelled from rn.
1293.Ip DOTDIR 8
1294Where to find your dot files, if they aren't in your home directory.
1295Can be interpolated using \*(L"%.\*(R".
1296.Sp
1297Default: $HOME
1298.Ip "EDITOR (~)" 8
1299The name of your editor, if VISUAL is undefined.
1300.Sp
1301Default: whatever your news administrator compiled in, usually vi.
1302.Ip "FIRSTLINE (%)" 8
1303Controls the format of the line displayed at the top of an article.
1304Warning: this may go away.
1305.Sp
1306Default: Article %a %(%U%M!=^00$?(%U more%(%M!=^0$? + %M Marked to return)\e) )in %C:, more or less.
1307.Ip HIDELINE 8
1308If defined, contains a regular expression which matches article lines to
1309be hidden, in order, for instance, to suppress quoted material.
1310A recommended string for this purpose is \*(L"^>...\*(R", which \fIdoesn't\fR
1311hide lines with only \*(L'>\*(R', to give some indication that quoted
1312material is being skipped.
1313If you want to hide more than one pattern, you can use \*(L"\||\|\*(R" to
1314separate the alternatives.
1315You can view the hidden lines by restarting the article with the \*(L'v\*(R'
1316command.
1317.Sp
1318There is some overhead involved in matching each line of the article against
1319a regular expression.
1320You might wish to use a baud-rate modifier to enable this feature only at
1321low baud rates.
1322.Sp
1323Default: undefined
1324.Ip HOME 8
1325Your home directory.
1326Affects ~ interpretation, and the location of your
1327dot files if DOTDIR is not defined.
1328.Sp
1329Default: $LOGDIR
1330.Ip "KILLGLOBAL (~)" 8
1331Where to find the KILL file to apply to every newsgroup.
1332See the \*(L'^K\*(R' command at the newsgroup selection level.
1333.Sp
1334Default: %p/KILL
1335.Ip "KILLLOCAL (~)" 8
1336Where to find the KILL file for the current newsgroup.
1337See the commands \*(L'K\*(R' and \*(L'^K\*(R' at the article selection level,
1338and the search modifier \*(L'K\*(R'.
1339.Sp
1340Default: %p/%c/KILL
1341.Ip LOGDIR 8
1342Your home directory if HOME is undefined.
1343Affects ~ interpretation, and the location of your
1344dot files if DOTDIR is not defined.
1345.Sp
1346Default: none.
1347.Sp
1348Explanation: you must have either $HOME or $LOGDIR.
1349.Ip LOGNAME 8
1350Your login name, if USER is undefined.
1351May be interpolated using \*(L"%L\*(R".
1352.Sp
1353Default: value of getlogin().
1354.Ip "MAILCALL (~)" 8
1355What to say when there is new mail.
1356.Sp
1357Default: (Mail)
1358.Ip "MAILFILE (~)" 8
1359Where to check for mail.
1360.Sp
1361Default: /usr/spool/mail/%L
1362.Ip "MAILHEADER (%)" 8
1363The format of the header file for replies.
1364See also MAILPOSTER.
1365.Sp
1366Default:
1367.Sp
1368To: %T
1369.br
1370Subject: %(%i=^$?:Re: %S
1371.br
1372Newsgroups: %n
1373.br
1374In-Reply-To: %i)
1375.br
1376%(%[references]!=^$?References\\: %[references]
1377.br
1378)Organization: %o
1379.br
1380Cc:
1381.br
1382Bcc: \en\en
1383.Ip "MAILPOSTER (~)" 8
1384The shell command to be used by the reply commands (r and R)
1385in order to allow you to enter and deliver the response.
1386.I Rn
1387will not itself call upon an editor for replies\*(--this
1388is a function of the program called by
1389.IR rn .
1390See also MAILHEADER.
1391.Sp
1392Default: Rnmail \-h %h
1393.Ip "MBOXSAVER (~)" 8
1394The shell command to save an article in mailbox format.
1395.Sp
1396Default: %X/mbox.saver %A %P %c %a %B %C "%b" \e
1397.br
1398"From: %T %`date`"
1399.Sp
1400Explanation: the first seven arguments are the same as for NORMSAVER.
1401The eighth argument to the shell script is the new From: line
1402for the article, including the posting date,
1403derived either directly from the Posted: line, or not-so-directly from
1404the Date: line.
1405Header munging at its finest.
1406.Ip NAME 8
1407Your full name.
1408May be interpolated using \*(L"%N\*(R".
1409.Sp
1410Default: name from /etc/passwd, or ~/.fullname.
1411.Ip "NEWSHEADER (%)" 8 16v
1412The format of the header file for followups.
1413See also NEWSPOSTER.
1414.Sp
1415Default:
1416.Sp
1417Newsgroups: %(%F=^$?%C:%F)
1418.br
1419Subject: %(%S=^$?%"\n\nSubject: ":Re: %S)
1420.br
1421Summary:
1422.br
1423Expires:
1424.br
1425%(%R=^$?:References: %R
1426.br
1427)Sender:
1428.br
1429Reply-To: %L@%H.UUCP (%N)
1430.br
1431Followup-To:
1432.br
1433Distribution: %(%i=^$?%"\nDistribution: ":%D)
1434.br
1435Organization: %o
1436.br
1437Keywords: \en\en
1438.Ip "NEWSPOSTER (~)" 8
1439The shell command to be used by the followup commands (f and F)
1440in order to allow you to enter and post a followup news article.
1441.I Rn
1442will not itself call upon an editor for followups\*(--this
1443is a function of the program called by
1444.IR rn .
1445See also NEWSHEADER.
1446.Sp
1447Default: Pnews \-h %h
1448.Ip "NORMSAVER (~)" 8
1449The shell command to save an article in the normal (non-mailbox) format.
1450.Sp
1451Default: %X/norm.saver %A %P %c %a %B %C "%b"
1452.Ip ORGANIZATION 8
1453Either the name of your organization, or the name of a file containing the
1454name of your organization.
1455May be interpolated using \*(L"%o\*(R".
1456.Sp
1457Default: whatever your news administrator compiled in.
1458.Ip PAGESTOP 8
1459If defined, contains a regular expression which matches article lines to
1460be treated as form-feeds.
1461There are at least two things you might want to do with this.
1462To cause page breaks between articles in a digest, you might define it
1463as \*(L"^--------\*(R".
1464To force a page break before a signature, you could define it
1465as \*(L"^-- $\*(R".
1466(Then, when you see \*(L"--\*(R" at the bottom of the page, you can skip
1467the signature if you so desire by typing \*(L'n\*(R' instead of space.)
1468To do both, you could use \*(L"^--\*(R".
1469If you want to break on more than one pattern, you can use \*(L"\||\|\*(R" to
1470separate the alternatives.
1471.Sp
1472There is some overhead involved in matching each line of the article against
1473a regular expression.
1474You might wish to use a baud-rate modifier to enable this feature only at
1475low baud rates.
1476.Sp
1477Default: undefined
1478.Ip "PIPESAVER (%)" 8
1479The shell command to execute in order to accomplish a save to a pipe
1480(\*(L"s\ |\ command\*(R" or \*(L"w\ |\ command\*(R").
1481The command typed by the user is substituted in as %b.
1482.Sp
1483Default: %(%B=^0$?<%A:tail +%Bc %A |) %b
1484.Sp
1485Explanation: if %B is 0, the command is \*(L"<%A %b\*(R", otherwise
1486the command is \*(L"tail +%Bc %A | %b\*(R".
1487.Ip RNINIT 8
1488Default values for switches may be passed to
1489.I rn
1490by placing them in RNINIT.
1491Any switch that is set in RNINIT may be overruled
1492on the command line, or via the \*(L'&\*(R' command from within
1493.IR rn .
1494Binary-valued switches that are set with \*(L"\-switch\*(R" may be unset
1495using \*(L"+switch\*(R".
1496.Sp
1497If RNINIT begins with a \*(L'/\*(R' it is assumed to be the name of a file
1498containing switches.
1499If you want to set many environment variables but don't want to keep
1500them all in your environment, or if the use of any of these variables
1501conflicts with other programs, you can use this feature along with the
1502.B \-E
1503switch to set the environment variables upon startup.
1504.Sp
1505Default: \*(L" \*(R".
1506.Ip "RNMACRO (~)" 8
1507The name of the file containing macros and key mappings.
1508See the MACROS section.
1509.Sp
1510Default: %./.rnmac
1511.Ip "SAVEDIR (~)" 8
1512The name of the directory to save to, if the save command does not specify
1513a directory name.
1514.Sp
1515Default:
1516.br
1517 If
1518.B \-/
1519is set: %p/%c
1520.br
1521 If
1522.B +/
1523is set: %p
1524.Ip "SAVENAME (%)" 8
1525The name of the file to save to, if the save command contains only a
1526directory name.
1527.Sp
1528Default:
1529.br
1530 If
1531.B \-/
1532is set: %a
1533.br
1534 If
1535.B +/
1536is set: %^C
1537.Ip SHELL 8
1538The name of your preferred shell.
1539It will be used by the \*(L'!\*(R', \*(L'S\*(R' and \*(L'W\*(R' commands.
1540.Sp
1541Default: whatever your news administrator compiled in.
1542.Ip "SUBJLINE (%)" 8
1543Controls the format of the lines displayed by the \*(L'=\*(R' command at
1544the article selection level.
1545.Sp
1546Default: %s
1547.Ip TERM 8
1548Determines which termcap entry to use, unless TERMCAP contains the entry.
1549.Ip TERMCAP 8
1550Holds either the name of your termcap file, or a termcap entry.
1551.Sp
1552Default: /etc/termcap, normally.
1553.Ip USER 8
1554Your login name.
1555May be interpolated using \*(L"%L\*(R".
1556.Sp
1557Default: $LOGNAME
1558.Ip "VISUAL (~)" 8
1559The name of your editor.
1560.Sp
1561Default: $EDITOR
1562.Ip "YOUSAID (%)" 8
1563Gives the format of the attribution line in front of the quoted article
1564included by an R command.
1565.Sp
1566Default: In article %i you write:
1567.SH MACROS
1568When
1569.I rn
1570starts up, it looks for a file containing macro definitions (see environment
1571variable RNMACRO).
1572Any sequence of commands may be bound to any sequence of keys, so you
1573could remap your entire keyboard if you desire.
1574Blank lines or lines beginning with # in the macro file are considered
1575comments; otherwise
1576.I rn
1577looks for two fields separated by white space.
1578The first field gives the sequence of keystrokes that trigger the macro,
1579and the second field gives the sequence of commands to execute.
1580Both fields are subject to % interpolation, which will also translate
1581backslash and uparrow sequences.
1582(The keystroke field is interpreted at startup time, but the command field
1583is interpreted at macro execution time so that you may refer to % values
1584in a macro.)
1585For example, if you want to reverse the roles of carriage return and
1586space in rn
1587.Sp
1588^J \e040
1589.br
1590^M \e040
1591.br
1592\e040 ^J
1593.Sp
1594will do just that.
1595By default, all characters in the command field are interpreted as the
1596canonical
1597.I rn
1598characters, i.e. no macro expansion is done.
1599Otherwise the above pair of macros would cause an infinite loop.
1600To force macro expansion in the command field, enclose the
1601macro call with ^( ... ^) thusly:
1602.Sp
1603@s |mysavescript
1604.br
1605@w w^(@s^)
1606.Sp
1607You can use the %() conditional construct to construct macros that work
1608differently under different circumstances.
1609In particular, the current mode (%m) of
1610.I rn
1611could be used to make a command that only works at a particular level.
1612For example,
1613.Sp
1614^[[O %(%m=p?\e040)
1615.Sp
1616will only allow the macro to work at the pager level.
1617.Sp
1618%(%{TERM}=vt100?^[[O) /^J
1619.Sp
1620will do the binding only if the terminal type is vt100,
1621though if you have many of these it would be better to have separate
1622files for each terminal.
1623.Sp
1624If you want to bind a macro to a function key that puts a common garbage character
1625after the sequence (such as the carriage return on the end of Televideo 920
1626function sequences), DO NOT put the carriage return
1627into all the sequences or you will waste a CONSIDERABLE amount of internal
1628storage.
1629Instead of \*(L"^AF^M\*(R", put \*(L"^AF+1\*(R", which indicates to
1630.I rn
1631that it should gobble up one character after the F.
1632.SH AUTHOR
1633Larry Wall <lwall@sdcrdcf.UUCP>
1634.br
1635Regular expression routines are borrowed from emacs, by James Gosling.
1636.SH FILES
1637.Ip "%./.newsrc" 1.25i
1638status of your news reading
1639.Ip "%./.oldnewsrc" 1.25i
1640backup copy of your
1641.I .newsrc
1642from start of session
1643.Ip "%./.rnlock" 1.25i
1644lock file so you don't screw up your
1645.I .newsrc
1646.Ip "%./.rnlast" 1.25i
1647info from last run of rn
1648.Ip "%./.rnsoft" 1.25i
1649soft pointers into /usr/lib/active to speed startup, synchronous with
1650.I .newsrc
1651.Ip "%./.rnhead" 1.25i
1652temporary header file to pass to a mailer or news poster
1653.Ip "%./.rnmac" 1.25i
1654macro and keymap definitions
1655.Ip "%p" 1.25i
1656your news save directory, usually ~/News
1657.Ip "%x/active" 1.25i
1658the list of active newsgroups, usually /usr/lib/news/active
1659.Ip "%P" 1.25i
1660the public news spool directory, usually /usr/spool/news
1661.Ip "%X/INIT" 1.25i
1662system-wide default switches
1663.SH SEE ALSO
1664newsrc(5), more(1), readnews(1), Pnews(1), Rnmail(1)
1665.SH DIAGNOSTICS
1666Generally self-documenting, as they say.
1667.SH BUGS
1668The
1669.B \-h
1670switch can only hide header lines that
1671.I rn
1672knows about.
1673.PP
1674The \*(L'\-\*(R' command doesn't cross newsgroup boundaries, and only undoes
1675the last article selection.
1676.PP
1677If you edit your
1678.I .newsrc
1679while
1680.I rn
1681is running,
1682.I rn
1683will happily wipe out your changes when it decides to
1684write out the
1685.I .newsrc
1686file.
1687.PP
1688.I Rn
1689doesn't do certain things (like ordering articles on posting date) that
1690the author feels should be handled by inews.
1691.PP
1692Marking of duplicate articles as read in cross-referenced newsgroups will
1693not work unless the Xref patch is installed in inews.
1694.PP
1695If you get carried away with % or escape substitutions, you can overflow
1696buffers.
1697.PP
1698There should be no fixed limit on the number of newsgroups.
1699.PP
1700Some of the more esoteric features may be missing on machines with limited
1701address space.