home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / rn_4_3_blars.lzh / rn.1 < prev    next >
Text File  |  1990-08-22  |  58KB  |  1,733 lines

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