This first part of the Info manual describes how to get around inside of Info. The second part of the manual describes various advanced Info commands, and how to write an Info as distinct from a Texinfo file. The third part briefly explains how to generate Info files from Texinfo files.
@ifnotinfo This manual is primarily designed for browsing with an Info reader program on a computer, so that you can try Info commands while reading about them. Reading it on paper or with an HTML browser is less effective, since you must take it on faith that the commands described really do what the manual says. By all means go through this manual now that you have it; but please try going through the on-line version as well.
There are two ways of looking at the online version of this manual:
info
at your shell's command line. This approach uses a
stand-alone program designed just to read Info files.
emacs
at the command line; then type C-h i
(Control-h, followed by i). This approach uses the Info
mode of the Emacs program, an editor with many other capabilities.
In either case, then type mInfo (just the letters), followed by RET---the "Return" or "Enter" key. At this point, you should be ready to follow the instructions in this manual as you read them on the screen.
@ifnotinfo (In Info, you only see this section if your terminal has a small number of lines; most readers pass by it without seeing it.)
Since your terminal has a relatively small number of lines on its screen, it is necessary to give you special advice at the beginning.
If you see the text `--All----' near the bottom right corner of the screen, it means the entire text you are looking at fits on the screen. If you see `--Top----' instead, it means that there is more text below that does not fit. To move forward through the text and see another screen full, press SPC, the Space bar. To move back up, press the key labeled `Backspace' or `DEL' (on some keyboards, this key might be labeled `Delete').
Here are 40 lines of junk, so you can try SPC and DEL and see what they do. At the end are instructions of what you should do next.
This is line 20 This is line 21 This is line 22 This is line 23 This is line 24 This is line 25 This is line 26 This is line 27 This is line 28 This is line 29 This is line 30 This is line 31 This is line 32 This is line 33 This is line 34 This is line 35 This is line 36 This is line 37 This is line 38 This is line 39 This is line 40 This is line 41 This is line 42 This is line 43 This is line 44 This is line 45 This is line 46 This is line 47 This is line 48 This is line 49 This is line 50 This is line 51 This is line 52 This is line 53 This is line 54 This is line 55 This is line 56 This is line 57 This is line 58 This is line 59
If you have managed to get here, go back to the beginning with DEL (or BACKSPACE), and come back here again, then you understand the about the `Space' and `Backspace' keys. So now type an n --just one character; don't type the quotes and don't type the Return key afterward-- to get to the normal start of the course.
You are talking to the program Info, for reading documentation.
Right now you are looking at one Node of Information. A node contains text describing a specific topic at a specific level of detail. This node's topic is "how to use Info". The mode line says that this is node `Help' in the file `info'.
The top line of a node is its header. This node's header (look at it now) says that the `Next' node after this one is the node called `Help-P'. An advanced Info command lets you go to any node whose name you know. In the stand-alone Info reader program, the header line shows the names of this node and the info file as well. In Emacs, the header line is displayed in a special typeface, and it doesn't scroll off the screen when you scroll the display. The names of this node and of its Info file are omitted by Emacs from the header line.
Besides a `Next', a node can have a `Previous' or an `Up' links, or both. As you can see, this node has all of these links.
Now it is time to move on to the `Next' node, named `Help-P'.
>> Type n to move there. Type just one character; do not type the quotes and do not type a RET afterward.
`>>' in the margin means it is really time to try a command.
>> If you have a mouse, and if you already practiced typing n to get to the next node, click now with the right mouse button on the `Next' link to do the same ``the mouse way''.
This node is called `Help-P'. The `Previous' node, as you see,
is `Help', which is the one you just came from using the n
command. Another n command now would take you to the next
node, `Help-^L'. In Emacs, n runs the Emacs command
Info-next
, and p runs Info-prev
.
>> But do not type n yet. First, try the p command, or click the mouse on the `Prev' link, which takes you to the `Previous' node. When you get there, you can do an n again to return here.
If you read this in Emacs, you will see an `Info' item in the menu bar, close to its right edge. Clicking your mouse on the `Info' menu-bar item opens a menu of commands which include `Next' and `Prev' (and also some others which you didn't yet learn about).
This all probably seems insultingly simple so far, but do not be led into skimming. Things will get more complicated soon. Also, do not try a new command until you are told it is time to. Otherwise, you may make Info skip past an important warning that was coming up.
>> Now do an n, or click the mouse on the `Next' link, to get to the node `Help-^L' and learn more.
This node's mode line tells you that you are now at node `Help-^L', and the header line tells you that p would get you back to `Help-P'. The node's title is underlined; it says what the node is about (most nodes have titles).
This is a big node and it does not all fit on your display screen. You can tell that there is more that is not visible because you can see the string `--Top-----' rather than `--All----' near the bottom right corner of the screen.
The SPC, BACKSPACE (or DEL)(1) and b commands exist to
allow you to "move around" in a node that does not all fit on the
screen at once. SPC moves forward, to show what was below the
bottom of the screen. DEL or BACKSPACE moves backward, to
show what was above the top of the screen (there is not anything above
the top until you have typed some spaces). In Emacs, SPC runs
the command Info-scroll-up
, while BACKSPACE runs
Info-scroll-down
.
>> Now try typing a SPC (afterward, type a BACKSPACE to return here).
When you type the SPC, the two lines that were at the bottom of the screen appear at the top, followed by more lines. DEL or BACKSPACE takes the two lines from the top and moves them to the bottom, usually, but if there are not a full screen's worth of lines above them they may not make it all the way to the bottom.
If you are reading this in Emacs, note that the header line is always visible, never scrolling off the display. That way, you can always see the `Next', `Prev', and `Up' links, and you can conveniently go to one of these links from anywhere in the node by clicking the mouse on one of these links.
SPC and DEL not only move forward and backward through the current node. When these keys hit the beginning or the end of the current node, they move to preceding or subsequent nodes. Specifically, they scroll through all the nodes in an Info file as a single logical sequence. In this sequence, a node's subnodes appear following their parent. If a node has a menu, SPC takes you into the subnodes listed in the menu, one by one. Once you reach the end of a node, and have seen all of its subnodes, SPC takes you to the next node or to the parent's next node. This is so you could read the entire manual top to bottom by just typing SPC.
Many keyboards nowadays have two scroll keys labeled `PageUp' and `PageDown' (or maybe `Prior' and `Next'). If your keyboard has these keys, you can use them to move forward and backward through the text, like with SPC and BACKSPACE. However, unlike SPC and BACKSPACE, PAGEUP and PAGEDOWN keys will never scroll beyond the beginning or the end of the current node.
If your screen is ever garbaged, you can tell Info to display it again by typing C-l (Control-L, that is--hold down CTRL and type L or l).
>> Type C-l now.
To move back to the beginning of the node you are on, you can type a lot of BACKSPACE keys. You can also type simply b for beginning.
>> Try that now. (We have put in enough verbiage to push this past the first screenful, but screens are so big nowadays that perhaps it isn't enough. You may need to shrink your Emacs or Info window.) Then come back, with SPSs.
If your screen is very tall, all of this node might fit at once. In that case, b won't do anything. Sorry; what can we do?
You have just learned a considerable number of commands. If you
want to use one but have trouble remembering which, you should type
a ? (in Emacs it runs the Info-summary
command) which
displays a brief list of commands. When you are finished looking at
the list, make it go away by typing a SPC repeatedly.
>> Type a ? now. Press SPC to see consecutive screenfuls of the list until finished. Then type SPC several times, until it goes away.
(If you are using the stand-alone Info reader, type C-x 0 to return here, that is--press and hold CTRL, type an x, then release CTRL and x, and press 0---a zero, not the letter "o".)
From now on, you will encounter large nodes without warning, and will be expected to know how to use SPC and BACKSPACE to move around in them without being told. Since not all terminals have the same size screen, it would be impossible to warn you anyway.
>> Now type n, or click the mouse on the `Next' link, to see the description of the m command.
With only the n (next) and p (previous) 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 usually contains 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 do not 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: Node about FOO This tells about FOO
The subtopic name is Foo, and the node describing it is `Node about FOO'. The rest of the line is just for the reader's Information. [[ But this line is not a real menu item, simply because there is no line above it which starts with `* Menu:'.]]
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 SPC to find the menu in this node, then come back to the front with a b and some SPCs. As you see, a menu is actually visible in its node. If you cannot find a menu in a node by looking at it, then the node does not have a menu and the m command is not available.
The command to go to one of the subnodes is m---but do not do it yet! Before you use m, you need to learn about commands which prompt you for more input. So far, you have learned several commands that do not need additional input; when you typed one, Info processed it and was 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 subtopic name.
Now look for the line containing many dashes near the bottom of the screen. There is one more line beneath that one, but usually it is blank. If it is empty, Info is ready for a command, such as n or b or SPC or m. If that line contains text ending in a colon, it means Info is trying to read more input for the last command. At such times, commands do not work, because Info tries to use them as the input it needs. You must either type your response and finish the command you started, or type Control-g to cancel the command. When you have done one of those things, the line becomes blank again.
The command to go to a subnode via a menu is m. After you type
the m, the line at the bottom of the screen says `Menu item: '.
You must then type the name of the subtopic you want, and end it with
a RET. In Emacs, m runs the command Info-menu
.
You can abbreviate the subtopic name. If the abbreviation is not unique, the first matching subtopic is chosen. Some menus put the shortest possible abbreviation for each subtopic name in capital letters, so you can see how much you need to type. It does not matter whether you use upper case or lower case when you type the subtopic. 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.
You can also use the completion feature to help enter the subtopic name. If you type the TAB key after entering part of a name, it will magically fill in more of the name--as much as follows uniquely from what you have entered.
If you move the cursor to one of the menu subtopic lines, then you do not need to type the argument: you just type a RET, and it stands for the subtopic of the line you are on.
Here is a menu to give you a chance to practice. This menu gives you three ways of going to one place, Help-FOO:
>> Now type just an m and see what happens:
Now you are "inside" an m command. Commands cannot be used now; the next thing you will type must be the name of a subtopic.
You can change your mind about doing the m by typing Control-g.
>> Try that now; notice the bottom line clear.
>> Then type another m.
>> Now type BAR, the item name. Do not type RET yet.
While you are typing the item name, you can use the DEL (or BACKSPACE) key to cancel one character at a time if you make a mistake.
>> Press DEL to cancel the `R'. You could type another R to replace it. But you do not have to, since `BA' is a valid abbreviation.
>> Now you are ready to go. Type a RET.
After visiting `Help-FOO', you should return here.
Another way to move to the menu subtopic lines and between them is to type TAB. Each time you type a TAB, you move to the next subtopic line. To move to a previous subtopic line, type M-TAB---that is, press and hold the META key and then press TAB. (On some keyboards, the META key might be labeled `Alt'.)
Once you move cursor to a subtopic line, press RET to go to that subtopic's node.
If your terminal supports a mouse, you have yet another way of going to a subtopic. Move your mouse pointer to the subtopic line, somewhere between the beginning `*' and the colon `:' which ends the subtopic's brief name. You will see the subtopic's name change its appearance (usually, its background color will change), and the shape of the mouse pointer will change if your platform supports that. After a while, if you leave the mouse on that spot, a tooltip will pop up saying "Mouse-2: go to that node". (If the tooltips are turned off or unavailable, this message is displayed in the echo area, the bottom screen line where you typed the menu subtopics in response to the prompt.) Mouse-2 is the second button of your mouse counting from the left--the rightmost button for two-button mice, the middle button for 3-button mice. So pressing Mouse-2 while the mouse pointer is on a menu subtopic goes to that subtopic.
More generally, Mouse-2 in an Info buffer runs the Emacs
command Info-mouse-follow-nearest-node
, which finds the nearest
link to another node and goes there. For example, near a cross
reference it acts like f, in a menu it acts like m, on the
node's header line it acts like n, p, or u, etc. At
end of the node's text Mouse-2 moves to the next node, or up if
there's no next node.
Here is another way to get to Help-FOO, a menu. You can ignore this if you want, or else try it by typing TAB and then RET, or clicking Mouse-2 on it (but then please come back to here).
>> Type n to see more commands.
Congratulations! This is the node `Help-FOO'. It has an `Up' pointer `Help-M', the node you just came from via the m command. This is the usual convention--the nodes you reach from a menu have `Up' nodes that lead back to the menu. Menus move Down in the tree, and `Up' moves Up. `Previous', on the other hand, is usually used to "stay on the same level but go backwards".
You can go back to the node `Help-M' by typing the command
u for "Up" (the Emacs command run by u is
Info-up
). That puts you at the front of the node--to
get back to where you were reading you have to type some SPCs.
(Some Info readers, such as the one built into Emacs, put you at the
same place where you were reading in `Help-M'.)
Another way to go Up is to click on the `Up' pointer shown in the header line (provided that you have a mouse).
>> Now type u to move back up to `Help-M'.
In Info documentation, you will see many cross references. Cross references look like this: See section 2.5.1 The node reached by the cross reference in Info. That text is a real, live cross reference, whose name is `Cross' and which points to the node named `Help-Cross'.
There are two ways to follow a cross reference. You can move the
cursor to it and press RET, just as in a menu. RET
follows the cross reference that the cursor is on. Or you can type
f and then specify the name of the cross reference (in this
case, `Cross') as an argument. In Emacs Info, f runs
Info-follow-reference
,
In the f command, you select the cross reference with its name, so it does not matter where the cursor was. If the cursor is on or near a cross reference, f suggests that reference name in parentheses as the default; typing RET will follow that reference. However, if you type a different reference name, f will follow the other reference which has that name.
>> Type f, followed by Cross, and then RET.
As you enter the reference name, you can use the DEL (or BACKSPACE) key to edit your input. If you change your mind about following any reference, you can use Control-g to cancel the command. Completion is available in the f command; you can complete among all the cross reference names in the current node by typing a TAB.
To get a list of all the cross references in the current node, you can type ? after an f. The f continues to await a cross reference name even after displaying the list, so if you don't actually want to follow a reference, you should type a Control-g to cancel the f.
>> Type f? to get a list of the cross references in this node. Then type a Control-g and see how the `f' gives up.
The TAB and M-TAB key, which move between menu items in a menu, also move between cross references outside of menus.
The introductory course is almost over; please continue a little longer to learn some intermediate-level commands.
Most Info files have an index, which is actually a large node that contains nothing but a menu. The menu has one menu item for each topic listed in the index. You can find the index node from the main menu of the file, with the m command; then you can use the m command again in the index node to go to the node that describes the topic.
There is also a short-cut Info command, i, which does all of that for you. It searches the index for a given topic (a string) and goes to the node which is listed in the index for that topic. See section 2.2 How to search Info documents for specific subjects, for a full explanation.
If you have been moving around to different nodes and wish to retrace your steps, the l command (l for last) will do that, one node-step at a time. As you move from node to node, Info records the nodes where you have been in a special history list. The l command revisits nodes in the history list; each successive l command moves one step back through the history.
If you have been following directions, ad l command now will get you back to `Help-M'. Another l command would undo the u and get you back to `Help-FOO'. Another l would undo the m and get you back to `Help-M'.
In Emacs, l runs the command Info-last
.
>> Try typing three l's, pausing in between to see what each l does. Then follow directions again and you will end up back here.
Note the difference between l and p: l moves to where you last were, whereas p always moves to the node which the header says is the `Previous' node (from this node, the `Prev' link leads to `Help-M').
The d command (Info-directory
in Emacs) gets you
instantly to the Directory node. This node, which is the first one
you saw when you entered Info, has a menu which leads (directly or
indirectly, through other menus), to all the nodes that exist. The
Directory node lists all the manuals and other Info documents that
are, or could be, installed on your system.
>> Try doing a d, then do an l to return here (yes, do return).
The t command moves to the `Top' node of the manual.
This is useful if you want to browse the manual's main menu, or select
some specific top-level menu item. The Emacs command run by t
is Info-top-node
.
Clicking Mouse-2 on or near a cross reference also follows the reference. You can see that the cross reference is mouse-sensitive by moving the mouse pointer to the reference and watching how the underlying text and the mouse pointer change in response.
>> Now type n to see the last node of the course.
See section 2. Info for Experts, for more advanced Info features.
Go to the first, previous, next, last section, table of contents.