home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / trn_12.zip / doc / trn.man < prev   
Text File  |  1992-08-07  |  106KB  |  2,838 lines

  1.  
  2.  
  3. TRN(1)                   USER COMMANDS                     TRN(1)
  4.  
  5.  
  6.  
  7. NAME
  8.      trn - threaded read news program
  9.  
  10. SYNOPSIS
  11.      trn [options] [newsgroups]
  12.  
  13. DESCRIPTION
  14.      Trn is a threaded version of rn, which is a replacement  for
  15.      the  readnews(1)  program.   Being "threaded" means that the
  16.      articles are interconnected in reply order.  Each discussion
  17.      thread  is  a  tree of articles, where all the reply (child)
  18.      articles  branch  off  from  their  respective   originating
  19.      (parent) articles.  A representation of this tree (or a por-
  20.      tion of it) is displayed in the article header  as  you  are
  21.      reading  news.  This gives you a better feel for how all the
  22.      articles are related, and even lets you see at a glance when
  23.      an article already has a plethora of replies (to avoid beat-
  24.      ing a subject to death).  In  addition,  trn  has  a  thread
  25.      selector menu that allows you to quickly browse the subjects
  26.      and authors of the available threads and choose the ones you
  27.      find interesting.  The remaining threads can either be saved
  28.      for later or marked as read.
  29.  
  30.      If you are already familiar with rn you will  probably  want
  31.      to skip forward to the section on the Thread Selection Mode,
  32.      then move on to read about the Tree Display, and finish with
  33.      the  summary of What's New?  with trn.  If you're impatient,
  34.      just dive in and get started.  All the regular commands  are
  35.      the  same as those in rn, and the on-line help will give you
  36.      a quick run-down of what new commands are  available.   Just
  37.      type 'h' from any prompt.  I'd suggest using the command:
  38.  
  39.          trn -x -X
  40.  
  41.      to make sure some of the best new features are turned on.
  42.  
  43.      Starting Trn
  44.  
  45.      If no newsgroups are specified,  all  the  newsgroups  which
  46.      have  unread  news are displayed, and then the user is asked
  47.      for each one whether he wants to read it, in  the  order  in
  48.      which the newsgroups occur in the .newsrc file.  With a list
  49.      of newsgroups, trn will start up in "add"  mode,  using  the
  50.      list as a set of patterns to add new newsgroups and restrict
  51.      which newsgroups are displayed.  See the discussion  of  the
  52.      'a' command on the newsgroup selection level.
  53.  
  54.      Trn operates on four levels: the newsgroup selection  level,
  55.      the thread selection level, the article selection level, and
  56.      the paging level.  Each level has its own set  of  commands,
  57.      and  its  own  help  menu.   At the paging level (the bottom
  58.      level), trn behaves much like the more(1) program.   At  the
  59.  
  60.  
  61.  
  62. Sun Release 4.1        Last change: LOCAL                       1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. TRN(1)                   USER COMMANDS                     TRN(1)
  70.  
  71.  
  72.  
  73.      thread  selection level, you are presented with the subjects
  74.      and (optionally) authors  associated  with  each  discussion
  75.      thread,  and given a chance to choose which ones you wish to
  76.      read now, save for later, or manipulate in some way.  At the
  77.      article  selection  level,  you may read them in the default
  78.      order (which follows the  discussion  of  the  articles  and
  79.      their  replies), or jump around from one article to another.
  80.      At the newsgroup selection level (the top  level),  you  may
  81.      specify  which  newsgroup you want next, or read them in the
  82.      default order, which is the order that the newsgroups  occur
  83.      in your .newsrc file.  (You will therefore want to rearrange
  84.      your .newsrc file to put  the  most  interesting  newsgroups
  85.      first.   This  can be done with the 'm' command on the News-
  86.      group Selection  level.   WARNING:  invoking  readnews/vnews
  87.      (the  old  user  interface)  in any way (including as a news
  88.      checker in your login sequence!) will cause your .newsrc  to
  89.      be disarranged again.)
  90.  
  91.      On any level, at ANY prompt, help is available in  the  form
  92.      of  a summary of available commands and what they do by typ-
  93.      ing an 'h'.  This is probably the most important command  to
  94.      remember, so don't you forget it.
  95.  
  96.      Typing space to any question means to do the  normal  thing.
  97.      You  will  know what that is because every prompt has a list
  98.      of several plausible commands enclosed in  square  brackets.
  99.      The  first command in the list is the one which will be done
  100.      if you type a space.  (All input is done in cbreak mode,  so
  101.      carriage  returns  should not be typed to terminate anything
  102.      except certain  multi-character  commands.   Those  commands
  103.      will be obvious in the discussion below because they take an
  104.      argument.)
  105.  
  106.      Upon startup, trn will do several things:
  107.  
  108.      1.  It will look for your .newsrc file, which is  your  list
  109.          of  subscribed-to  newsgroups.   If  trn  doesn't find a
  110.          .newsrc, it will create one.  If it does  find  one,  it
  111.          will back it up under the name ".oldnewsrc".
  112.  
  113.      2.  It will input your .newsrc file, listing out  the  first
  114.          several newsgroups with unread news.
  115.  
  116.      3.  It will  perform  certain  consistency  checks  on  your
  117.          .newsrc.   If  your  .newsrc  is  out  of date in any of
  118.          several ways, trn will warn you and patch it up for you,
  119.          but you may have to wait a little longer for it to start
  120.          up.
  121.  
  122.      4.  Trn will next check to see if any  new  newsgroups  have
  123.          been  created,  and give you the opportunity to add them
  124.          to your .newsrc.
  125.  
  126.  
  127.  
  128. Sun Release 4.1        Last change: LOCAL                       2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. TRN(1)                   USER COMMANDS                     TRN(1)
  136.  
  137.  
  138.  
  139.      5.  Trn goes into the top prompt level--the newsgroup selec-
  140.          tion level.
  141.  
  142.      Newsgroup Selection Level
  143.  
  144.      In this section the words "next" and "previous" refer to the
  145.      ordering  of  the  newsgroups  in your .newsrc file.  On the
  146.      newsgroup selection level, the prompt looks like this:
  147.  
  148.      ******** 17 unread articles in talk.blurfl--read now? [ynq]
  149.  
  150.      and the following commands may be given at this level:
  151.  
  152.      y,SP    Do this newsgroup now.
  153.  
  154.      .command
  155.              Do this newsgroup now, but  execute  command  before
  156.              displaying  anything.   The  command  will be inter-
  157.              preted as if given on the article selection level.
  158.  
  159.      +       Enter this newsgroup through the thread selector.
  160.  
  161.      =       Start  this  newsgroup,  but  list  subjects  before
  162.              displaying articles.
  163.  
  164.      U       Enter  this  newsgroup  through  the  "Set   unread"
  165.              prompt.
  166.  
  167.      t       Toggle the always-read-threaded flag for the current
  168.              group.
  169.  
  170.      n       Go to the next newsgroup with unread news.
  171.  
  172.      N       Go to the next newsgroup.
  173.  
  174.      p       Go to the previous newsgroup with unread  news.   If
  175.              there is none, stay at the current newsgroup.
  176.  
  177.      P       Go to the previous newsgroup.
  178.  
  179.      -       Go to the previously displayed newsgroup (regardless
  180.              of  whether it is before or after the current one in
  181.              the list).
  182.  
  183.      1       Go to the first newsgroup.
  184.  
  185.      ^       Go to the first newsgroup with unread news.
  186.  
  187.      $       Go to the end of the newsgroups list.
  188.  
  189.      g newsgroup
  190.              Go to newsgroup.  If it isn't  currently  subscribed
  191.  
  192.  
  193.  
  194. Sun Release 4.1        Last change: LOCAL                       3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. TRN(1)                   USER COMMANDS                     TRN(1)
  202.  
  203.  
  204.  
  205.              to, you will be asked if you want to subscribe.
  206.  
  207.      /pattern
  208.              Scan forward for a newsgroup matching pattern.  Pat-
  209.              terns  do  globbing  like  filenames, i.e., use ? to
  210.              match a single character, * to match any sequence of
  211.              characters,  and  [] to specify a list of characters
  212.              to match.  ("all" may be used as a synonym for "*".)
  213.              Unlike normal filename globbing, newsgroup searching
  214.              is not  anchored  to  the  front  and  back  of  the
  215.              filename, i.e. "/ski" will find rec.skiing.  You may
  216.              use ^ or $ to  anchor  the  front  or  back  of  the
  217.              search: "/^test$" will find newsgroup test and noth-
  218.              ing else If you want to include  newsgroups  with  0
  219.              unread articles, append /r.  If the newsgroup is not
  220.              found between the current  newsgroup  and  the  last
  221.              newsgroup, the search will wrap around to the begin-
  222.              ning.
  223.  
  224.      ?pattern
  225.              Same as /, but search backwards.
  226.  
  227.      u       Unsubscribe from the current newsgroup.
  228.  
  229.      l string
  230.              List newsgroups not subscribed to which contain  the
  231.              string specified.
  232.  
  233.      L       Lists the current state of the .newsrc,  along  with
  234.              status information.
  235.  
  236.                   Status         Meaning
  237.                   <number>       Count of unread articles in newsgroup.
  238.                   READ           No unread articles in newsgroup.
  239.                   UNSUB          Unsubscribed newsgroup.
  240.                   BOGUS          Bogus newsgroup.
  241.                   JUNK           Ignored line in .newsrc
  242.                                  (e.g. readnews "options" line).
  243.  
  244.              (A bogus newsgroup is one that is not in the list of
  245.              active  newsgroups in the active file, which on most
  246.              systems  is  /usr/lib/news/active  unless  you   use
  247.              NNTP.)
  248.  
  249.      m name  Move the  named  newsgroup  somewhere  else  in  the
  250.              .newsrc.  If no name is given, the current newsgroup
  251.              is moved.  There are a number  of  ways  to  specify
  252.              where  you  want the newsgroup--type h for help when
  253.              it asks where you want to put it.
  254.  
  255.      c       Catch up--mark all unread articles in this newsgroup
  256.              as read.
  257.  
  258.  
  259.  
  260. Sun Release 4.1        Last change: LOCAL                       4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. TRN(1)                   USER COMMANDS                     TRN(1)
  268.  
  269.  
  270.  
  271.      o pattern
  272.              Only display those  newsgroups  whose  name  matches
  273.              pattern.   Patterns are the same as for the '/' com-
  274.              mand.  Multiple patterns may be separated by spaces,
  275.              just  as  on the command line.  The restriction will
  276.              remain in effect either until there are no  articles
  277.              left in the restricted set of newsgroups, or another
  278.              restriction command  is  given.   Since  pattern  is
  279.              optional, 'o' by itself will remove the restriction.
  280.  
  281.      a pattern
  282.              Add new  newsgroups  matching  pattern.   Newsgroups
  283.              which are already in your .newsrc file, whether sub-
  284.              scribed to or not, will not be listed.  If  any  new
  285.              newsgroups are found, you will be asked for each one
  286.              whether you would like to add it.  If  you  want  to
  287.              add  all  new  newsgroups, you can type 'Y' and they
  288.              will be added the the end of the .newsrc file and as
  289.              groups  you want to read.  If you don't want to sub-
  290.              scribe, all the new groups can be  added  by  typing
  291.              'N'.   After any new newsgroups have been added, the
  292.              'a' command also restricts the current set of  news-
  293.              groups just like the 'o' command does.
  294.  
  295.      &       Print  out  the  current  status  of  command   line
  296.              switches and any newsgroup restrictions.
  297.  
  298.      &switch {switch}
  299.              Set additional command line switches.
  300.  
  301.      &&      Print out the current macro definitions.
  302.  
  303.      &&keys commands
  304.              Define additional macros.
  305.  
  306.      !command
  307.              Escape to a  subshell.   One  exclamation  mark  (!)
  308.              leaves  you  in  your  own news directory.  A double
  309.              exclamation mark (!!) leaves you in the spool direc-
  310.              tory   for   news,   which   on   most   systems  is
  311.              /usr/spool/news if NNTP  is  not  being  used.   The
  312.              environment  variable SHELL will be used if defined.
  313.              If command is null, an interactive shell is started.
  314.  
  315.      q       Quit.
  316.  
  317.      x       Quit, restoring .newsrc to its state at  startup  of
  318.              trn.   The  .newsrc  you  would  have had if you had
  319.              exited with 'q' will be called .newnewsrc,  in  case
  320.              you didn't really want to type 'x'.
  321.  
  322.  
  323.  
  324.  
  325.  
  326. Sun Release 4.1        Last change: LOCAL                       5
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333. TRN(1)                   USER COMMANDS                     TRN(1)
  334.  
  335.  
  336.  
  337.      ^K      Edit the global KILL file.  This  is  a  file  which
  338.              contains  /pattern/j  commands  (one per line) to be
  339.              applied to every newsgroup as it is started up, that
  340.              is,  when  it is selected on the newsgroup selection
  341.              level.  The purpose of a KILL file is to mark  arti-
  342.              cles  as  read on the basis of some set of patterns.
  343.              This saves considerable wear and tear  on  your  'n'
  344.              key.  There is also a local KILL file for each news-
  345.              group.  Because of the overhead involved in  search-
  346.              ing  for  articles to kill, it is better if possible
  347.              to use a local KILL  file.   Local  KILL  files  are
  348.              edited  with  a '^K' on the article selection level.
  349.              There are also automatic ways of adding search  com-
  350.              mands  to  the  local KILL file--see the 'K' and 'T'
  351.              commands, and the K search modifier on  the  article
  352.              selection level.
  353.  
  354.              If either of the  environment  variables  VISUAL  or
  355.              EDITOR is set, the specified editor will be invoked;
  356.              otherwise  a  default  editor  (normally  vi(1))  is
  357.              invoked on the KILL file.
  358.  
  359.      Thread Selection Level
  360.  
  361.      Most people who don't have all day to read news will want to
  362.      enter  a  newsgroup  by way of the thread selector.  This is
  363.      accomplished by using  the  '+'  command  at  the  newsgroup
  364.      selection  level.   In fact, this may be the default command
  365.      for entering a newsgroup, depending on how your  version  of
  366.      trn  was  configured (see the -X option for how to turn this
  367.      default on or off).  The thread selector displays a list  of
  368.      article  subjects  and  (optionally)  authors  grouped  into
  369.      threads.  A thread may contain multiple subjects if the sub-
  370.      ject changes as the discussion continues.  Also displayed is
  371.      a count of the number of unread  articles  in  each  thread.
  372.      Each  thread  is  preceded by a letter or number that can be
  373.      typed to select it.  Selected threads  are  flagged  with  a
  374.      '+'.
  375.  
  376.      The default is to display the long mode of the thread selec-
  377.      tor.   In  this mode, all the authors of the articles in the
  378.      thread are summarized, one per  line  (authors  of  multiple
  379.      articles  are  listed  only  once).  The medium display mode
  380.      groups multiple authors onto the same  line,  so  that  more
  381.      threads  can  be  displayed  at one time.  The short display
  382.      mode does not display any author names, and can display more
  383.      characters in the subject.
  384.  
  385.      The following commands are available in the thread selector:
  386.  
  387.      a-z,0-9 Select  the  discussion  thread  by  its  letter  or
  388.              number;  press  again  to  deselect.  By default the
  389.  
  390.  
  391.  
  392. Sun Release 4.1        Last change: LOCAL                       6
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399. TRN(1)                   USER COMMANDS                     TRN(1)
  400.  
  401.  
  402.  
  403.              letters h, k, n, p, q, and y are  omitted  to  allow
  404.              them  to  be  typed  as  commands.  See the variable
  405.              SELECTCHARS to customize this.
  406.  
  407.      SP      Perform the default command.  This is usually >  for
  408.              most pages, and Z on the last page (although D and X
  409.              are also quite popular).
  410.  
  411.      CR      Read the current thread (if none  are  selected)  or
  412.              all the selected threads.
  413.  
  414.      Z,TAB   Begin reading the selected threads.  If none are are
  415.              selected, read everything.
  416.  
  417.      y, '.'  Toggle the current thread's selection (the one under
  418.              the cursor).
  419.  
  420.      k, ','  Mark the current thread as killed.
  421.  
  422.      m, \    Unmark the current thread.
  423.  
  424.      -       Set a range, as in 2 - 5.  Repeats the last  marking
  425.              action:  selected, unselected, killed, or unmarked.
  426.  
  427.      @       Toggle all visible article selections.
  428.  
  429.      <       Go to previous page.
  430.  
  431.      >       Go to next page.
  432.  
  433.      p, [    Move up to the previous thread.
  434.  
  435.      n, ]    Move down to the next thread.
  436.  
  437.      ^       Go to first page.
  438.  
  439.      $       Go to last page.
  440.  
  441.      X       Mark all unselected articles as read and start read-
  442.              ing.
  443.  
  444.      J       Mark all selected articles  as  read  (useful  after
  445.              performing  some  action  on  them with the ':' com-
  446.              mand).
  447.  
  448.      D       Mark unselected articles  on  the  current  page  as
  449.              read.   Begin reading if articles are selected, oth-
  450.              erwise go to the next page.
  451.  
  452.      ^K      Edit the local KILL  file  for  this  newsgroup.   A
  453.              detailed  description  of KILL files is found in the
  454.              Article Selection section.
  455.  
  456.  
  457.  
  458. Sun Release 4.1        Last change: LOCAL                       7
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465. TRN(1)                   USER COMMANDS                     TRN(1)
  466.  
  467.  
  468.  
  469.      :command
  470.              Execute a command upon all the selected threads  and
  471.              their  articles.   If  no  threads are selected, all
  472.              threads with unread articles are affected.
  473.  
  474.              Applicable commands include '+' and '-' (select  and
  475.              unselect  thread),  'T'  (trash  the thread into the
  476.              local KILL file), 't'  (display  article  tree),  "s
  477.              dest"  (save  article  to  a  destination),  "e dir"
  478.              (extract to directory), 'E' (end partial  uudecode),
  479.              as well as: S, |, w, W, m, M, j, = and ','.
  480.  
  481.      /pattern
  482.              Scan all articles for a subject  containing  pattern
  483.              and select its thread.
  484.  
  485.      /pattern/modifiers:command{:command}
  486.              Apply the commands listed to articles  matching  the
  487.              search  command  (possibly with h, a, r, or K modif-
  488.              iers).  The default action, if no command is  speci-
  489.              fied, is to select the parent thread of the matching
  490.              article (the '+' command).  See the section on Regu-
  491.              lar  Expressions,  and  the  description  of pattern
  492.              searching in the Article Selection section.
  493.  
  494.              One example:  to scan all the unread articles  look-
  495.              ing  for  "topic"  anywhere  in the article and then
  496.              select its thread and save the article to the  files
  497.              topic.1, topic.2, etc. use "/topic/a:+:s topic.%#".
  498.  
  499.      N       Go to the next newsgroup with unread news.
  500.  
  501.      P       Go to the previous newsgroup with unread news.
  502.  
  503.      U       Switch between selecting read/unread articles.
  504.  
  505.      L       Switch the current display mode between the long and
  506.              medium  modes  (with  authors)  and  the short mode.
  507.              (See the -x option to select your favorite  mode  as
  508.              the default.)
  509.  
  510.      &       Display or set the current status  of  command  line
  511.              switches.
  512.  
  513.      &&      Display or set the current macro definitions.
  514.  
  515.      !command
  516.              Escape to a subshell.
  517.  
  518.      q       Quit this group.
  519.  
  520.  
  521.  
  522.  
  523.  
  524. Sun Release 4.1        Last change: LOCAL                       8
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531. TRN(1)                   USER COMMANDS                     TRN(1)
  532.  
  533.  
  534.  
  535.      ESC,+   Quit the  thread  selector  (back)  to  the  article
  536.              level.
  537.  
  538.      Q       Quit the current newsgroup and return to  the  news-
  539.              group selection prompt for this group.
  540.  
  541.      Article Selection Level
  542.  
  543.      On the article selection level, trn displays unread articles
  544.      in  thread  sequence,  reading  each article and its replies
  545.      before going on to another topic.  If threads  are  disabled
  546.      for  a  particular  group,  the  default order is in numeric
  547.      sequence (the order they arrived at your  site)  unless  you
  548.      use  subject  search  (^N) to change the default order to be
  549.      numerical order  within  each  matching  subject.   (The  -S
  550.      switch  can  be used to make subject search mode the default
  551.      for unthreaded groups.)
  552.  
  553.      On the article selection level you are not asked whether you
  554.      want  to  read  an  article before the article is displayed;
  555.      rather, trn simply displays the first page (or portion of  a
  556.      page, at low baud rates) of the article and asks if you want
  557.      to continue.  The normal article selection prompt  comes  at
  558.      the  END  of  the article (though article selection commands
  559.      can be given from within the  middle  of  the  article  (the
  560.      pager  level)  also).   The  prompt at the end of an article
  561.      looks like this:
  562.  
  563.      End of article 248 (of 257)--what next? [npq]
  564.  
  565.      The following are the options at this point:
  566.  
  567.      n,SP    Scan forward for next unread  article.   (Note:  the
  568.              'n' (next) command when typed at the end of an arti-
  569.              cle does not mark the  article  as  read,  since  an
  570.              article  is  automaticaly  marked  as read after the
  571.              last line of it is printed.  It is therefore  possi-
  572.              ble  to  type  a sequence such as 'mn' and leave the
  573.              article marked as unread.  The fact that an  article
  574.              is marked as read by typing n, N, ^N, e, s, S, |, w,
  575.              or W within the MIDDLE of the article is in  fact  a
  576.              special case.)
  577.  
  578.      N       Go to the next article.
  579.  
  580.      ^N      Scan forward for the next article with the same sub-
  581.              ject.   If  the  group is unthreaded this also makes
  582.              subject search mode (^N) the default.
  583.  
  584.      p       Scan backward for previous unread article.  If there
  585.              is none, stay at the current article.
  586.  
  587.  
  588.  
  589.  
  590. Sun Release 4.1        Last change: LOCAL                       9
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597. TRN(1)                   USER COMMANDS                     TRN(1)
  598.  
  599.  
  600.  
  601.      P       Go to the previous article.
  602.  
  603.      -       Go to the previously displayed  article  (regardless
  604.              of  whether  that  article  is  before or after this
  605.              article in the normal sequence).
  606.  
  607.      ^P      Scan backward for the previous article with the same
  608.              subject.  Makes subject search mode (^N) the default
  609.              if the group is unthreaded.
  610.  
  611.      <,>     Browse the previous/next  selected  thread.   If  no
  612.              selections  have been made, all the threads that had
  613.              unread news when you entered the newsgroup (or  last
  614.              left  the  thread selector) are treated as selected.
  615.              Entering an empty newsgroup makes all  the  already-
  616.              read threads available for browsing.
  617.  
  618.      [,]     Proceed to  the  left/right  in  the  article  tree.
  619.              Visits already-read articles as well as empty nodes.
  620.              If you attempt to go past the left/right edge of the
  621.              tree,  you are advanced to the previous/next line if
  622.              available.
  623.  
  624.      {,}     Go to the root/leaf of the article tree, even if the
  625.              node is already read or empty.  Proceeds to the very
  626.              first/last node if you're already at a root/leaf  in
  627.              a multi-root thread.
  628.  
  629.      t       Display the entire article tree and all its  associ-
  630.              ated  subjects.   If  the  group  is  not  currently
  631.              threaded, it will be  turned  on  and  processed  as
  632.              needed.
  633.  
  634.      ^R      Restart the current article.
  635.  
  636.      v       Restart the current  article  verbosely,  displaying
  637.              the entire header.
  638.  
  639.      ^L      Refresh the screen.
  640.  
  641.      ^X      Restart the current article, and decrypt as a  rot13
  642.              message.
  643.  
  644.      X       Refresh the screen, and decrypt as a rot13 message.
  645.  
  646.      b       Back up one page.
  647.  
  648.      q       Quit this newsgroup and go  back  to  the  newsgroup
  649.              selection level.
  650.  
  651.      ^       Go to the first unread article.
  652.  
  653.  
  654.  
  655.  
  656. Sun Release 4.1        Last change: LOCAL                      10
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663. TRN(1)                   USER COMMANDS                     TRN(1)
  664.  
  665.  
  666.  
  667.      $       Go to the last article (actually, one past the  last
  668.              article).
  669.  
  670.      number  Go to the numbered article.
  671.  
  672.      range{,range}:command{:command}
  673.              Apply a set of commands to a  set  of  articles.   A
  674.              range   consists   of  either  <article  number>  or
  675.              <article number>-<article number>.    A   dot    '.'
  676.              represents  the  current  article, and a dollar sign
  677.              '$' represents the last article.
  678.  
  679.              Applicable commands include 'm'  (mark  as  unread),
  680.              'M' (delayed mark as unread), 'j' (mark as read), "s
  681.              dest" (save to a destination), "e dir"" (extract  to
  682.              directory),  "!command"  (shell  escape), "=" (print
  683.              the subject), 'T' (trash the thread into  the  local
  684.              KILL  file),  '+' (select the thread), '-' (deselect
  685.              the thread), 'C' (cancel), as well as S,  |,  w,  W,
  686.              and t.
  687.  
  688.      :command
  689.              Apply a command to all selected  threads  and  their
  690.              articles.   If  no  threads  are selected, apply the
  691.              command to all the unread threads.   For  applicable
  692.              commands,  see  the  discussion  above for the range
  693.              command.
  694.  
  695.      j       Junk the current article--mark it as read.  If  this
  696.              command is used from within an article, you are left
  697.              at the end of the article, unlike 'n',  which  looks
  698.              for the next article.
  699.  
  700.      m       Mark the current article as still unread.   (If  you
  701.              are  in subject search mode you probably want to use
  702.              M instead of m.  Otherwise the current  article  may
  703.              be  selected  as  the  beginning of the next subject
  704.              thread.)
  705.  
  706.      M       Mark the current article as still  unread,  but  not
  707.              until  the  newsgroup  is  exited.   Until then, the
  708.              current article will be marked  as  read.   This  is
  709.              useful  for  returning to an article in another ses-
  710.              sion, or in another newsgroup.
  711.  
  712.      /pattern
  713.              Scan forward for article containing pattern  in  the
  714.              subject.    See  the  Regular  Expressions  section.
  715.              Together  with  the  escape  substitution   facility
  716.              described later, it becomes easy to search for vari-
  717.              ous attributes of the current article, such as  sub-
  718.              ject,  article  ID,  author name, etc.  The previous
  719.  
  720.  
  721.  
  722. Sun Release 4.1        Last change: LOCAL                      11
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729. TRN(1)                   USER COMMANDS                     TRN(1)
  730.  
  731.  
  732.  
  733.              pattern can be recalled with "<esc>/".   If  pattern
  734.              is omitted, the previous pattern is assumed.
  735.  
  736.      /pattern/h
  737.              Scan forward for article containing pattern  in  the
  738.              header.
  739.  
  740.      /pattern/a
  741.              Scan forward for article containing pattern anywhere
  742.              in article.
  743.  
  744.      /pattern/r
  745.              Scan read articles also.
  746.  
  747.      /pattern/c
  748.              Make search case sensitive.  Ordinarily  upper-  and
  749.              lower-case are considered the same.
  750.  
  751.      /pattern/modifiers:command{:command}
  752.              Apply the commands listed to articles  matching  the
  753.              search command (possibly with h, a, or r modifiers).
  754.              Applicable commands include 'm'  (mark  as  unread),
  755.              'M' (delayed mark as unread), 'j' (mark as read), "s
  756.              dest" (save to a destination), "e dir"" (extract  to
  757.              directory),  "!command"  (shell  escape), "=" (print
  758.              the subject), 'T' (trash the associated  thread  and
  759.              put  it  in  the  local  KILL file), '+' (select the
  760.              associated  thread),  '-'  deselect  the  associated
  761.              thread),  and 'C' (cancel).  If the first command is
  762.              'm' or 'M', modifier r  is  assumed.   A  K  may  be
  763.              included  in  the  modifiers  (not  the commands) to
  764.              cause the entire command (sans K) to be saved to the
  765.              local  KILL  file, where it will be applied to every
  766.              article that shows up in the newsgroup.
  767.  
  768.              For example, to save all articles in a  given  news-
  769.              group  to  the  line printer and mark them read, use
  770.              "/^/|lpr:j".  If you type  "/^/K|lpr:j",  this  will
  771.              happen every time you enter the newsgroup.
  772.  
  773.      ?pattern
  774.              Scan backward for article containing pattern in  the
  775.              subject.   May be modified as the forward search is:
  776.              ?pattern?modifiers[:commands].  It  is  likely  that
  777.              you will want an r modifier when scanning backward.
  778.  
  779.      k       Mark as read all articles with the same  subject  as
  780.              the  current  article.   (Note:  there  is no single
  781.              character command to temporarily  mark  as  read  (M
  782.              command)  articles  matching  the  current  subject.
  783.              That can be done with "/<esc>s/M", however.)
  784.  
  785.  
  786.  
  787.  
  788. Sun Release 4.1        Last change: LOCAL                      12
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795. TRN(1)                   USER COMMANDS                     TRN(1)
  796.  
  797.  
  798.  
  799.      ,       Mark the current article  and  all  its  replies  as
  800.              read.
  801.  
  802.      J       Junk all the articles in the thread, even if it con-
  803.              tains multiple subjects.
  804.  
  805.      K       Do the same as the k command, but also add a line to
  806.              the  local KILL file for this newsgroup to kill this
  807.              subject every time the newsgroup is started up.  For
  808.              a  discussion  of  KILL  files, see the '^K' command
  809.              below.  See also the K modifier on searches above.
  810.  
  811.      T       Kill the current thread, and also add a line to  the
  812.              local KILL file for this newsgroup to kill new arti-
  813.              cles attached to this thread every  time  the  news-
  814.              group is started up.
  815.  
  816.      ^K      Edit the local KILL file for this  newsgroup.   Each
  817.              line  of  the  KILL file should be a subject-killing
  818.              command of the form /pattern/j or a  thread  killing
  819.              command  of  the form T<number>.  The thread killing
  820.              commands are usually followed by a  comment  to  let
  821.              you  know the primary subject of the numbered thread
  822.              being killed.  The first line in the KILL  file  has
  823.              the  form  "THRU <number>", which tells trn the max-
  824.              imum article number that  the  KILL  file  has  been
  825.              applied  to.  (You may delete the THRU line to force
  826.              a rescan of current articles.)  You  may  also  have
  827.              reason  to use the m, h, or a modifiers.  Be careful
  828.              with the M modifier in a kill file--there  are  more
  829.              efficient  ways to never read an article.  You might
  830.              have reason to use it  if  a  particular  series  of
  831.              articles  is posted to multiple newsgroups.  In this
  832.              case, M would force you to view  the  article  in  a
  833.              different newsgroup.
  834.  
  835.              To see only newgroup articles in the  control  news-
  836.              group, for instance, you might put
  837.  
  838.              /^/j
  839.              /newgroup/m
  840.  
  841.              which kills all subjects not containing  "newgroup".
  842.              You  can  add  lines automatically via the K command
  843.              and K search modifiers, but editing is the only  way
  844.              to remove lines.  If either of the environment vari-
  845.              ables VISUAL or EDITOR is set, the specified  editor
  846.              will  be  invoked;  otherwise a default editor (nor-
  847.              mally vi) is invoked on the KILL file.
  848.  
  849.              The KILL file may also contain switch setting  lines
  850.              beginning   with   '&'.    Additionally,   any  line
  851.  
  852.  
  853.  
  854. Sun Release 4.1        Last change: LOCAL                      13
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861. TRN(1)                   USER COMMANDS                     TRN(1)
  862.  
  863.  
  864.  
  865.              beginning with 'X' is  executed  on  exit  from  the
  866.              newsgroup rather than on entrance.  This can be used
  867.              to set switches back to a default  value.   One  use
  868.              for this capability is to set your save directory to
  869.              a custom value upon entry to a newsgroup and set  it
  870.              back  on  exit using the -ESAVEDIR option.  See also
  871.              the -/ option for another solution to multiple  save
  872.              directories without using KILL files.
  873.  
  874.      r       Reply through net mail.  The  environment  variables
  875.              MAILPOSTER  and MAILHEADER may be used to modify the
  876.              mailing behavior of trn (see  environment  section).
  877.              If  on  a  nonexistent  article  such as the "End of
  878.              newsgroup" pseudo-article (which you can get to with
  879.              a '$' command), invokes the mailer to nobody in par-
  880.              ticular.
  881.  
  882.      R       Reply, including the current article in  the  header
  883.              file  generated.  (See 'F' command below).  The YOU-
  884.              SAID environment variable controls the format of the
  885.              attribution line.
  886.  
  887.      f       Submit a followup  article.   If  on  a  nonexistent
  888.              article  such  as  the  "End  of  newsgroup" pseudo-
  889.              article (which you can get to with a  '$'  command),
  890.              posts an original article (basenote).
  891.  
  892.      F       Submit a followup article, and include the old arti-
  893.              cle,  with  lines  prefixed  either by ">" or by the
  894.              argument to a -F switch.  Trn will attempt  to  pro-
  895.              vide  an  attribution  line  in  front of the quoted
  896.              article, generated from the From: line of the  arti-
  897.              cle.   Unfortunately,  the From: line doesn't always
  898.              contain the right name; you should double  check  it
  899.              against the signature and change it if necessary, or
  900.              you may have to apologize for quoting the wrong per-
  901.              son.   The  environment  variables NEWSPOSTER, NEWS-
  902.              HEADER and ATTRIBUTION may be  used  to  modify  the
  903.              posting behavior of trn (see environment section).
  904.  
  905.              If you are starting a new subject, move to  the  end
  906.              of  the newsgroup with the '$' command before press-
  907.              ing 'f'.  Otherwise you may have  to  do  a  lot  of
  908.              header  editing,  including  removing the References
  909.              line -- this is  IMPORTANT  to  remember  ONLY  when
  910.              starting  a  new  subject.   It  is  much simpler to
  911.              remember "$f" for new subjects, and to allways leave
  912.              the References line alone.
  913.  
  914.      C       Cancel the current article, but only if you are  the
  915.              contributor or superuser.
  916.  
  917.  
  918.  
  919.  
  920. Sun Release 4.1        Last change: LOCAL                      14
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927. TRN(1)                   USER COMMANDS                     TRN(1)
  928.  
  929.  
  930.  
  931.      z       Supersede the current article, but only if  you  are
  932.              the contributor.
  933.  
  934.      c       Catch up in this newsgroup; i.e., mark all  articles
  935.              as read.
  936.  
  937.      U       Mark some or all articles as unread.  You can choose
  938.              to  mark the current thread, sub-thread (the current
  939.              article and its replies), all the articles, or start
  940.              up the thread selector to choose specific threads to
  941.              set unread.
  942.  
  943.      u       Unsubscribe from this newsgroup.
  944.  
  945.      s destination
  946.              Save to a filename or pipe using sh.  If  the  first
  947.              character  of the destination is a vertical bar, the
  948.              rest of the command is considered a shell command to
  949.              which  the article is passed through standard input.
  950.              The command is subject to filename expansion.   (See
  951.              also  the  environment  variable  PIPESAVER.) If the
  952.              destination does not begin with a vertical bar,  the
  953.              rest  of  the command is assumed to be a filename of
  954.              some sort.  An initial tilde '~' will be  translated
  955.              to  the  name  of the home directory, and an initial
  956.              environment variable substitution is  also  allowed.
  957.              If  only a directory name is specified, the environ-
  958.              ment variable  SAVENAME  is  used  to  generate  the
  959.              actual  name.   If a non-absolute filename is speci-
  960.              fied, the environment variable SAVEDIR will be  used
  961.              to  generate  the  actual  directory.  If nothing is
  962.              specified, then obviously  both  variables  will  be
  963.              used.   Since  the  current  directory for trn while
  964.              doing a save command is your private news directory,
  965.              typing  "s  ./filename"  will force the file to your
  966.              news directory.  Save commands are also run  through
  967.              %   interpretation,   so   that  you  can  enter  "s
  968.              %O/filename" to save to the directory  you  were  in
  969.              when  you  ran trn, and "s %t" to save to a filename
  970.              consisting of the Internet address of the sender.
  971.  
  972.              After generating the full pathname of  the  file  to
  973.              save  to, trn determines if the file exists already,
  974.              and if so, appends  to  it.   trn  will  attempt  to
  975.              determine if an existing file is a mailbox or a nor-
  976.              mal file, and save the article in the  same  format.
  977.              If  the  output file does not yet exist, trn will by
  978.              default ask you which format you want,  or  you  can
  979.              make  it  skip the question with either the -M or -N
  980.              switch.  If the article is to be  saved  in  mailbox
  981.              format,  the  command to do so is generated from the
  982.              environment    variable    MBOXSAVER.     Otherwise,
  983.  
  984.  
  985.  
  986. Sun Release 4.1        Last change: LOCAL                      15
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993. TRN(1)                   USER COMMANDS                     TRN(1)
  994.  
  995.  
  996.  
  997.              NORMSAVER is used.
  998.  
  999.      S destination
  1000.              Save to a filename or pipe using a preferred  shell,
  1001.              such  as  csh.  Which shell is used depends first on
  1002.              what you have the environment variable SHELL set to,
  1003.              and  in  the  absence  of  that,  on  what your news
  1004.              administrator set for the preferred shell when he or
  1005.              she installed trn.
  1006.  
  1007.      | command
  1008.              Shorthand for "s | command".
  1009.  
  1010.      w destination
  1011.              The same as "s destination", but saves  without  the
  1012.              header.
  1013.  
  1014.      W destination
  1015.              The same as "S destination", but saves  without  the
  1016.              header.
  1017.  
  1018.      e directory
  1019.              Extract a shell archive or uuencoded binary  to  the
  1020.              designated  directory.  The article is first scanned
  1021.              to try discover what type of data  is  encapsulated.
  1022.              If  a  "cut here" line is found, the first non-blank
  1023.              line after it must be either the  start  of  a  shar
  1024.              header,  or  the  "begin" or "table" line of a uuen-
  1025.              coded binary.  The default for extracting  shars  is
  1026.              to send the data portion of the file to /bin/sh, but
  1027.              that can be overridden with the UNSHAR variable (see
  1028.              the ENVIRONMENT section).  Uudecoding is done inter-
  1029.              nally by a decoder that can handle  the  data  being
  1030.              split  up  over multiple articles, and extracted one
  1031.              piece at a time.  To decode  a  multi-article  file,
  1032.              either  execute  the  'e' command in each article in
  1033.              sequence, use an article range to execute  the  com-
  1034.              mand,  or use the ":e" command to repeat the command
  1035.              for each of the currently selected  articles.   When
  1036.              the 'e' command is not followed by any arguments, it
  1037.              will repeat the arguments from the last  extraction.
  1038.              All  directory  specifications  are  relative to the
  1039.              value of SAVEDIR, so you can use the command  "e  ."
  1040.              to  force  an  extraction  to  SAVEDIR itself.  If a
  1041.              uudecoding is  in  progress  (i.e.  the  last  piece
  1042.              wasn't  extracted  yet)  and you exit the group, the
  1043.              partial file will be removed.  This also  occurs  if
  1044.              you start to extract a new uuencoded file before the
  1045.              previous one was finished.  See also the 'E' command
  1046.              for ending a multi-part uudecoding manually.
  1047.  
  1048.              There  is  one  special   case   that   is   handled
  1049.  
  1050.  
  1051.  
  1052. Sun Release 4.1        Last change: LOCAL                      16
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059. TRN(1)                   USER COMMANDS                     TRN(1)
  1060.  
  1061.  
  1062.  
  1063.              differently:   if  the  first file in a recognizable
  1064.              shar file is a uuencoded binary that was packed with
  1065.              lines  starting  with an 'X', we will not unshar the
  1066.              file but instead uudecode it.  If this causes  prob-
  1067.              lems, you can override the default extraction method
  1068.              by following the directory with an explicit  command
  1069.              to execute, as described below.
  1070.  
  1071.      e directory|command
  1072.              This form of the 'e' command allows you  to  extract
  1073.              other  data  formats than shar or uuencoded files or
  1074.              to override the  decisions  made  by  the  automatic
  1075.              extraction  selection  described  above.   In normal
  1076.              operation, all data following what we recognize as a
  1077.              "cut  here"  line will be sent to the specified com-
  1078.              mand.  Additionally, the distinctive beginning of  a
  1079.              shell archive is also recognized without a preceding
  1080.              cut line.  When the  command  is  run,  the  default
  1081.              directory will be set to the specified directory, or
  1082.              the value of SAVEDIR if unspecified.   Entering  the
  1083.              'e'  command without arguments will repeat your pre-
  1084.              vious extract command.  You can use the  command  "e
  1085.              dir|"  to  extract  to  a  new  directory  using the
  1086.              previously-specified command.
  1087.  
  1088.      E       This command  ends  any  multi-part  uuencoded  file
  1089.              extraction that you began, but are unable (or unwil-
  1090.              ling) to complete.  The partially extracted file  is
  1091.              removed.
  1092.  
  1093.      &       Print  out  the  current  status  of  command   line
  1094.              switches.
  1095.  
  1096.      &switch {switch}
  1097.              Set additional command line switches.
  1098.  
  1099.      &&      Print out current macro definitions.
  1100.  
  1101.      &&keys commands
  1102.              Define an additional macro.
  1103.  
  1104.      !command
  1105.              Escape to a  subshell.   One  exclamation  mark  (!)
  1106.              leaves  you  in  your  own news directory.  A double
  1107.              exclamation mark (!!) leaves you in the spool direc-
  1108.              tory  of  the  current  newsgroup.   The environment
  1109.              variable SHELL will be used if defined.  If  command
  1110.              is null, an interactive shell is started.
  1111.  
  1112.              You can use escape key substitutions described later
  1113.              to get to many run-time values.  The command is also
  1114.              run through % interpretation, in case  it  is  being
  1115.  
  1116.  
  1117.  
  1118. Sun Release 4.1        Last change: LOCAL                      17
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125. TRN(1)                   USER COMMANDS                     TRN(1)
  1126.  
  1127.  
  1128.  
  1129.              called from a range or search command.
  1130.  
  1131.      +       Start the thread  selector.   If  the  newsgroup  is
  1132.              unthreaded, the subject lister is called instead.
  1133.  
  1134.      =       List subjects of unread articles.
  1135.  
  1136.      #       Print last article number.
  1137.  
  1138.      Pager Level
  1139.  
  1140.      At the pager level (within an  article),  the  prompt  looks
  1141.      like this:
  1142.  
  1143.      --MORE--(17%)
  1144.  
  1145.      and a number of commands may be given:
  1146.  
  1147.      SP      Display next page.
  1148.  
  1149.      x       Display next page and decrypt as a rot13 message.
  1150.  
  1151.      d       Display half a page more.
  1152.  
  1153.      CR      Display one more line.
  1154.  
  1155.      q       Go to the end of the current article (don't mark  it
  1156.              either  read  or  unread).   Leaves you at the "What
  1157.              next?" prompt.
  1158.  
  1159.      j       Junk the current article.  Mark it read  and  go  to
  1160.              the end of the article.
  1161.  
  1162.      ^L      Refresh the screen.
  1163.  
  1164.      X       Refresh the screen and decrypt as a rot13 message.
  1165.  
  1166.      b       Back up one page.
  1167.  
  1168.      t       Display the entire article tree, including its asso-
  1169.              ciated subjects, and continue reading.  If the group
  1170.              is not currently threaded, it will be turned on  and
  1171.              processed as needed.
  1172.  
  1173.      gpattern
  1174.              Goto (search forward  for)  pattern  within  current
  1175.              article.   Note  that  there is no space between the
  1176.              command and the pattern.  If the pattern  is  found,
  1177.              the  page  containing the pattern will be displayed.
  1178.              Where on the page the line matching the pattern goes
  1179.              depends  on  the value of the -g switch.  By default
  1180.              the matched line goes at the top of the screen.
  1181.  
  1182.  
  1183.  
  1184. Sun Release 4.1        Last change: LOCAL                      18
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191. TRN(1)                   USER COMMANDS                     TRN(1)
  1192.  
  1193.  
  1194.  
  1195.      G       Search for g pattern again.
  1196.  
  1197.      ^G      This is a special version of the 'g' command that is
  1198.              for skipping articles in a digest.  It is equivalent
  1199.              to setting "-g4"  and  then  executing  the  command
  1200.              "g^Subject:".
  1201.  
  1202.      TAB     This is another special version of the  'g'  command
  1203.              that  is  for skipping inclusions of older articles.
  1204.              It is equivalent to setting "-g4" and then executing
  1205.              the command "g^[^c]", where c is the first character
  1206.              of the last line on the screen.  It searches for the
  1207.              first  line that doesn't begin with the same charac-
  1208.              ter as the last line on the screen.
  1209.  
  1210.      !command
  1211.              Escape to a subshell.
  1212.  
  1213.      The following commands skip the rest of the current article,
  1214.      then  behave  just as if typed to the "What next?" prompt at
  1215.      the end of the article.  See the documentation at the  arti-
  1216.      cle selection level for these commands.
  1217.  
  1218.          # $ & / = ? c C f F k K T ^K J , m M r R ^R u U v Y ^
  1219.          p P ^P - < > [ ] { } number
  1220.          range{,range} command{:command}
  1221.  
  1222.      The following commands also skip to the end of the  article,
  1223.      but  have the additional effect of marking the current arti-
  1224.      cle as read:
  1225.  
  1226.          n N ^N e s S | w W
  1227.  
  1228.  
  1229.      Miscellaneous facts about commands
  1230.  
  1231.      An 'n' typed at either the  "Last  newsgroup"  prompt  or  a
  1232.      "Last  article"  prompt  will  cycle  back to the top of the
  1233.      newsgroup or article list,  whereas  a  'q'  will  quit  the
  1234.      level.   (Note  that  'n'  does  not  mean  "no", but rather
  1235.      "next".) A space will of course do whatever is shown as  the
  1236.      default, which will vary depending on whether trn thinks you
  1237.      have more articles or newsgroups to read.
  1238.  
  1239.      The 'b' (backup page) command  may  be  repeated  until  the
  1240.      beginning  of  the  article is reached.  If trn is suspended
  1241.      (via a ^Z), then when the job is  resumed,  a  refresh  (^L)
  1242.      will automatically be done (Berkeley-type systems only).  If
  1243.      you type a command such as '!' or 's' which takes  you  from
  1244.      the  middle  of  the  article to the end, you can always get
  1245.      back into the middle by typing '^L'.
  1246.  
  1247.  
  1248.  
  1249.  
  1250. Sun Release 4.1        Last change: LOCAL                      19
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257. TRN(1)                   USER COMMANDS                     TRN(1)
  1258.  
  1259.  
  1260.  
  1261.      In multi-character commands such as '!', 's', '/', etc,  you
  1262.      can interpolate various run-time values by typing escape and
  1263.      a character.  To find out what  you  can  interpolate,  type
  1264.      escape  and 'h', or check out the single character % substi-
  1265.      tutions for environment variables in the Interpretation  and
  1266.      Interpolation  section,  which  are the same.  Additionally,
  1267.      typing a double escape will cause any % substitutions in the
  1268.      string already typed in to be expanded.
  1269.  
  1270.      The Tree Display
  1271.  
  1272.      When reading a threaded newsgroup, trn displays a  character
  1273.      representation of the article tree in the upper right corner
  1274.      of the header.  For example, consider the following display:
  1275.  
  1276.          (1)+-(1)--(2)--[2]
  1277.             |-(1)+-[3]
  1278.             |    \-[1]
  1279.             \-(1)+-[1]--[1]
  1280.                  \-[1]
  1281.  
  1282.      This tree represents  an  initial  article  that  has  three
  1283.      direct  replies  (the second column with three (1)'s).  Each
  1284.      reply has further replies branching off from them.   In  two
  1285.      cases  the  subject  line was altered in the reply, as indi-
  1286.      cated by the increasing numbers.  When  there  is  only  one
  1287.      subject  associated  with a thread, all the nodes are marked
  1288.      with the number 1.  When the first subject  change  arrives,
  1289.      it  is  marked with the number 2, and so on.  If you were to
  1290.      look at this thread in the thread selector, the  three  sub-
  1291.      jects  associated  with it would be listed in the same order
  1292.      as the ascending digits.  In those  rare  cases  where  more
  1293.      than  9  subjects are associated with each thread, the nodes
  1294.      are marked with the letters A-Z, and then by a-z.  The arti-
  1295.      cles  that  have  already  been  read  are enclosed in ()'s.
  1296.      Unread  articles  are  displayed  in  []'s.   The  currently
  1297.      displayed  article  has  its  entire node highlighted in the
  1298.      display.  The previously  displayed  article  has  only  its
  1299.      number highlighted.
  1300.  
  1301.      Options
  1302.  
  1303.      Trn has a nice set of options to allow  you  to  tailor  the
  1304.      interaction  to  your  liking.  (You might like to know that
  1305.      the author swears by "-x6ls -e +m -S -XX -N".) These options
  1306.      may  be set on the command line, via the TRNINIT environment
  1307.      variable, via a file pointed to by the TRNINIT variable,  or
  1308.      from within trn via the & command.  Options may generally be
  1309.      unset by typing "+switch".  Options include:
  1310.  
  1311.      -a   causes trn to always thread a group that doesn't have a
  1312.           pre-created  thread file.  Without this option you have
  1313.  
  1314.  
  1315.  
  1316. Sun Release 4.1        Last change: LOCAL                      20
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323. TRN(1)                   USER COMMANDS                     TRN(1)
  1324.  
  1325.  
  1326.  
  1327.           to toggle each group with the 't' command at the  news-
  1328.           group prompt to force it to be read threaded even if no
  1329.           thread file for the group exists.
  1330.  
  1331.      -c   checks for news without reading news.   If  a  list  of
  1332.           newsgroups  is  given  on  the command line, only those
  1333.           newsgroups will be checked; otherwise all subscribed-to
  1334.           newsgroups  are  checked.   Whenever  the  -c switch is
  1335.           specified, a non-zero exit status from trn  means  that
  1336.           there  is unread news in one of the checked newsgroups.
  1337.           The -c switch does not disable the  printing  of  news-
  1338.           groups  with  unread news; this is controlled by the -s
  1339.           switch.  (The -c switch is not  meaningful  when  given
  1340.           via the & command.)
  1341.  
  1342.      -C<number>
  1343.           tells trn how often to checkpoint the .newsrc, in arti-
  1344.           cles  read.   Actually,  this number says when to start
  1345.           thinking about doing a checkpoint if the  situation  is
  1346.           right.  If a reasonable checkpointing situation doesn't
  1347.           arise within 10 more articles, the  .newsrc  is  check-
  1348.           pointed willy-nilly.
  1349.  
  1350.      -d<directory name>
  1351.           sets the default save directory to something other than
  1352.           ~/News.   The  directory name will be globbed (via csh)
  1353.           if necessary (and if possible).  Articles saved by  trn
  1354.           may  be  placed in the save directory or in a subdirec-
  1355.           tory thereof depending on the command that you give and
  1356.           the  state  of  the  environment  variables SAVEDIR and
  1357.           SAVENAME.  Any KILL files (see the  K  command  in  the
  1358.           Article  Selection  section) also reside in this direc-
  1359.           tory and its subdirectories, by default.  In  addition,
  1360.           shell escapes leave you in this directory.
  1361.  
  1362.      -D<flags>
  1363.           enables  debugging  output.   See  common.h  for   flag
  1364.           values.  Warning: normally trn attempts to restore your
  1365.           .newsrc when an unexpected  signal  or  internal  error
  1366.           occurs.   This is disabled when any debugging flags are
  1367.           set.
  1368.  
  1369.      -e   causes each page within an article to be started at the
  1370.           top  of  the  screen,  not just the first page.  (It is
  1371.           similar to the -c switch of more(1).) You never have to
  1372.           read  scrolling text with this switch.  This is helpful
  1373.           especially at certain baud rates because you can  start
  1374.           reading  the  top  of the next page without waiting for
  1375.           the whole page to be printed.  It works nicely in  con-
  1376.           junction  with  the  -m  switch,  especially if you use
  1377.           half-intensity for your highlight mode.  See  also  the
  1378.           -L switch.
  1379.  
  1380.  
  1381.  
  1382. Sun Release 4.1        Last change: LOCAL                      21
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389. TRN(1)                   USER COMMANDS                     TRN(1)
  1390.  
  1391.  
  1392.  
  1393.      -E<name>=<val>
  1394.           sets the  environment  variable  <name>  to  the  value
  1395.           specified.   Within trn, "&-ESAVENAME=%t" is similar to
  1396.           "setenv  SAVENAME  '%t'"  in  csh,  or  "SAVENAME='%t';
  1397.           export  SAVENAME" in sh.  Any environment variables set
  1398.           with -E will be inherited by subprocesses of trn.
  1399.  
  1400.      -F<string>
  1401.           sets the prefix string for the 'F' followup command  to
  1402.           use  in prefixing each line of the quoted article.  For
  1403.           example, "-F<tab>" inserts a tab on the front  of  each
  1404.           line  (which  will  cause  long  lines  to wrap around,
  1405.           unfortunately), "-F>>>>" inserts ">>>>" on every  line,
  1406.           and  "-F"  by  itself causes nothing to be inserted, in
  1407.           case you want to reformat the text, for instance.   The
  1408.           initial default prefix is ">".
  1409.  
  1410.      -g<line>
  1411.           tells trn which line of the screen you  want  searched-
  1412.           for  strings to show up on when you search with the 'g'
  1413.           command within an  article.   The  lines  are  numbered
  1414.           starting with 1.  The initial default is "-g1", meaning
  1415.           the first line of the screen.  Setting the line to less
  1416.           than  1  or more than the number of lines on the screen
  1417.           will set it to the last line of the screen.
  1418.  
  1419.      -h<string>
  1420.           hides (disables  the  printing  of)  all  header  lines
  1421.           beginning with string. For instance, -hexp will disable
  1422.           the printing of the "Expires:" line.  Case is  insigni-
  1423.           ficant.   If  <string> is null, all header lines except
  1424.           Subject are hidden, and you may then use +h  to  select
  1425.           those  lines  you want to see.  You may wish to use the
  1426.           baud-rate switch modifier below to hide more  lines  at
  1427.           lower baud rates.
  1428.  
  1429.      -H<string>
  1430.           works just like -h except that instead of  setting  the
  1431.           hiding  flag  for a header line, it sets the magic flag
  1432.           for that header line.  Certain header lines have  magic
  1433.           behavior  that can be controlled this way.  At present,
  1434.           the following actions are caused by the  flag  for  the
  1435.           particular line: the Date line prints the date in local
  1436.           time if the group is threaded; the From line will  only
  1437.           print the commented portion of the user name; the News-
  1438.           groups line will only print  when  there  are  multiple
  1439.           newsgroups;  the  Subject  line  will be underlined and
  1440.           (when threaded) the keyword 'Subject:' is  replaced  by
  1441.           its  subject  number  (e.g.  [1]); and the Expires line
  1442.           will always be suppressed if there is  nothing  on  it.
  1443.           In  fact, all of these actions are the default, and you
  1444.           must use +H to undo them.
  1445.  
  1446.  
  1447.  
  1448. Sun Release 4.1        Last change: LOCAL                      22
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455. TRN(1)                   USER COMMANDS                     TRN(1)
  1456.  
  1457.  
  1458.  
  1459.      -i=<number>
  1460.           specifies how long (in lines) to consider  the  initial
  1461.           page   of   an  article--normally  this  is  determined
  1462.           automatically depending on baud rate.   (Note  that  an
  1463.           entire article header will always be printed regardless
  1464.           of the specified initial page length.  If you are work-
  1465.           ing at low baud rate and wish to reduce the size of the
  1466.           headers, you may hide certain header lines with the  -h
  1467.           switch.)
  1468.  
  1469.      -l   disables the clearing of the screen at the beginning of
  1470.           each article, in case you have a bizarre terminal.
  1471.  
  1472.      -L   tells trn to leave information on the screen as long as
  1473.           possible  by not blanking the screen between pages, and
  1474.           by using clear to end-of-line.   (The  more(1)  program
  1475.           does  this.)  This  feature  works only if you have the
  1476.           requisite termcap  capabilities.   The  switch  has  no
  1477.           effect unless the -e switch is set.
  1478.  
  1479.      -m=<mode>
  1480.           enables the marking of the last line  of  the  previous
  1481.           page  printed,  to  help the user see where to continue
  1482.           reading.  This is most helpful when less  than  a  full
  1483.           page  is going to be displayed.  It may also be used in
  1484.           conjunction with the -e switch, in which case the  page
  1485.           is  erased,  and the first line (which is the last line
  1486.           of the previous  page)  is  highlighted.   If  -m=s  is
  1487.           specified,  the standout mode will be used, but if -m=u
  1488.           is specified, underlining will be used.  If neither  =s
  1489.           or =u is specified, standout is the default.  Use +m to
  1490.           disable highlighting.
  1491.  
  1492.      -M   forces mailbox  format  in  creating  new  save  files.
  1493.           Ordinarily you are asked which format you want.
  1494.  
  1495.      -N   forces normal (non-mailbox) format in creating new save
  1496.           files.  Ordinarily you are asked which format you want.
  1497.  
  1498.      -o   will act like old versions of trn and not  chase  xrefs
  1499.           when  junking  articles via thread commands.  Using -o2
  1500.           will also disable the database lookup for all  article-
  1501.           junking  commands.  This slows down the junking of non-
  1502.           xrefed articles, but enables trn 2.0 to be run using  a
  1503.           database from a pre-2.0 mthreads.
  1504.  
  1505.      -q   bypasses the automatic check for  new  newsgroups  when
  1506.           starting trn.
  1507.  
  1508.      -r   causes trn to restart in the last newsgroup read during
  1509.           a  previous  session  with  trn.   It  is equivalent to
  1510.           starting up normally and then getting to the  newsgroup
  1511.  
  1512.  
  1513.  
  1514. Sun Release 4.1        Last change: LOCAL                      23
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521. TRN(1)                   USER COMMANDS                     TRN(1)
  1522.  
  1523.  
  1524.  
  1525.           with a g command.
  1526.  
  1527.      -s   with no argument  suppresses  the  initial  listing  of
  1528.           newsgroups with unread news, whether -c is specified or
  1529.           not.  Thus -c and -s  can  be  used  together  to  test
  1530.           "silently"  the  status of news from within your .login
  1531.           file.  If -s is followed by a number, the initial list-
  1532.           ing  is  suppressed  after  that  many  lines have been
  1533.           listed.  Presuming that you have  your  .newsrc  sorted
  1534.           into  order  of  interest, -s5 will tell you the 5 most
  1535.           interesting newsgroups that have unread news.  This  is
  1536.           also  a  nice feature to use in your .login file, since
  1537.           it not only tells you whether there is unread news, but
  1538.           also  how  important the unread news is, without having
  1539.           to wade through the entire list of  unread  newsgroups.
  1540.           If  no  -s switch is given -s5 is assumed, so just put-
  1541.           ting "rn -c" into your .login file is fine.
  1542.  
  1543.      -S<number>
  1544.           causes trn to enter subject search mode (^N)  automati-
  1545.           cally  whenever  an  unthreaded newsgroup is started up
  1546.           with <number> unread articles or  more.   Additionally,
  1547.           it causes any 'n' typed while in subject search mode to
  1548.           be interpreted as '^N' instead.  (To get  back  out  of
  1549.           subject search mode, the best command is probably '^'.)
  1550.           If <number> is omitted, 3 is assumed.
  1551.  
  1552.      -t   puts trn into terse mode.  This  is  more  cryptic  but
  1553.           useful  for  low  baud  rates.   (Note that your system
  1554.           administrator may have compiled trn with either verbose
  1555.           or terse messages only to save memory.) You may wish to
  1556.           use the baud-rate switch modifier below to enable terse
  1557.           mode only at lower baud rates.
  1558.  
  1559.      -T   allows you to type ahead of rn.  Ordinarily rn will eat
  1560.           typeahead  to prevent your autorepeating space bar from
  1561.           doing a very frustrating thing  when  you  accidentally
  1562.           hold it down.  If you don't have a repeating space bar,
  1563.           or you are working at low baud rate, you can  set  this
  1564.           switch  to  prevent this behavior.  You may wish to use
  1565.           the baud-rate switch modifier below to  disable  typea-
  1566.           head only at lower baud rates.
  1567.  
  1568.      -v   sets verification mode for  commands.   When  set,  the
  1569.           command  being executed is displayed to give some feed-
  1570.           back that the key has actually been typed.  Useful when
  1571.           the  system  is  heavily  loaded and you give a command
  1572.           that takes a while to start up.
  1573.  
  1574.      -x<number><list>
  1575.           Enable the extended (threaded) features of  trn  beyond
  1576.           the  traditional  rn  compatibility mode.  (This may be
  1577.  
  1578.  
  1579.  
  1580. Sun Release 4.1        Last change: LOCAL                      24
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587. TRN(1)                   USER COMMANDS                     TRN(1)
  1588.  
  1589.  
  1590.  
  1591.           the default on your system, use +x if you yearn for the
  1592.           good  ol'  days.) The <number> is the maximum number of
  1593.           article-tree lines (from 0 to 11) you want displayed in
  1594.           your  header.   Use  the  <list> to choose which thread
  1595.           selector modes you like (s - short, m - medium, or l  -
  1596.           long), and in what order they are selected with the 'L'
  1597.           command.  For example, use -xls to start with the  long
  1598.           display  mode  and only switch between it and the short
  1599.           mode.  You can omit either or both of  the  parameters,
  1600.           in which case a default of -x6lsm is assumed.
  1601.  
  1602.      -X<number><commands>
  1603.           If you like using the thread selector, you'll  probably
  1604.           want  to  use  this  option to make the thread selector
  1605.           command (+) the default when a newsgroup is started  up
  1606.           with   at   least   <number>  unread  articles.   (Your
  1607.           installer may have chosen to make -X1  the  default  on
  1608.           your  system.) It is also used to select which commands
  1609.           you want to be the  defaults  while  using  the  thread
  1610.           selector.   For  example,  -X2XD  will  make the thread
  1611.           selector the default command for entering  a  newsgroup
  1612.           with  at  least  2 unread articles, and set the default
  1613.           command for the LAST page of the thread selector to  be
  1614.           the  X  command  and  the default command for all other
  1615.           pages to be the D command.  Either or  both  parameters
  1616.           can  be  omitted, as well as the second default command
  1617.           (e.g.  -XX would change the default newsgroup entry  to
  1618.           use  the  selector and the default command for the last
  1619.           page of the selector to be 'X').  The default is  -X1Z>
  1620.           if  just  -X is specified.  To set the default selector
  1621.           commands without affecting the  default  entry  into  a
  1622.           newsgroup, specify a high number, like 9999.
  1623.  
  1624.      -/   sets SAVEDIR to "%p/%c" and  SAVENAME  to  "%a",  which
  1625.           means that by default articles are saved in a subdirec-
  1626.           tory of your private news  directory  corresponding  to
  1627.           the  name  of  the  the  current  newsgroup,  with  the
  1628.           filename being the article number.  +/ sets SAVEDIR  to
  1629.           "%p"  and  SAVENAME  to  "%^C",  which by default saves
  1630.           articles directly to your private news directory,  with
  1631.           the  filename  being the name of the current newsgroup,
  1632.           first letter capitalized.  (Either  +/  or  -/  may  be
  1633.           default  on  your  system, depending on the feelings of
  1634.           your news administrator when he, she  or  it  installed
  1635.           trn.)  You  may,  of course, explicitly set SAVEDIR and
  1636.           SAVENAME  to  other  values--see  discussion   in   the
  1637.           environment section.
  1638.  
  1639.      Any switch may  be  selectively  applied  according  to  the
  1640.      current  baud-rate.  Simply prefix the switch with +speed to
  1641.      apply the switch at that speed or  greater,  and  -speed  to
  1642.      apply   the   switch  at  that  speed  or  less.   Examples:
  1643.  
  1644.  
  1645.  
  1646. Sun Release 4.1        Last change: LOCAL                      25
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653. TRN(1)                   USER COMMANDS                     TRN(1)
  1654.  
  1655.  
  1656.  
  1657.      -1200-hposted suppresses the Posted line  at  1200  baud  or
  1658.      less; +9600-m enables marking at 9600 baud or more.  You can
  1659.      apply the modifier recursively to itself  also:  +300-1200-t
  1660.      sets terse mode from 300 to 1200 baud.
  1661.  
  1662.      Similarly, switches may be selected based on terminal type:
  1663.  
  1664.           -=vt100+T      set +T on vt100
  1665.           -=tvi920-ETERM=mytvi     get a special termcap entry
  1666.           -=tvi920-ERNMACRO=%./.rnmac.tvi
  1667.                          set up special keymappings
  1668.           +=paper-v      set verify mode if not hardcopy
  1669.  
  1670.      Some switch arguments, such as environment variable  values,
  1671.      may  require  spaces  in them.  Such spaces should be quoted
  1672.      via ", ', or \ in the conventional fashion, even when passed
  1673.      via TRNINIT or the & command.
  1674.  
  1675.      Regular Expressions
  1676.  
  1677.      The patterns used in article searching are  regular  expres-
  1678.      sions  such as those used by ed(1).  In addition, \w matches
  1679.      an alphanumeric character and \W  a  nonalphanumeric.   Word
  1680.      boundaries  may  be matched by \b, and non-boundaries by \B.
  1681.      The bracketing construct \( ... \) may  also  be  used,  and
  1682.      \digit matches the digit'th substring, where digit can range
  1683.      from 1 to 9.  \0 matches whatever  the  last  bracket  match
  1684.      matched.   Up  to  10  alternatives  may given in a pattern,
  1685.      separated by \|, with the caveat  that  \( ... \| ... \)  is
  1686.      illegal.
  1687.  
  1688.      Interpretation and Interpolation
  1689.  
  1690.      Many  of  the  strings  that  trn  handles  are  subject  to
  1691.      interpretations of several types.  Under filename expansion,
  1692.      an initial "~/" is translated  to  the  name  of  your  home
  1693.      directory,  and "~name" is translated to the login directory
  1694.      for the user specified.  Filename expansion will also expand
  1695.      an   initial   environment   variable,  and  also  does  the
  1696.      backslash, uparrow and percent expansion mentioned below.
  1697.  
  1698.      All interpreted strings go through  backslash,  uparrow  and
  1699.      percent  interpretation.  The backslash escapes are the nor-
  1700.      mal ones (such as \n, \t, \nnn, etc.).  The uparrow  escapes
  1701.      indicate  control  codes in the normal fashion.  Backslashes
  1702.      or uparrows to be passed  through  should  be  escaped  with
  1703.      backslash.   The  special  percent  escapes  are  similar to
  1704.      printf percent escapes.  These  cause  the  substitution  of
  1705.      various  run-time values into the string.  The following are
  1706.      currently recognized:
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712. Sun Release 4.1        Last change: LOCAL                      26
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719. TRN(1)                   USER COMMANDS                     TRN(1)
  1720.  
  1721.  
  1722.  
  1723.      %a      Current article number.
  1724.  
  1725.      %A      Full name of current article (%P/%c/%a).
  1726.  
  1727.      %b      Destination of last save command, often a mailbox.
  1728.  
  1729.      %B      The byte offset to the beginning of the part of  the
  1730.              article  to  be saved, set by the save command.  The
  1731.              's' and 'S' commands set it to 0, and  the  'w'  and
  1732.              'W'  commands  set it to the byte offset of the body
  1733.              of the article.
  1734.  
  1735.      %c      Current newsgroup, directory form.
  1736.  
  1737.      %C      Current newsgroup, dot form.
  1738.  
  1739.      %d      Full name of newsgroup directory (%P/%c).
  1740.  
  1741.      %D      "Distribution:" line from the current article.
  1742.  
  1743.      %e      The last command executed to extract  data  from  an
  1744.              article.
  1745.  
  1746.      %E      The last directory where an extracted file went.
  1747.  
  1748.      %f      "From:"  line  from  the  current  article,  or  the
  1749.              "Reply-To:" line if there is one.  This differs from
  1750.              %t in that comments (such as the full name) are  not
  1751.              stripped out with %f.
  1752.  
  1753.      %F      "Newsgroups:" line for a  new  article,  constructed
  1754.              from   "Newsgroups:"  and  "Followup-To:"  lines  of
  1755.              current article.
  1756.  
  1757.      %h      Name of the header file to pass to the mail or  news
  1758.              poster,  containing  all  the  information  that the
  1759.              poster program  needs  in  the  form  of  a  message
  1760.              header.   It  may also contain a copy of the current
  1761.              article.  The format of  the  header  file  is  con-
  1762.              trolled by the MAILHEADER and NEWSHEADER environment
  1763.              variables.
  1764.  
  1765.      %H      Host name (your machine's name).
  1766.  
  1767.      %i      "Message-I.D.:" line from the current article,  with
  1768.              <> guaranteed.
  1769.  
  1770.      %I      The reference indication mark (see the -F switch.)
  1771.  
  1772.      %l      The news administrator's login name, if any.
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778. Sun Release 4.1        Last change: LOCAL                      27
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785. TRN(1)                   USER COMMANDS                     TRN(1)
  1786.  
  1787.  
  1788.  
  1789.      %L      Login name (yours).
  1790.  
  1791.      %m      The current mode of trn, for use in conditional mac-
  1792.              ros.
  1793.  
  1794.                   i    Initializing.
  1795.                   n    Newsgroup selection level.
  1796.                   t    Thread selection level.
  1797.                   a    Article selection level (What next?).
  1798.                   p    Pager level (MORE prompt).
  1799.                   u    Set unread? prompt.
  1800.                   A    Add this newsgroup?
  1801.                   B    aBandon confirmation.
  1802.                   C    Catchup confirmation.
  1803.                   D    Delete bogus newsgroups?
  1804.                   F    Is followup a new topic?
  1805.                   M    Use mailbox format?
  1806.                   R    Resubscribe to this newsgroup?
  1807.  
  1808.              Note that yes/no questions are all upper-case modes.
  1809.              If,  for example, you wanted to disallow defaults on
  1810.              all yes/no questions, you could define the following
  1811.              macro:
  1812.  
  1813.              \040 %(%m=[A-Z]?h: )
  1814.  
  1815.      %M      The number of articles marked to return via the  'M'
  1816.              command.   If  the  same  article is Marked multiple
  1817.              times, "%M" counts it multiple times in the  current
  1818.              implementation.
  1819.  
  1820.      %n      "Newsgroups:" line from the current article.
  1821.  
  1822.      %N      Full name (yours).
  1823.  
  1824.      %o      Organization (yours).
  1825.  
  1826.      %O      Original working directory (where you ran rn from).
  1827.  
  1828.      %p      Your private news directory, normally ~/News.
  1829.  
  1830.      %P      Public    news     spool     directory,     normally
  1831.              /usr/spool/news on systems that don't use NNTP.
  1832.  
  1833.      %r      Last reference on references line of current article
  1834.              (parent article id).
  1835.  
  1836.      %R      References list for a new article, constructed  from
  1837.              the  references  and article ID of the current arti-
  1838.              cle.
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844. Sun Release 4.1        Last change: LOCAL                      28
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851. TRN(1)                   USER COMMANDS                     TRN(1)
  1852.  
  1853.  
  1854.  
  1855.      %s      Subject, with all Re's and (nf)'s stripped off.
  1856.  
  1857.      %S      Subject, with one "Re:" stripped off.
  1858.  
  1859.      %t      "To:" line derived from the "From:" and  "Reply-To:"
  1860.              lines  of  the current article.  This always returns
  1861.              an Internet format address.
  1862.  
  1863.      %T      "To:" line derived from  the  "Path:"  line  of  the
  1864.              current article to produce a uucp path.
  1865.  
  1866.      %u      The number of unread articles in the  current  news-
  1867.              group.
  1868.  
  1869.      %U      The number of unread articles in the  current  news-
  1870.              group,  not  counting the the current article.  When
  1871.              threads  are  selected,  this  count  reflects  only
  1872.              selected articles.
  1873.  
  1874.      %v      The number of unselected articles, not counting  the
  1875.              current article if it is unselected.
  1876.  
  1877.      %w      The directory where mthreads keeps its tmp files.
  1878.  
  1879.      %W      The directory where thread files are placed.
  1880.  
  1881.      %x      The news library directory.
  1882.  
  1883.      %X      The rn library directory.
  1884.  
  1885.      %z      The length of the current article in bytes.
  1886.  
  1887.      %Z      The number of selected threads.
  1888.  
  1889.      %~      Your home directory.
  1890.  
  1891.      %.      The directory containing your dot  files,  which  is
  1892.              your  home directory unless the environment variable
  1893.              DOTDIR is defined when rn is invoked.
  1894.  
  1895.      %#      The current count for a  multi-file  save,  starting
  1896.              with  1.   This value is incremented by one for each
  1897.              file saved or extracted within a single command.
  1898.  
  1899.      %$      Current process number.
  1900.  
  1901.      %/      Last search string.
  1902.  
  1903.      %%      A percent sign.
  1904.  
  1905.      %{name} or %{name-default}
  1906.              The environment variable "name".
  1907.  
  1908.  
  1909.  
  1910. Sun Release 4.1        Last change: LOCAL                      29
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917. TRN(1)                   USER COMMANDS                     TRN(1)
  1918.  
  1919.  
  1920.  
  1921.      %[name] The value of header line "Name:"  from  the  current
  1922.              article.  The "Name: " is not included.  For example
  1923.              "%D" and "%[distribution]" are equivalent.  The name
  1924.              must be spelled out in full.
  1925.  
  1926.      %`command`
  1927.              Inserts the output of the command, with any embedded
  1928.              newlines translated to space.
  1929.  
  1930.      %"prompt"
  1931.              Prints prompt  on  the  terminal,  then  inputs  one
  1932.              string, and inserts it.
  1933.  
  1934.      %(test_text=pattern?then_text:else_text)
  1935.              If  test_text  matches  pattern,   has   the   value
  1936.              then_text, otherwise else_text.  The ":else_text" is
  1937.              optional,  and  if  absent,  interpolates  the  null
  1938.              string.  The = may be replaced with != to negate the
  1939.              test.  To quote any of the metacharacters ('=', '?',
  1940.              ':', or ')'), precede with a backslash.
  1941.  
  1942.      %digit  The  digits  1  through  9  interpolate  the  string
  1943.              matched by the nth bracket in the last pattern match
  1944.              that had brackets.  If the last pattern had alterna-
  1945.              tives,  you  may  not know the number of the bracket
  1946.              you want--%0 will give you the last bracket matched.
  1947.  
  1948.      Modifiers: to capitalize the first letter, insert '^': "%^C"
  1949.      produces  something  like "Net.jokes".  Inserting '_' causes
  1950.      the first letter following the last '/' to  be  capitalized:
  1951.      "%_c" produces "net/Jokes".
  1952.  
  1953.      Inserting '\' will insert a backslash before any  characters
  1954.      that  would be magic in a regular expression: "%\C" produces
  1955.      "net\.jokes".  This is called regexp quoting.
  1956.  
  1957. ENVIRONMENT
  1958.      The following environment variables are paid attention to by
  1959.      trn.   In general the default values assumed for these vari-
  1960.      ables by trn are reasonable, so if you are using trn for the
  1961.      first  time,  you can safely ignore this section.  Note that
  1962.      the defaults below  may  not  correspond  precisely  to  the
  1963.      defaults  on  your  system.  To find the actual defaults you
  1964.      would need to look in  config.h  and  common.h  in  the  trn
  1965.      source directory, and the file INIT in the trn library.
  1966.  
  1967.      Those variables marked (%) are subject to  %  interpolation,
  1968.      and those marked (~) are subject to both % interpolation and
  1969.      ~ interpretation.
  1970.  
  1971.      ATTRIBUTION (%)
  1972.              Gives the format of the attribution line in front of
  1973.  
  1974.  
  1975.  
  1976. Sun Release 4.1        Last change: LOCAL                      30
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983. TRN(1)                   USER COMMANDS                     TRN(1)
  1984.  
  1985.  
  1986.  
  1987.              the quoted article included by an F command.
  1988.  
  1989.              Default: In article %i %f writes:
  1990.  
  1991.      AUTOSUBSCRIBE
  1992.              When trn is checking for new  newsgroups  and  finds
  1993.              one  matching  one of the patterns in AUTOSUBSCRIBE,
  1994.              the new group is automatically added to the  end  of
  1995.              the  .newsrc,  subscribed.   Newsgroups not matching
  1996.              this or AUTOUNSUBSCRIBE, below, are offered  to  the
  1997.              user.
  1998.  
  1999.              AUTOSUBSCRIBE is a comma separated list of newsgroup
  2000.              patterns  ala  It can also include "but not" entries
  2001.              preceded by '!'.  "a,b,!c,d" is read as "matching  a
  2002.              or  b,  unless it also matches c; matching d regard-
  2003.              less".  Another way to look at it is "(((a or b) and
  2004.              not  c)  or  d)".  To automatically subscribe to all
  2005.              local groups but be choosy about  non-local  groups,
  2006.              one might say "*,!*.*".
  2007.  
  2008.              Default: (none)
  2009.  
  2010.      AUTOUNSUBSCRIBE
  2011.              AUTOUNSUBSCRIBE is very  similar  to  AUTOSUBSCRIBE,
  2012.              above,  but new newsgroups matching it are automati-
  2013.              cally added to the end of the .newsrc  file,  unsub-
  2014.              scribed.   If  a  newsgroup  matches  AUTOSUBSCRIBE,
  2015.              AUTOUNSUBSCRIBE is not consulted.
  2016.  
  2017.              Default: (none)
  2018.  
  2019.      CANCEL (~)
  2020.              The shell command used to cancel an article.
  2021.  
  2022.              Default: inews -h < %h
  2023.  
  2024.      CANCELHEADER (%)
  2025.              The format of the file to pass to the CANCEL command
  2026.              in order to cancel an article.
  2027.  
  2028.              Default:
  2029.              Newsgroups: %n
  2030.              Subject: cmsg cancel %i
  2031.              References: %R
  2032.              Reply-To: %L@%H (%N)
  2033.              Distribution: %D
  2034.              Organization: %o
  2035.  
  2036.              %i cancelled from rn.
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042. Sun Release 4.1        Last change: LOCAL                      31
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049. TRN(1)                   USER COMMANDS                     TRN(1)
  2050.  
  2051.  
  2052.  
  2053.      DOTDIR  Where to find your dot files, if they aren't in your
  2054.              home directory.  Can be interpolated using "%.".
  2055.  
  2056.              Default: $HOME
  2057.  
  2058.      EDITOR (~)
  2059.              The name of your editor, if VISUAL is undefined.
  2060.  
  2061.              Default: whatever your news  administrator  compiled
  2062.              in, usually vi.
  2063.  
  2064.      EXSAVER (%)
  2065.              The shell command to execute  in  order  to  extract
  2066.              data to either /bin/sh or a user-specified command.
  2067.  
  2068.              Default: tail +%Bc %A | %e
  2069.  
  2070.      EDITOR (~)
  2071.              The name of your editor, if VISUAL is undefined.
  2072.  
  2073.              Default: whatever your news  administrator  compiled
  2074.              in, usually vi.
  2075.  
  2076.      FIRSTLINE (%)
  2077.              Controls the format of the line displayed at the top
  2078.              of an article.  Warning: this may go away.
  2079.  
  2080.              The default in an unthreaded group is approximately:
  2081.  
  2082.              Article  %a  %(%U%M!=^00$?(%U  more%(%M!=^0$?  +  %M
  2083.              Marked to return)\) )in %C:
  2084.  
  2085.              While the default in a threaded group is almost:
  2086.  
  2087.              %C #%a%(%Z=^0$?%(%U!=^0$?  (%U  more\)):  (%U  +  %v
  2088.              more\))
  2089.  
  2090.      HIDELINE
  2091.              If defined,  contains  a  regular  expression  which
  2092.              matches  article  lines  to be hidden, in order, for
  2093.              instance, to suppress  quoted  material.   A  recom-
  2094.              mended  string  for  this  purpose is "^>...", which
  2095.              doesn't hide lines with only '>', to give some indi-
  2096.              cation  that  quoted  material is being skipped.  If
  2097.              you want to hide more than one pattern, you can  use
  2098.              "|"  to separate the alternatives.  You can view the
  2099.              hidden lines by restarting the article with the  'v'
  2100.              command.
  2101.  
  2102.              There is some overhead  involved  in  matching  each
  2103.              line  of  the  article against a regular expression.
  2104.              You might wish to use a baud-rate modifier to enable
  2105.  
  2106.  
  2107.  
  2108. Sun Release 4.1        Last change: LOCAL                      32
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115. TRN(1)                   USER COMMANDS                     TRN(1)
  2116.  
  2117.  
  2118.  
  2119.              this feature only at low baud rates.
  2120.  
  2121.              Default: undefined
  2122.  
  2123.      HOME    Your home directory.  Affects ~ interpretation,  and
  2124.              the  location  of  your  dot  files if DOTDIR is not
  2125.              defined.
  2126.  
  2127.              Default: $LOGDIR
  2128.  
  2129.      KILLGLOBAL (~)
  2130.              Where to find the KILL file to apply to every  news-
  2131.              group.  See the '^K' command at the newsgroup selec-
  2132.              tion level.
  2133.  
  2134.              Default: %p/KILL
  2135.  
  2136.      KILLLOCAL (~)
  2137.              Where to find the KILL file for  the  current  news-
  2138.              group.  See the commands 'K' and '^K' at the article
  2139.              selection level, and the search modifier 'K'.
  2140.  
  2141.              Default: %p/%c/KILL
  2142.  
  2143.      LOGDIR  Your home directory if HOME is undefined.  Affects ~
  2144.              interpretation,  and  the location of your dot files
  2145.              if DOTDIR is not defined.
  2146.  
  2147.              Default: none.
  2148.  
  2149.              Explanation: you must have either $HOME or $LOGDIR.
  2150.  
  2151.      LOGNAME Your login name,  if  USER  is  undefined.   May  be
  2152.              interpolated using "%L".
  2153.  
  2154.              Default: value of getlogin().
  2155.  
  2156.      LOCALTIMEFMT
  2157.              The format used by strftime()  to  print  the  local
  2158.              time.  The Date line is only displayed in local time
  2159.              if the group is threaded (see the -H option for more
  2160.              information on Date).
  2161.  
  2162.              Default: %a %b %e %X %Z %Y
  2163.  
  2164.              which is the same format as the date(1) command.
  2165.  
  2166.      MAILCALL (~)
  2167.              What to say when there is new mail.
  2168.  
  2169.              Default: (Mail)
  2170.  
  2171.  
  2172.  
  2173.  
  2174. Sun Release 4.1        Last change: LOCAL                      33
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181. TRN(1)                   USER COMMANDS                     TRN(1)
  2182.  
  2183.  
  2184.  
  2185.      MAILFILE (~)
  2186.              Where to check for mail.
  2187.  
  2188.              Default: /usr/spool/mail/%L
  2189.  
  2190.      MAILHEADER (%)
  2191.              The format of the header file for replies.  See also
  2192.              MAILPOSTER.
  2193.  
  2194.              Default:
  2195.  
  2196.              To: %T
  2197.              Subject: %(%i=^$?:Re: %S
  2198.              Newsgroups: %n
  2199.              In-Reply-To: %i)
  2200.              %(%[references]!=^$?References\: %[references]
  2201.              )Organization: %o
  2202.              Cc:
  2203.              Bcc: \n\n
  2204.  
  2205.      MAILPOSTER (~)
  2206.              The shell command to be used by the  reply  commands
  2207.              (r and R) in order to allow you to enter and deliver
  2208.              the response.  trn will not itself call upon an edi-
  2209.              tor  for  replies--this is a function of the program
  2210.              called by trn.  See also MAILHEADER.
  2211.  
  2212.              Default: Rnmail -h %h
  2213.  
  2214.      MBOXSAVER (~)
  2215.              The shell command to save an article in mailbox for-
  2216.              mat.
  2217.  
  2218.              Default: %X/mbox.saver %A %P %c %a %B %C "%b" \
  2219.              "From: %T %`date`"
  2220.  
  2221.              Explanation: the first seven arguments are the  same
  2222.              as  for NORMSAVER.  The eighth argument to the shell
  2223.              script is  the  new  From:  line  for  the  article,
  2224.              including  the posting date, derived either directly
  2225.              from the Posted: line, or not-so-directly  from  the
  2226.              Date: line.  Header munging at its finest.
  2227.  
  2228.      MODSTRING
  2229.              The string to insert  in  the  group  summary  line,
  2230.              which  heads  each  article,  for a moderated group.
  2231.              See also NOPOSTRING.
  2232.  
  2233.              Default: " (moderated)"
  2234.  
  2235.      NAME    Your full name.  May be interpolated using "%N".
  2236.  
  2237.  
  2238.  
  2239.  
  2240. Sun Release 4.1        Last change: LOCAL                      34
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247. TRN(1)                   USER COMMANDS                     TRN(1)
  2248.  
  2249.  
  2250.  
  2251.              Default: name from /etc/passwd, or ~/.fullname.
  2252.  
  2253.      NEWSHEADER (%)
  2254.              The format of the header file  for  followups.   See
  2255.              also NEWSPOSTER.
  2256.  
  2257.              Default:
  2258.  
  2259.              Newsgroups: %(%F=^$?%C:%F)
  2260.              Subject: %(%S=^$?%"\n\nSubject: ":Re: %S)
  2261.              Summary:
  2262.              Expires:
  2263.              %(%R=^$?:References: %R
  2264.              )Sender:
  2265.              Reply-To: %L@%H (%N)
  2266.              Followup-To:
  2267.              Distribution: %(%i=^$?%"\nDistribution: ":%D)
  2268.              Organization: %o
  2269.              Keywords: \n\n
  2270.  
  2271.      NEWSORG Either the name of your organization, or the name of
  2272.              a  file  containing  the  name of your organization.
  2273.              (For use at sites where the ORGANIZATION environmen-
  2274.              tal  variable is already in use.  NEWSORG will over-
  2275.              ride ORGANIZATION  if  both  are  present.)  May  be
  2276.              interpolated using "%o".
  2277.  
  2278.              Default: whatever your news  administrator  compiled
  2279.              in.
  2280.  
  2281.      NEWSPOSTER (~)
  2282.              The shell command to be used by  the  followup  com-
  2283.              mands  (f  and F) in order to allow you to enter and
  2284.              post a followup news article.  trn will  not  itself
  2285.              call  upon  an editor for followups--this is a func-
  2286.              tion of the program called by trn.  See  also  NEWS-
  2287.              HEADER.
  2288.  
  2289.              Default: Pnews -h %h
  2290.  
  2291.      NEWSRC  Your newsgroup subscription list.
  2292.  
  2293.              Default: $HOME/.newsrc
  2294.  
  2295.      NNTPSERVER
  2296.              The hostname of your  NNTPSERVER.   [This  does  not
  2297.              apply  unless  you  are  running the NNTP version of
  2298.              rn.]
  2299.  
  2300.              Default: the hostname listed  in  the  server  file,
  2301.              usually /usr/local/lib/rn/server.
  2302.  
  2303.  
  2304.  
  2305.  
  2306. Sun Release 4.1        Last change: LOCAL                      35
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313. TRN(1)                   USER COMMANDS                     TRN(1)
  2314.  
  2315.  
  2316.  
  2317.      NOPOSTRING
  2318.              The string to insert  in  the  group  summary  line,
  2319.              which heads each article, for a group to which local
  2320.              posting is not allowed.  See also MODSTRING.
  2321.  
  2322.              Default: " (no posting)"
  2323.  
  2324.      NORMSAVER (~)
  2325.              The shell command to save an article in  the  normal
  2326.              (non-mailbox) format.
  2327.  
  2328.              Default: %X/norm.saver %A %P %c %a %B %C "%b"
  2329.  
  2330.      ORGANIZATION
  2331.              Either the name of your organization, or the name of
  2332.              a  file  containing  the  name of your organization.
  2333.              (If NEWSORG is set, it will override  ORGANIZATION.)
  2334.              May be interpolated using "%o".
  2335.  
  2336.              Default: whatever your news  administrator  compiled
  2337.              in.
  2338.  
  2339.      PAGESTOP
  2340.              If defined,  contains  a  regular  expression  which
  2341.              matches  article  lines to be treated as form-feeds.
  2342.              There are at least two things you might want  to  do
  2343.              with this.  To cause page breaks between articles in
  2344.              a digest, you might define it  as  "^--------".   To
  2345.              force  a  page  break  before a signature, you could
  2346.              define it as "^-- $".  (Then, when you see  "--"  at
  2347.              the  bottom  of the page, you can skip the signature
  2348.              if you so desire by typing 'n' instead of space.) To
  2349.              do  both, you could use "^--".  If you want to break
  2350.              on more  than  one  pattern,  you  can  use  "|"  to
  2351.              separate the alternatives.
  2352.  
  2353.              There is some overhead  involved  in  matching  each
  2354.              line  of  the  article against a regular expression.
  2355.              You might wish to use a baud-rate modifier to enable
  2356.              this feature only at low baud rates.
  2357.  
  2358.              Default: undefined
  2359.  
  2360.      PIPESAVER (%)
  2361.              The shell command to execute in order to  accomplish
  2362.              a  save  to a pipe ("s | command" or "w | command").
  2363.              The command typed by the user is substituted  in  as
  2364.              %b.
  2365.  
  2366.              Default: %(%B=^0$?<%A:tail +%Bc %A |) %b
  2367.  
  2368.              Explanation: if %B is 0, the command  is  "<%A  %b",
  2369.  
  2370.  
  2371.  
  2372. Sun Release 4.1        Last change: LOCAL                      36
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379. TRN(1)                   USER COMMANDS                     TRN(1)
  2380.  
  2381.  
  2382.  
  2383.              otherwise the command is "tail +%Bc %A | %b".
  2384.  
  2385.      REPLYTO The value of the "Reply-To:" header, if needed.
  2386.  
  2387.  
  2388.      RNINIT  Default values for switches may be passed to trn  by
  2389.              placing them in either RNINIT or TRNINIT.  RNINIT is
  2390.              used when in rn-compatibility  mode  or  if  TRNINIT
  2391.              isn't found.  Any switch that is set in this way may
  2392.              be overruled on the command line,  or  via  the  '&'
  2393.              command  from  within  trn.   Binary-valued switches
  2394.              that are set  with  "-switch"  may  be  unset  using
  2395.              "+switch".
  2396.  
  2397.              If RNINIT begins with a '/' it is assumed to be  the
  2398.              name  of a file containing switches.  If you want to
  2399.              set many environment variables  but  don't  want  to
  2400.              keep  them all in your environment, or if the use of
  2401.              any of these variables  conflicts  with  other  pro-
  2402.              grams,  you  can  use this feature along with the -E
  2403.              switch  to  set  the  environment   variables   upon
  2404.              startup.
  2405.  
  2406.              Default: " ".
  2407.  
  2408.      RNMACRO (~)
  2409.              The name of the file containing macros and key  map-
  2410.              pings.  See the MACROS section.
  2411.  
  2412.              Default: %./.rnmac
  2413.  
  2414.      SAVEDIR (~)
  2415.              The name of the directory to save to,  if  the  save
  2416.              command does not specify a directory name.
  2417.  
  2418.              Default:
  2419.                 If -/ is set: %p/%c
  2420.                 If +/ is set: %p
  2421.  
  2422.      SAVENAME (%)
  2423.              The name of the file to save to, if the save command
  2424.              contains only a directory name.
  2425.  
  2426.              Default:
  2427.                 If -/ is set: %a
  2428.                 If +/ is set: %^C
  2429.  
  2430.      SELECTCHARS
  2431.              The characters used by the thread selector to select
  2432.              the   associated  thread  of  discussion.   You  can
  2433.              specify  up  to  64  visible  characters,  including
  2434.              upper-  and  lower-case  letters,  numbers, and many
  2435.  
  2436.  
  2437.  
  2438. Sun Release 4.1        Last change: LOCAL                      37
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445. TRN(1)                   USER COMMANDS                     TRN(1)
  2446.  
  2447.  
  2448.  
  2449.              punctuation characters.  Selection characters  over-
  2450.              ride command characters in the selector, but are not
  2451.              excluded from macro expansion, so be careful.
  2452.              Default: abcdefgijlorstuvwxz1234567890
  2453.              (h, k, n, p, q, and y are omitted to allow  them  to
  2454.              be typed as commands).
  2455.  
  2456.      SHELL   The name of your preferred shell.  It will  be  used
  2457.              by the '!', 'S' and 'W' commands.
  2458.  
  2459.              Default: whatever your news  administrator  compiled
  2460.              in.
  2461.  
  2462.      SUBJLINE (%)
  2463.              Controls the format of the lines  displayed  by  the
  2464.              '=' command at the article selection level.
  2465.  
  2466.              Default: %s
  2467.  
  2468.      SUPERSEDEHEADER (%)
  2469.              The format of the header file for a supersede  arti-
  2470.              cle.
  2471.  
  2472.              Default:
  2473.  
  2474.              From: %L@%H (%N)
  2475.              Newsgroups: %n
  2476.              Subject: %S
  2477.              Distribution: %D
  2478.              Organization: %o
  2479.              Supersedes: %i
  2480.  
  2481.      TERM    Determines  which  termcap  entry  to  use,   unless
  2482.              TERMCAP contains the entry.
  2483.  
  2484.      TERMCAP Holds either the name of your  termcap  file,  or  a
  2485.              termcap entry.
  2486.  
  2487.              Default: /etc/termcap, normally.
  2488.  
  2489.      TRNINIT Trn's version of the  RNINIT  environment  variable.
  2490.              See RNINIT for a description.
  2491.  
  2492.      UNSHAR (~)
  2493.              The shell command to execute in order to  accomplish
  2494.              the unshar'ing of a shell archive.
  2495.  
  2496.              Default: /bin/sh
  2497.  
  2498.      USER    Your login name.  May be interpolated using "%L".
  2499.  
  2500.              Default: $LOGNAME
  2501.  
  2502.  
  2503.  
  2504. Sun Release 4.1        Last change: LOCAL                      38
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511. TRN(1)                   USER COMMANDS                     TRN(1)
  2512.  
  2513.  
  2514.  
  2515.      VISUAL (~)
  2516.              The name of your editor.
  2517.  
  2518.              Default: $EDITOR
  2519.  
  2520.      YOUSAID (%)
  2521.              Gives the format of the attribution line in front of
  2522.              the quoted article included by an R command.
  2523.  
  2524.              Default: In article %i you write:
  2525.  
  2526. MACROS
  2527.      When trn starts up, it looks for  a  file  containing  macro
  2528.      definitions   (see   environment   variable  RNMACRO).   Any
  2529.      sequence of commands may be bound to any sequence  of  keys,
  2530.      so  you  could  remap  your  entire  keyboard if you desire.
  2531.      Blank lines or lines beginning with # in the macro file  are
  2532.      considered  comments;  otherwise  trn  looks  for two fields
  2533.      separated  by  white  space.   The  first  field  gives  the
  2534.      sequence  of  keystrokes  that  trigger  the  macro, and the
  2535.      second field gives the  sequence  of  commands  to  execute.
  2536.      Both  fields are subject to % interpolation, which will also
  2537.      translate backslash and uparrow sequences.   (The  keystroke
  2538.      field  is interpreted at startup time, but the command field
  2539.      is interpreted at macro execution time so that you may refer
  2540.      to % values in a macro.) For example, if you want to reverse
  2541.      the roles of carriage return and space in trn
  2542.  
  2543.      ^J   \040
  2544.      ^M   \040
  2545.      \040 ^J
  2546.  
  2547.      will do just that.  By default, all characters in  the  com-
  2548.      mand  field are interpreted as the canonical trn characters,
  2549.      i.e. no macro expansion is done.  Otherwise the  above  pair
  2550.      of  macros  would  cause  an  infinite loop.  To force macro
  2551.      expansion in the command field, enclose the macro call  with
  2552.      ^( ... ^) thusly:
  2553.  
  2554.      @s   |mysavescript
  2555.      @w   w^(@s^)
  2556.  
  2557.      You can use the %() conditional construct to construct  mac-
  2558.      ros that work differently under different circumstances.  In
  2559.      particular, the current mode (%m) of trn could  be  used  to
  2560.      make  a command that only works at a particular level.  This
  2561.      is particularly vital for the thread  selector,  which  uses
  2562.      most  of  the  lower-case  letters  to select the associated
  2563.      thread of discussion.  For example,
  2564.  
  2565.      a    %(%m=t?a:s art.hold\n)
  2566.  
  2567.  
  2568.  
  2569.  
  2570. Sun Release 4.1        Last change: LOCAL                      39
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577. TRN(1)                   USER COMMANDS                     TRN(1)
  2578.  
  2579.  
  2580.  
  2581.      will return the original letter (a) in the thread  selector,
  2582.      and the command "s art.hold\n" everywhere else.
  2583.  
  2584.      %(%{TERM}=vt100?^[[O)    /^J
  2585.  
  2586.      will do the binding only if  the  terminal  type  is  vt100,
  2587.      though  if you have many of these it would be better to have
  2588.      separate files for each terminal.
  2589.  
  2590.      If you want to bind a macro to a function key  that  puts  a
  2591.      common  garbage  character  after  the sequence (such as the
  2592.      carriage  return  on  the  end  of  Televideo  920  function
  2593.      sequences),  DO  NOT  put  the  carriage return into all the
  2594.      sequences or you will waste a CONSIDERABLE amount of  inter-
  2595.      nal  storage.   Instead of "^AF^M", put "^AF+1", which indi-
  2596.      cates to trn that it should gobble up  one  character  after
  2597.      the F.
  2598.  
  2599. WHAT'S NEW?
  2600.      Here's a quick run-down of trn's new features  and  commands
  2601.      aimed at the knowledgeable rn user.
  2602.  
  2603.      One of the biggest  improvements  is  the  Thread  Selector,
  2604.      which is bound to the '+' key.  The selector displays a list
  2605.      of subject threads and (by default) authors to allow you  to
  2606.      select  the topics that interest you by typing their associ-
  2607.      ated letter.  The thread selector can also be used to browse
  2608.      articles that have already been read, to selectively re-read
  2609.      discussions (use the 'U' command).
  2610.  
  2611.      Another big improvement is  the  thread-ordered  display  of
  2612.      articles.  While reading each topic, trn displays each arti-
  2613.      cle and its replies in the order of their parent/child rela-
  2614.      tionship.   This  lets you follow the flow of the discussion
  2615.      better, instead of jumping around from idea to idea or  even
  2616.      reading a reply before the original article.
  2617.  
  2618.      Along this same line is the  addition  of  the  article-tree
  2619.      display  in  the upper-right corner of the header.  Glancing
  2620.      at the tree gives you a better feel for how the articles you
  2621.      are reading relate to each other.
  2622.  
  2623.      The header has  also  been  modified  to  hide  a  few  more
  2624.      header-lines  by  default (e.g. References), but, as always,
  2625.      you can override these with -h.   There  is  also  some  new
  2626.      "magic" in the header: the From header is trimmed to be just
  2627.      the comment portion (if available), and the Date  header  is
  2628.      displayed  in  local  time  (in  threaded groups).  Override
  2629.      these defaults with +H.
  2630.  
  2631.      Once you begin reading articles, use  the  regular  movement
  2632.      commands  (n,  N,  p, P, etc.) as you normally would.  Then,
  2633.  
  2634.  
  2635.  
  2636. Sun Release 4.1        Last change: LOCAL                      40
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643. TRN(1)                   USER COMMANDS                     TRN(1)
  2644.  
  2645.  
  2646.  
  2647.      check out the [, ], {, and } commands to move around in  the
  2648.      article tree a bit more directly.  For example, the '[' com-
  2649.      mand takes you to  your  parent  article,  even  if  it  was
  2650.      already  read,  which  is  very useful for tracking down the
  2651.      cited portion of the article in its original context.
  2652.  
  2653.      There are additional kill commands for the entire thread (J)
  2654.      and  the  current article and all its replies (,).  The KILL
  2655.      files have been extended to allow  killing  by  thread  (T),
  2656.      which will kill a topic even if people fine-tune the subject
  2657.      along the way.
  2658.  
  2659.      There is also an easy way to skip around among  the  various
  2660.      threads with the < and > commands.
  2661.  
  2662.      Note:  your news administrator has  the  option  of  turning
  2663.      thread  processing off for individual groups, and thus it is
  2664.      possible for some  groups  to  not  have  any  pre-processed
  2665.      thread  information  available for use.  When trn encounters
  2666.      such a group, it generates the thread information on the fly
  2667.      while  entering  the  group.   For  really  large groups (or
  2668.      really slow systems), this can take an appreciable amount of
  2669.      time.   If  you can't talk your news administrator into pre-
  2670.      threading the group, you can turn off the thread database on
  2671.      a  group-by-group  basis  using the 't' command at the news-
  2672.      group selection level.  Groups turned off in  this  way  are
  2673.      read  in  the  traditional  rn fashion--articles arranged in
  2674.      arrival order with optional subject searching and no  thread
  2675.      selector.
  2676.  
  2677.      There is a new command,  "e  dir",  that  extracts  a  shell
  2678.      archive  or uuencoded file into the specified directory.  It
  2679.      is even possible  to  extract  other  data  formats  if  you
  2680.      specify the appropriate filter command (e.g. "e dir|cmd".
  2681.  
  2682.      Also, if you plan to use macro definitions, it  is  good  to
  2683.      keep  in  mind  that  the  thread  selector uses most of the
  2684.      lower-case letters for thread selection, and thus  it  is  a
  2685.      good  idea  to  explicitly  set the mode(s) in which a macro
  2686.      applies.  For example, if you want to  press  'f'  from  the
  2687.      article pager/selector to forward the current article to the
  2688.      user "smith", you could define:
  2689.  
  2690.           f    %(%m=[pa]?|mail smith\n:f)
  2691.  
  2692.      This checks the current mode (%m) and if it is 'p' or 'a' it
  2693.      expands  it  to  the  string  "|mail  smith\n", otherwise it
  2694.      returns the letter 'f'.  In some cases, you may simply  wish
  2695.      to  exclude the thread selector from a macro with the condi-
  2696.      tional "%m!=t".
  2697.  
  2698.      Finally, you'll probably want to use the new options, -x and
  2699.  
  2700.  
  2701.  
  2702. Sun Release 4.1        Last change: LOCAL                      41
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709. TRN(1)                   USER COMMANDS                     TRN(1)
  2710.  
  2711.  
  2712.  
  2713.      -X  to ensure that all the newest features are available for
  2714.      use.  These options might be on by default, depending on how
  2715.      your administrator decided to install trn.
  2716.  
  2717. AUTHORS
  2718.      Rn was created by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
  2719.      and  is   now   under   the   direction   of   Stan   Barber
  2720.      <sob@bcm.tmc.edu>.
  2721.      Threaded version by Wayne Davison <davison@borland.com>
  2722.      (Mail all bug reports for trn to Wayne.)
  2723.      Regular expression routines  are  borrowed  from  emacs,  by
  2724.      James Gosling.
  2725.  
  2726. FILES
  2727.      %./.newsrc  status of your news reading
  2728.  
  2729.      %./.oldnewsrc
  2730.                  backup copy of your .newsrc from start  of  ses-
  2731.                  sion
  2732.  
  2733.      %./.rnlock  lock file so you don't screw up your .newsrc
  2734.  
  2735.      %./.rnlast  info from last run of rn
  2736.  
  2737.      %./.rnsoft  soft pointers into /usr/lib/news/active to speed
  2738.                  startup, synchronous with .newsrc
  2739.  
  2740.      %./.rnhead  temporary header file to pass  to  a  mailer  or
  2741.                  news poster
  2742.  
  2743.      %./.rnmac   macro and keymap definitions
  2744.  
  2745.      %p          your news save directory, usually ~/News
  2746.  
  2747.      %x/active   the   list   of   active   newsgroups,   usually
  2748.                  /usr/lib/news/active  on  systems that don't use
  2749.                  NNTP
  2750.  
  2751.      %P          the  public  news   spool   directory,   usually
  2752.                  /usr/spool/news on systems that don't use NNTP
  2753.  
  2754.      %X/INIT     system-wide default switches
  2755.  
  2756. SEE ALSO
  2757.      newsrc(5), more(1), readnews(1), Pnews(1), Rnmail(1)
  2758.  
  2759. DIAGNOSTICS
  2760.      Generally self-documenting, as they say.
  2761.  
  2762. BUGS
  2763.      The -h switch can only hide  header  lines  that  trn  knows
  2764.      about.
  2765.  
  2766.  
  2767.  
  2768. Sun Release 4.1        Last change: LOCAL                      42
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775. TRN(1)                   USER COMMANDS                     TRN(1)
  2776.  
  2777.  
  2778.  
  2779.      The '-' command doesn't cross newsgroup boundaries, and only
  2780.      undoes the last article selection.
  2781.  
  2782.      If you edit your .newsrc while trn is running, trn will hap-
  2783.      pily  wipe out your changes when it decides to write out the
  2784.      .newsrc file.
  2785.  
  2786.      Marking of duplicate articles as  read  in  cross-referenced
  2787.      newsgroups  will not work unless the Xref patch is installed
  2788.      in inews.
  2789.  
  2790.      If you get carried away with % or escape substitutions,  you
  2791.      can overflow buffers.
  2792.  
  2793.      There should be no fixed limit on the number of newsgroups.
  2794.  
  2795.      Some of  the  more  esoteric  features  may  be  missing  on
  2796.      machines with limited address space.
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834. Sun Release 4.1        Last change: LOCAL                      43
  2835.  
  2836.  
  2837.  
  2838.