Info: An Introduction
The GNU Project distributes most of its manuals in the Info format, which you read using an Info reader. You are probably using an Info reader to read this now.
There are two primary Info readers:
info, a stand-alone program
designed just to read Info files (see What is Info? in GNU Info), and the
info package in GNU Emacs, a
general-purpose editor. At present, only the Emacs reader supports
using a mouse.
This file describes how to use Info, the menu-driven GNU documentation system.
Copyright © 1989, 1992, 1996–2015 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”.
(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
|Getting Started||Getting started using an Info reader.|
|Advanced||Advanced Info commands.|
|Further Reading||Where to learn more about Info files.|
|GNU Free Documentation License||The license for this documentation.|
|Index||An index of topics, commands, and variables.|
1 Getting Started
This first part of this Info manual describes how to get around inside of Info. The second part of the manual describes various advanced Info commands. The third part contains references to other sources, which explain how to generate Info files from Texinfo files.
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 Info version as well.
There are two ways of looking at the online version of this manual:
infoat your shell’s command line. This approach uses a stand-alone program designed just to read Info files.
emacsat the command line; then type C-h i (Control-h, followed by i). This approach uses the Info mode of the Emacs editor.
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.
|• Help-Small-Screen:||Starting Info on a Small Screen.|
|• Help:||How to use Info.|
|• Help-P:||Returning to the Previous node.|
|• Help-^L:||The Space, DEL, B and ^L commands.|
|• Help-Inv:||Invisible text in Emacs Info.|
|• Help-Xref:||Following cross-references.|
|• Help-Int:||Some intermediate Info commands.|
|• Help-Q:||Quitting Info.|
1.1 Starting Info on a Small Screen
(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 the entire text you are looking at fits on the screen, the text ‘All’ will be displayed near the bottom of the screen, on the mode line (usually, the line in inverse video). If you see the text ‘Top’ instead, it means that there is more text below that does not fit. To move forward through the text and see another screenful, 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’). In a graphical Emacs, you can also use S-SPC (press and hold the Shift key and then press SPC) to move backwards, but this does not work in the stand-alone Info reader (nor in Emacs, if you are using it in a text-mode terminal).
1.2 How to use Info
You are talking to the program Info, for reading documentation.
There are two ways to use Info: from within Emacs or as a
stand-alone reader that you can invoke from a shell using the command
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 with a special typeface, and remains at the top of the window all the time even if you scroll through the node.
Besides a ‘Next’, a node can have a ‘Previous’ link, or an ‘Up’ link, 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 are in Emacs and have a mouse, and if you already practiced typing n to get to the next node, click now with the left mouse button on the ‘Next’ link to do the same “the mouse way”.
1.3 Returning to the Previous node
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’.
>> But do not type n yet. First, try the p command, or (in Emacs) click on the ‘Prev’ link. That takes you to the ‘Previous’ node. Then use n 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 the mouse on the ‘Info’ menu-bar item opens a menu of commands which include ‘Next’ and ‘Previous’ (and also some others which you didn’t yet learn about).
This all probably seems insultingly simple so far, but please don’t start skimming. Things will get complicated soon enough! Also, please do not try a new command until you are told it is time to. You could make Info skip past an important warning that was coming up.
>> Now do an n, or (in Emacs) click the middle mouse button on the ‘Next’ link, to get to the node ‘Help-^L’ and learn more.
1.4 The Space, DEL, B and ^L commands
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 highlighted and may be underlined as well; it says what the node is about.
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 text ‘Top’ rather than ‘All’ near the bottom 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).
>> 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 at any time by clicking the middle mouse button on the link.
SPC and DEL not only move forward and backward through the current node. They also move between nodes. SPC at the end of a node moves to the next node; DEL (or BACKSPACE) at the beginning of a node moves to the previous node. In effect, these commands scroll through all the nodes in an Info file as a single logical sequence. You can read an entire manual top to bottom by just typing SPC, and move backward through the entire manual from bottom to top by typing DEL (or BACKSPACE).
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.
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 of one node, like SPC and BACKSPACE (or DEL). However, PAGEUP and PAGEDOWN keys 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 the BACKSPACE key (or DEL) many times. You can also type b just once. b stands 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, by typing SPC one or more times.
You have just learned a considerable number of commands. If you want to use one but have trouble remembering which, you should type ?, which displays a brief list of commands. When you are finished looking at the list, make it go away by typing SPC repeatedly.
>> Type a ? now. Press SPC to see consecutive screenfuls of the list until finished. Then type SPC several times. If you are using Emacs, the help will then go away automatically. If you are using the stand-alone Info reader, type x to return here.
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 middle mouse button on the ‘Next’ link, to visit the next node.
1.5 Invisible text in Emacs Info
Before discussing menus, we need to make some remarks that are only relevant to users reading Info using Emacs. Users of the stand-alone version can skip this node by typing ] now.
In Emacs, certain text that appears in the stand-alone version is normally hidden, technically because it has the ‘invisibility’ property. Invisible text is really a part of the text. It becomes visible (by default) after killing and yanking, it appears in printed output, it gets saved to file just like any other text, and so on. Thus it is useful to know it is there.
You can make invisible text visible by using the command M-x visible-mode. Visible mode is a minor mode, so using the command a second time will make the text invisible again. Watch the effects of the command on the “menu” below and the top line of this node.
If you prefer to always see the invisible text, you can set
nil. Enabling Visible mode
permanently is not a real alternative, because Emacs Info also uses
(although less extensively) another text property that can change the
text being displayed, the ‘display’ property. Only the
invisibility property is affected by Visible mode. When, in this
tutorial, we refer to the ‘Emacs’ behavior, we mean the
default Emacs behavior.
Now type ], to learn about the ] and [ commands.
|• ]:||Node telling about ].|
|• stuff:||Same node.|
|• Help-]:||Yet again, same node.|
1.5.1 The ] and [ commands
If you type n now, you get an error message saying that this node has no next node. Similarly, if you type p, the error message tells you that there is no previous node. (The exact message depends on the Info reader you use.) This is because n and p carry you to the next and previous node at the same level. The present node is contained in a menu (see next) of the node you came from, and hence is considered to be at a lower level. It is the only node in the previous node’s menu (even though it was listed three times). Hence it has no next or previous node that n or p could move to.
If you systematically move through a manual by typing n, you run the risk of skipping many nodes. You do not run this risk if you systematically use SPC, because, when you scroll to the bottom of a node and type another SPC, then this carries you to the following node in the manual regardless of level. If you immediately want to go to that node, without having to scroll to the bottom of the screen first, you can type ].
Similarly, BACKSPACE carries you to the preceding node regardless of level, after you scrolled to the beginning of the present node. If you want to go to the preceding node immediately, you can type [.
For instance, typing this sequence will come back here in three steps: [ n [. To do the same backward, type ] p ].
Now type ] to go to the next node and learn about menus.
1.6 Menus and the m command
With only the n (next), p (previous), SPC, BACKSPACE, ] and [ 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 ‘:’, normally hidden in Emacs), the name of the node that talks about that subtopic (again, normally hidden in Emacs), 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:’. Also, in a real menu item, the ‘*’ would appear at the very start of the line. This is why the “normally hidden” text in Emacs, namely ‘: Node about FOO.’, is actually visible in this example, even when Visible mode is off.]]
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 ‘::’ is normally hidden in Emacs.)
>> 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.
If you keep typing SPC once the menu appears on the screen, it will move to another node (the first one in the menu). If that happens, type BACKSPACE to come back.
The command to go to one of the subnodes is m. This is very different from the commands you have used: it is a command that prompts you for more input.
The Info commands you know do not need additional input; when you type one of them, Info processes it instantly and then is ready for another command. The m command is different: it needs to know the name of the subtopic. Once you have typed m, Info tries to read the subtopic name.
Now, in the stand-alone Info, look for the line containing many dashes near the bottom of the screen. (This is the stand-alone equivalent for the mode line in Emacs.) There is one more line beneath that one, but usually it is blank. (In Emacs, this is the echo area.) When it is blank, 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 reading more input for the last command. You can’t type an Info command then, because Info is trying to read input, not commands. You must either give the input and finish the command you started, or type Control-g to cancel the command. When you have done one of those things, the input entry line becomes blank again. Then you can type Info commands 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.
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 fill in more of the name—as much as Info can deduce from the part 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. You can also click the middle mouse button directly on the subtopic line to go there.
Here is a menu to give you a chance to practice. This menu gives you three ways of going to one place, Help-FOO:
|• Foo:||A node you can visit for fun.|
|• Bar:||We have made two ways to get to the same place.|
|• Help-FOO:||And yet another!|
(Turn Visible mode on if you are using Emacs.)
>> 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 in the stand-alone reader, 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’.) In Emacs Info, type S-TAB to move to a previous subtopic line (press and hold the Shift key and then press TAB).
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 small window will pop up, saying “Mouse-2: go to that node,” or the same message may appear at the bottom of the screen.
Mouse-2 is the second button of your mouse counting from the left—the middle button on a 3-button mouse. (On a 2-button mouse, you may have to press both buttons together to “press the middle button”.) The message tells you pressing Mouse-2 with the current position of the mouse pointer (on subtopic in the menu) will go to that subtopic.
More generally, Mouse-2 in an Info buffer 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.
>> Type n to see more commands.
1.6.1 The u command
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”. This puts you at the menu subtopic line pointing to the subnode that the u command brought you from. (Some Info readers may put you at the front of the node instead—to get back to where you were reading, you have to type some SPCs.)
Another way to go Up is to click Mouse-2 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’.
1.7 Following Cross-References
In Info documentation, you will see many cross references. Cross references look like this: See Cross. That text is a real, live cross reference, whose name is ‘Cross’ and which points to the node named ‘Help-Cross’. (The node name is hidden in Emacs. Do M-x visible-mode to show or hide it.)
You can follow a cross reference by moving the cursor to it and press RET, just as in a menu. In Emacs, you can also click Mouse-1 on a cross reference to follow it; 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.
Another way to follow a cross reference is to type f and then specify the name of the cross reference (in this case, ‘Cross’) as an argument. For this command, 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, M-TAB and S-TAB keys, which move between menu items in a menu, also move between cross references outside of menus.
Sometimes a cross reference (or a node) can lead to another file (in other words another “manual”), or, on occasion, even a file on a remote machine (although Info files distributed with Emacs or the stand-alone Info avoid using remote links). Such a cross reference looks like this: See Overview of Texinfo in Texinfo: The GNU Documentation Format. (After following this link, type l to get back to this node.) Here the name ‘texinfo’ between parentheses refers to the file name. This file name appears in cross references and node names if it differs from the current file, so you can always know that you are going to be switching to another manual and which one.
However, Emacs normally hides some other text in cross-references.
If you put your mouse over the cross reference, then the information
appearing in a separate box (tool tip) or in the echo area will show
the full cross-reference including the file name and the node name of
the cross reference. If you have a mouse, just leave it over the
cross reference See Overview of Texinfo in Texinfo:
The GNU Documentation Format, and watch what happens. If you
always like to have that information visible without having to move
your mouse over the cross reference, use M-x visible-mode, or
Info-hide-note-references to a value other than
(see Emacs Info Variables).
>> Now type n to learn more commands.
|• Help-Cross:||Target of a cross-reference.|
1.7.1 The node reached by the cross reference in Info
This is the node reached by the cross reference named ‘Cross’.
While this node is specifically intended to be reached by a cross reference, most cross references lead to nodes that “belong” someplace else far away in the structure of an Info document. So you cannot expect this node to have a ‘Next’, ‘Previous’ or ‘Up’ links pointing back to where you came from. In general, the l (el) command is the only way to get back there.
>> Type l to return to the node where the cross reference was.
1.8 Some intermediate Info commands
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 containing little but a menu. The menu has one menu item for each topic listed in the index. (As a special feature, menus for indices may also include the line number within the node of the index entry. This allows Info readers to go to the exact line of an entry, not just the start of the containing node.)
You can get to the index from the main menu of the file with the m command and the name of the index node; then you can use the m command again in the index node to go to the node that describes the topic you want.
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 Search Index, 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.
>> Try typing p p n and then three l’s, pausing in between to see what each l does. You should wind up right 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-Xref’).
You can use the r command (
Info-history-forward in Emacs)
to revisit nodes in the history list in the forward direction, so that
r will return you to the node you came from by typing l.
The L command (
Info-history in Emacs) creates a virtual
node that contains a list of all nodes you visited. You can select
a previously visited node from this menu to revisit it.
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
>> Now type n to see the last node of the course.
See Advanced, for more advanced Info features.
1.9 Quitting Info
To get out of Info, back to what you were doing before, type q
for Quit. This runs
Info-exit in Emacs.
This is the end of the basic course on using Info. You have learned how to move in an Info document, and how to follow menus and cross references. This makes you ready for reading manuals top to bottom, as new users should do when they learn a new package.
Another set of Info commands is useful when you need to find something quickly in a manual—that is, when you need to use a manual as a reference rather than as a tutorial. We urge you to learn these search commands as well. If you want to do that now, follow this cross reference to Advanced.
Yet another set of commands are meant for experienced users; you can find them by looking in the Directory node for documentation on Info. Finding them will be a good exercise in using Info in the usual manner.
>> Type d to go to the Info directory node; then type mInfo and Return, to get to the node about Info and see what other help is available.
2 Advanced Info Commands
This chapter describes various advanced Info commands. (If you are using a stand-alone Info reader, there are additional commands specific to it, which are documented in several chapters of GNU Info in GNU Info.)
One advanced command useful with most of the others described here is C-q, which “quotes” the next character so that it is entered literally (see Inserting Text in The GNU Emacs Manual). For example, pressing ? ordinarily brings up a list of completion possibilities. If you want to (for example) search for an actual ‘?’ character, the simplest way is to insert it using C-q ?. This works the same in Emacs and stand-alone Info.
|• Search Text:||How to search Info documents.|
|• Search Index:||How to search the indices for specific subjects.|
|• Go to node:||How to go to a node by name.|
|• Choose menu subtopic:||How to choose a menu subtopic by its number.|
|• Create Info buffer:||How to create a new Info buffer in Emacs.|
|• Emacs Info Variables:||Variables modifying the behavior of Emacs Info.|
2.1 s searches Info documents
The commands which move between and inside nodes allow you to read the entire manual or its large portions. But what if you need to find some information in the manual as fast as you can, and you don’t know or don’t remember in what node to look for it? This need arises when you use a manual as a reference, or when it is impractical to read the entire manual before you start using the programs it describes.
Info has powerful searching facilities that let you find things quickly. You can search either the manual text or its indices.
The s command allows you to search a whole Info file for a string. It switches to the next node if and when that is necessary. You type s followed by the string to search for, terminated by RET. To search for the same string again, just s followed by RET will do. The file’s nodes are scanned in the order they are in the file, which has no necessary relationship to the order that they may be in the tree structure of menus and ‘next’ pointers. But normally the two orders are not very different. In any case, you can always look at the mode line to find out what node you have reached, if the header is not visible (this can happen, because s puts your cursor at the occurrence of the string, not at the beginning of the node).
Instead of using s in Emacs Info and in the stand-alone Info,
you can use an incremental search started with C-s or C-r.
It can search through multiple Info nodes. See Incremental Search in The GNU Emacs Manual. In Emacs, you can disable this behavior
by setting the variable
(see Emacs Info Variables).
2.2 i searches the indices for specific subjects
Since most topics in the manual should be indexed, you should try the index search first before the text search. The i command prompts you for a subject and then looks up that subject in the indices. If it finds an index entry with the subject you typed, it goes to the node to which that index entry points. You should browse through that node to see whether the issue you are looking for is described there. If it isn’t, type , one or more times to go through additional index entries which match your subject.
The i command and subsequent , commands find all index entries which include the string you typed as a substring. For each match, Info shows in the echo area the full index entry it found. Often, the text of the full index entry already gives you enough information to decide whether it is relevant to what you are looking for, so we recommend that you read what Info shows in the echo area before looking at the node it displays.
Since i looks for a substring, you can search for subjects even if you are not sure how they are spelled in the index. For example, suppose you want to find something that is pertinent to commands which complete partial input (e.g., when you type TAB). If you want to catch index entries that refer to “complete,” “completion,” and “completing,” you could type icompletRET.
Info documents which describe programs should index the commands, options, and key sequences that the program provides. If you are looking for a description of a command, an option, or a key, just type their names when i prompts you for a topic. For example, if you want to read the description of what the C-l key does, type iC-lRET literally.
Emacs provides the command
Info-virtual-index, bound to the
I key. This behaves like i, but constructs a virtual
info node displaying the results of an index search, making it easier
to select the one you want.
If you aren’t sure which manual documents the topic you are looking for, try the M-x info-apropos command in Emacs, or the M-x index-apropos command in the stand-alone reader. It prompts for a string and then looks up that string in all the indices of all the Info documents installed on your system.
2.3 g goes to a node by name
If you know a node’s name, you can go there by typing g, the name, and RET. Thus, gTopRET would go to the node called ‘Top’ in this file. (This is equivalent to t, see Help-Int.) gGo to nodeRET would come back here.
Unlike m, g does not allow the use of abbreviations. But it does allow completion, so you can type TAB to complete a partial node name.
To go to a node in another file, you can include the file name in the node name by putting it at the front, in parentheses. Thus, g(dir)TopRET would go to the Info Directory node, which is the node ‘Top’ in the Info file dir. Likewise, g(emacs)TopRET (or just g(emacs)RET) goes to the top node of the Emacs manual.
The node name ‘*’ specifies the whole file. So you can look at all of the current file by typing g*RET or all of any other file with g(filename)*RET.
2.4 1–9 choose a menu subtopic by its number
If you begrudge each character of type-in which your system requires, you might like to use the commands 1, 2, 3, 4, …, 9. They are short for the m command together with a name of a menu subtopic. 1 goes through the first item in the current node’s menu; 2 goes through the second item, etc. In the stand-alone reader, 0 goes through the last menu item; this is so you need not count how many entries are there.
If your display supports multiple fonts, colors or underlining, and you are using Emacs’s Info mode to read Info files, the third, sixth and ninth menu items have a ‘*’ that stands out, either in color or in some other attribute, such as underline; this makes it easy to see at a glance which number to use for an item.
Some terminals don’t support either multiple fonts, colors or underlining. If you need to actually count items, it is better to use m instead, and specify the name, or use TAB to quickly move between menu items.
2.5 M-n creates a new independent Info buffer in Emacs
If you are reading Info in Emacs, you can select a new independent
Info buffer in a new Emacs window by typing M-n. The new buffer
starts out as an exact copy of the old one, but you will be able to
move independently between nodes in the two buffers. (In Info mode,
M-n runs the Emacs command
In Emacs Info, you can also produce new Info buffers by giving a numeric prefix argument to the m and g commands. C-u m and C-u g go to a new node in exactly the same way that m and g do, but they do so in a new Info buffer which they select in another window.
Another way to produce new Info buffers in Emacs is to use a numeric
prefix argument for the C-h i command (
switches to the Info buffer with that number. Thus, C-u 2 C-h i
switches to the buffer *info*<2>, creating it if necessary.
If you have created many Info buffers in Emacs, you might find it difficult to remember which buffer is showing which manual. You can use the command M-x info-display-manual to show an Info manual by name, reusing an existing buffer if there is one.
2.6 Emacs Info-mode Variables
The following variables may modify the behavior of Info-mode in Emacs; you may wish to set one or several of these variables interactively, or in your init file. See Examining and Setting Variables in The GNU Emacs Manual. The stand-alone Info reader program has its own set of variables, described in Manipulating Variables in GNU Info.
The list of directories to search for Info files. Each element is a string (directory name) or
nil(try default directory). If not initialized Info uses the environment variable
INFOPATHto initialize it, or
Info-default-directory-listif there is no
INFOPATHvariable in the environment.
If you wish to customize the Info directory search list for both Emacs Info and stand-alone Info, it is best to set the
INFOPATHenvironment variable, since that applies to both programs.
A list of additional directories to search for Info documentation files. These directories are not searched for merging the dir file.
Hooks run when
Info-modeis called. By default, it contains the hook
turn-on-font-lockwhich enables highlighting of Info files. You can change how the highlighting looks by customizing the faces
info-title-n(where n is the level of the section, a number between 1 and 4). To customize a face, type M-x customize-face RET face RET, where face is one of the face names listed here.
Maximum size of menu to fontify if
nil, menu items and cross-references pointing to visited nodes are displayed in the
nil, Emacs puts in the Info buffer a header line showing the ‘Next’, ‘Prev’, and ‘Up’ links. A header line does not scroll with the rest of the buffer, making these links always visible.
As explained in earlier nodes, the Emacs version of Info normally hides some text in menus and cross-references. You can completely disable this feature, by setting this option to
nil. Setting it to a value that is neither
tproduces an intermediate behavior, hiding a limited amount of text, but showing all text that could potentially be useful.
If set to a non-
nilvalue, SPC and BACKSPACE (or DEL, or S-SPC) keys in a menu visit subnodes of the current node before scrolling to its end or beginning, respectively. For example, if the node’s menu appears on the screen, the next SPC moves to a subnode indicated by the following menu item. Setting this option to
nilresults in behavior similar to the stand-alone Info reader program, which visits the first subnode from the menu only when you hit the end of the current node. The default is
nil, isearch in Info searches through multiple nodes.
When set to a non-
nilvalue, allows Info to execute Lisp code associated with nodes. The Lisp code is executed when the node is selected. The Lisp code to be executed should follow the node delimiter (the ‘DEL’ character) and an ‘execute: ’ tag, like this:
^_execute: (message "This is an active node!")
3 Further Reading
Info files are created from Texinfo source files. You can use the same source file to make a printed manual or produce other formats, such as HTML and DocBook.
makeinfo command converts a Texinfo file into an Info file;
texinfo-format-buffer are GNU
Emacs functions that do the same.
See Overview of Texinfo in Texinfo: The GNU Documentation Format, for how to write a Texinfo file.
See Creating an Info File in Texinfo: The GNU Documentation Format, for how to create an Info file from a Texinfo file.
See Installing an Info File in Texinfo: The GNU Documentation Format, for how to install an Info file after you have created one.
Appendix A GNU Free Documentation License
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The purpose of this License is to make a manual, textbook, or other functional and useful document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.
This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.
- APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.
A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.
A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.
The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.
The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.
A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.
The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.
The “publisher” means any person or entity that distributes copies of the Document to the public.
A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.
- VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
- COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
- Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
- List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
- State on the Title page the name of the publisher of the Modified Version, as the publisher.
- Preserve all the copyright notices of the Document.
- Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
- Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
- Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice.
- Include an unaltered copy of this License.
- Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
- Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
- For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
- Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
- Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.
- Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.
- Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.
You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.
- COMBINING DOCUMENTS
You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements.”
- COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.
- AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.
Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.
- FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document.
“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.
“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.
“Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.
An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:
Copyright (C) year your name. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with…Texts.” line with this:
with the Invariant Sections being list their titles, with the Front-Cover Texts being list, and with the Back-Cover Texts being list.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.
This is an alphabetical listing of all the commands, variables, and topics discussed in this document.
A B C D E F G H I L M N P Q R S T U V
A B C D E F G H I L M N P Q R S T U V
The key which we call “Backspace or DEL” in this manual is labeled differently on different keyboards. Look for a key which is a little ways above the ENTER or RET key and which you normally use outside Emacs to erase the character before the cursor, i.e., the character you typed last. It might be labeled ‘Backspace’ or ‘<-’ or ‘DEL’, or sometimes ‘Delete’.