Previous: help-pr-quit Up: ../info.html Next: help-pr-foo


Help-Pr-M


 Menus, Subnodes and the "M" command.

   With only the "N"  and "P" commands for  moving between nodes,  nodes
 are  restricted  to  a  linear  sequence.   Menus  allow  a   branching
 structure.  A menu is  a list of  other nodes you can  move to.  It  is
 actually just part of the text of the node formatted specially so  that
 INFO can interpret it.  The beginning of a menu is always identified by
 a line which starts with "* Menu:".  A node contains a menu if and only
 if it has a line  in it which starts that  way.  The only menu you  can
 use at any moment is the one in the node you are in.  To use a menu  in
 any other node, you must move to that node first.

   After the  start  of the  menu,  each line  that  starts with  a  "*"
 identifies one subtopic.  The  line will usually  contain a brief  name
 for the subtopic (followed by a ":"),  the name of the node that  talks
 about that subtopic,  and optionally  some further  description of  the
 subtopic.  Lines  in the  menu that  don't  start with  a "*"  have  no
 special meaning - they are only  for the human reader's benefit and  do
 not define additional subtopics.  Here is an example:
 * Foo: FOO's Node      This tells about FOO
 The subtopic name is Foo, and  the node describing it is "FOO's  Node".
 The rest of the line is just for the reader's information.

   When you use  a menu to  go to another  node (in a  way that will  be
 described soon), what you specify is the subtopic name, the first thing
 in the menu line.   INFO uses it  to find the  menu line, extracts  the
 node name from it,  and goes to  that node.  The  reason that there  is
 both a subtopic  name and a  node name is  that the node  name must  be
 meaningful to the computer and may  therefore have to be ugly  looking.
 The subtopic name can be chosen just  to be convenient for the user  to
 specify.  Often the node name is convenient for the user to specify and
 so  both  it  and  the  subtopic  name  are  the  same.   There  is  an
 abbreviation for this:
 * Foo::   This tells about FOO
 This means that the subtopic name and node name are the same; they  are
 both "Foo".

   The command to go  to one of the  subnodes is "M" -  but DON'T DO  IT
 YET!  Before you use  "M", you must  understand the difference  between
 commands and arguments.  So far, you have learned several commands that
 do not need  arguments.  When you  type one, INFO  processes it and  is
 instantly ready for another command.  The "M" command is different:  it
 is incomplete without the  NAME OF THE SUBTOPIC.   Once you have  typed
 "M", INFO tries to read the name - an argument.

   Only when you have completed the  argument will the "M" command  take
 effect and INFO be ready for another command.  Until then, you have the
 ability to change  your mind.  To  complete the argument  and make  the
 command finish, you type a CR (Carriage-Return).  To change your  mind,
 type a Control-G (the same thing that makes a "T" stop).  While  typing
 the argument, you can  use Rubout to cancel  a single character,  which
 will be echoed back  at you.  If  you rub out  the entire argument  the
 next Rubout will rub out the "M" and you will be back at command level.
 This much is shared by "M" with  all the other INFO commands that  read
 arguments.

   Two features  peculiar to  the  "M" command  allow  you to  ask  what
 alternatives there are for  you to type.  Right  after typing the  "M",
 before typing any of the  argument, if you type a  "?" it will print  a
 list of  all  of the  subtopic  names -  all  of the  things  that  are
 meaningful arguments to "M" for the menu  in this node.  If you type  a
 Space, it will print  just one subtopic name,  and you can keep  typing
 Spaces to see more  of them.  After  either a "?" or  a Space, you  are
 STILL inside the "M" command and  should still either type an  argument
 or quit with Control-G.  These "?"  and Space features work only  right
 after "M" is typed.  Even something which was rubbed out will be enough
 to prevent them from working, unfortunately.

   The argument to  the "M" command  is the  name of a  subtopic in  the
 menu, or an abbreviation  for a subtopic.  If  you use an  abbreviation
 that could  match  more than  one  subtopic, the  first  subtopic  that
 matches will be used, so be a little careful.  Some menus will put  the
 shortest possible abbreviation for each subtopic in capital letters  to
 make it clear what will work.  Be sure not to put any spaces at the end
 of the argument, and put in only a single space where there is a  space
 in the subtopic as it appears in the menu.

   Here is a menu to give you a chance to practice.

 * Menu:
 * Foo: Help-Pr-FOO     A node you can visit for fun
 * Bar: Help-Pr-FOO     Strange!  two ways to get to the same place.
 * Help-Pr-FOO::                And yet another!

   You can go to the node Help-FOO by typing "MFoo" and a CR, or  "MBar"
 and a CR, or "MHelp-Pr-FOO" and a CR.

 >> Type "M",  then "?" to  see how that  lists the alternatives.   Then
 type "Bar" and four Rubouts.  This will rub all the way out of the "M",
 so type another "M",  and quit with Control-G.   Finally, type an  "M",
 "Bar", and a CR and you will go to Help-FOO.