Previous: help-dot Up: ../info.html Next: foo-node
Menus 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". >> Now use Spaces to find the menu in this node, then come back to the front with a "B". As you see, a menu is actually visible in its node. If you can't find a menu in a node by looking at it, then the node doesn't have a menu. The only menu you can use is the one (if any) in the current node. To use a menu in another node, you must first get to that node somehow. 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. Now look for the text "INFO documentation reader" near the bottom of the screen. As long as that text is there, INFO is awaiting a command. When that line says something else, INFO is trying to read the ARGUMENT to a command. At such times, commands won't work, because INFO will try to use them as the argument. You must either type the argument and finish the command you started, or type Control-G to cancel the command. When you have done one of those things, the line will change back to "INFO documentation reader". The command to go to a subnode via a menu is "M". When you type an "M", the top of the menu will appear on the screen if it wasn't already visible. If the menu doesn't all fit on the screen, you can use Space and Caret as usual to move around in it. When you have decided which subtopic to look at, type the subtopic's name, ended by a CR (Carriage-Return). You can abbreviate the topic name. If the abbreviation is not unique, the first matching topic is chosen. Some menus will put the shortest possible abbreviation for each topic name in capital letters, so you can see how much you need to type. You should not put any spaces at the end, or inside of the item name, except for one space where a space appears in the item in the menu. >> Now type just an "M" and see what happens: Here is a menu to give you a chance to practice. * Menu: The menu starts here. Type a space if you need to. This menu gives you three ways of going to one place, Help-FOO. * Foo: Help-FOO A node you can visit for fun * Bar: Help-FOO Strange! two ways to get to the same place. * Help-FOO:: And yet another! Now you are "inside" an "M" command. Commands can't be used now; the next thing you will type must be the name of a subtopic. Notice how "INFO documentation reader" has changed to "INFO, awaiting Menu item" to tell you what you should type next (find this on the screen). >> Type a question-mark and see what you get. You can change your mind about doing the "M" by typing a Rubout. >> Try that now; notice the "awaiting Menu item" change back >> Then type another "M". >> Now type "Foo", the item name. Don't type CR yet. While you are typing the item name, you can use the Rubout character to cancel one character at a time if you make a mistake. >> Type one to cancel the last "O". You could type another "O" to replace it. You don't have to, since "FO" is a valid abbreviation. >> Now you are ready to go. Type a CR. After visiting FOO-Node, you should return here. >> Type "N" to see more commands.