Info is a program which is used to view info files on an ASCII
terminal. info files are the result of processing texinfo files
with the program
makeinfo or with the Emacs command
texinfo-format-buffer. Finally, texinfo is a documentation
language which allows a printed manual and on-line documentation (an
info file) to be produced from a single source file.
Many people find that reading screens of text page by page is made easier when one is able to indicate particular pieces of text with some kind of pointing device. Since this is the case, GNU Info (both the Emacs and standalone versions) have several commands which allow you to move the cursor about the screen. The notation used in this manual to describe keystrokes is identical to the notation used within the Emacs manual, and the GNU Readline manual. See section `Character Conventions' in the GNU Emacs Manual, if you are unfamiliar with the notation.
The following table lists the basic cursor movement commands in Info.
Each entry consists of the key sequence you should type to execute the
cursor movement, the
M-x(7) command name (displayed in parentheses), and a short
description of what the command does. All of the cursor motion commands
can take an numeric argument (see section Miscellaneous Info Commands), to find out how to supply them. With a
numeric argument, the motion commands are simply executed that many
times; for example, a numeric argument of 4 given to
causes the cursor to move down 4 lines. With a negative numeric
argument, the motion is reversed; an argument of -4 given to the
next-line command would cause the cursor to move up 4
M-rmoves the cursor to the start of the line in the center of the window. With a numeric argument of n,
M-rmoves the cursor to the start of the nth line in the window.
Sometimes you are looking at a screenful of text, and only part of the current paragraph you are reading is visible on the screen. The commands detailed in this section are used to shift which part of the current node is visible on the screen.
scroll-backward commands can also
move forward and backward through the node structure of the file. If
you press SPC while viewing the end of a node, or DEL while
viewing the beginning of a node, what happens is controlled by the
scroll-behaviour. See section Manipulating Variables, for more information.
C-x w. When a line which needs more space than one screen width to display is displayed, a `$' appears in the rightmost column of the screen, and the remainder of the line is invisible.
This section details the numerous Info commands which select a new node to view in the current window.
The most basic node commands are `n', `p', `u', and `l'.
When you are viewing a node, the top line of the node contains some Info pointers which describe where the next, previous, and up nodes are. Info uses this line to move about the node structure of the file when you use the following commands:
You can easily select a node that you have already viewed in this window by using the `l' command -- this name stands for "last", and actually moves through the list of already visited nodes for this window. `l' with a negative numeric argument moves forward through the history of nodes for this window, so you can quickly step between two adjacent (in viewing history) nodes.
Two additional commands make it easy to select the most commonly selected nodes; they are `t' and `d'.
Here are some other commands which immediately result in the selection of a different node in the current window:
You can get the same behavior as
global-prev-node while simply scrolling through the file with
SPC and DEL; See section Manipulating Variables,
for more information.
finds the node `Buffers' in the info file `emacs'.
is equivalent to typing
C-x C-f filename
GNU Info allows you to search for a sequence of characters throughout an entire info file, search through the indices of an info file, or find areas within an info file which discuss a particular topic.
The most basic searching command is `s' (
`s' command prompts you for a string in the echo area, and then
searches the remainder of the info file for an occurrence of that string.
If the string is found, the node containing it is selected, and the
cursor is left positioned at the start of the found string. Subsequent
`s' commands show you the default search string within `[' and
`]'; pressing RET instead of typing a new string will use the
default search string.
Incremental searching is similar to basic searching, but the string is looked up while you are typing it, instead of waiting until the entire search string has been specified.
We have already discussed the `Next', `Prev', and `Up' pointers which appear at the top of a node. In addition to these pointers, a node may contain other pointers which refer you to a different node, perhaps in another info file. Such pointers are called cross references, or xrefs for short.
Cross references have two major parts: the first part is called the label; it is the name that you can use to refer to the cross reference, and the second is the target; it is the full name of the node that the cross reference points to.
The target is separated from the label by a colon `:'; first the label appears, and then the target. For example, in the sample menu cross reference below, the single colon separates the label from the target.
* Foo Label: Foo Target. More information about Foo.
Note the `.' which ends the name of the target. The `.' is not part of the target; it serves only to let Info know where the target name ends.
A shorthand way of specifying references allows two adjacent colons to stand for a target name which is the same as the label name:
* Foo Commands:: Commands pertaining to Foo.
In the above example, the name of the target is the same as the name of
the label, in this case
You will normally see two types of cross references while viewing nodes: menu references, and note references. Menu references appear within a node's menu; they begin with a `*' at the beginning of a line, and continue with a label, a target, and a comment which describes what the contents of the node pointed to contains.
Note references appear within the body of the node text; they begin with
*Note, and continue with a label and a target.
Like `Next', `Prev' and `Up' pointers, cross references can point to any valid node. They are used to refer you to a place where more detailed information can be found on a particular subject. Here is a cross reference which points to a node within the Texinfo documentation: See section `Writing an Xref' in the Texinfo Manual, for more information on creating your own texinfo cross references.
The following table lists the Info commands which operate on menu items.
This table lists the Info commands which operate on note cross references.
Finally, the next few commands operate on menu or note references alike:
select-reference-this-lineto select the menu or note reference.
A window is a place to show the text of a node. Windows have a view area where the text of the node is displayed, and an associated mode line, which briefly describes the node being viewed.
GNU Info supports multiple windows appearing in a single screen; each window is separated from the next by its modeline. At any time, there is only one active window, that is, the window in which the cursor appears. There are commands available for creating windows, changing the size of windows, selecting which window is active, and for deleting windows.
A mode line is a line of inverse video which appears at the bottom of an info window. It describes the contents of the window just above it; this information includes the name of the file and node appearing in that window, the number of screen lines it takes to display the node, and the percentage of text that is above the top of the window. It can also tell you if the indirect tags table for this info file needs to be updated, and whether or not the info file was compressed when stored on disk.
Here is a sample mode line for a window containing an uncompressed file named `dir', showing the node `Top'.
-----Info: (dir)Top, 40 lines --Top------------------------------------ ^^ ^ ^^^ ^^ (file)Node #lines where
When a node comes from a file which is compressed on disk, this is indicated in the mode line with two small `z''s. In addition, if the info file containing the node has been split into subfiles, the name of the subfile containing the node appears in the modeline as well:
--zz-Info: (emacs)Top, 291 lines --Top-- Subfile: emacs-1.Z------------
When Info makes a node internally, such that there is no corresponding info file on disk, the name of the node is surrounded by asterisks (`*'). The name itself tells you what the contents of the window are; the sample mode line below shows an internally constructed node showing possible completions:
-----Info: *Completions*, 7 lines --All--------------------------------
It can be convenient to view more than one node at a time. To allow this, Info can display more than one window. Each window has its own mode line (see section The Mode Line) and history of nodes viewed in that window (see section Selecting a New Node).
automatic-tilingcan cause all of the windows on the screen to be resized for you automatically, please see section Manipulating Variables for more information.
tile-windowsto be called when a window is created or deleted. See section Manipulating Variables.
The echo area is a one line window which appears at the bottom of the screen. It is used to display informative or error messages, and to read lines of input from you when that is necessary. Almost all of the commands available in the echo area are identical to their Emacs counterparts, so please refer to that documentation for greater depth of discussion on the concepts of editing a line of text. The following table briefly lists the commands that are available while input is being read in the echo area:
The next group of commands deal with killing, and yanking text. For an in depth discussion of killing and yanking, see section `Killing and Deleting' in the GNU Emacs Manual
Sometimes when reading input in the echo area, the command that needed input will only accept one of a list of several choices. The choices represent the possible completions, and you must respond with one of them. Since there are a limited number of responses you can make, Info allows you to abbreviate what you type, only typing as much of the response as is necessary to uniquely identify it. In addition, you can request Info to fill in as much of the response as is possible; this is called completion.
The following commands are available when completing in the echo area:
bar foliate food forgetand you have typed an `f', followed by `?', the possible completions would contain:
foliate food forgeti.e., all of the choices which begin with `f'. Pressing SPC or TAB would result in `fo' appearing in the echo area, since all of the choices which begin with `f' continue with `o'. Now, typing `l' followed by `TAB' results in `foliate' appearing in the echo area, since that is the only choice which begins with `fol'.
You may wish to print out the contents of a node as a quick reference
document for later use. Info provides you with a command for doing
this. In general, we recommend that you use TeX to format the
document and print sections of it, by running
tex on the texinfo
INFO_PRINT_COMMAND. If the variable doesn't exist, the node is simply piped to
GNU Info contains several commands which self-document GNU Info:
*Help*, and places a node containing a quick reference card into it. This window displays the most concise information about GNU Info available.
(info)Help. The info file `info.texi' distributed with GNU Info contains this node. Of course, the file must first be processed with
makeinfo, and then placed into the location of your info directory.
Here are the commands for creating a numeric argument:
C-u 3 2 C-lor
M-3 2 C-l
`C-g' is used to abort the reading of a multi-character key sequence, to cancel lengthy operations (such as multi-file searches) and to cancel reading input in the echo area.
The `q' command of Info simply quits running Info.
If the operating system tells GNU Info that the screen is 60 lines tall, and it is actually only 40 lines tall, here is a way to tell Info that the operating system is correct.
Finally, Info provides a convenient way to display footnotes which might be associated with the current node that you are viewing:
automatic-footnotes. See section Manipulating Variables.
GNU Info contains several variables whose values are looked at by various Info commands. You can change the values of these variables, and thus change the behavior of Info to more closely match your environment and info file reading manner.
Here is a list of the variables that you can set in Info.
On, footnotes appear and disappear automatically. This variable is
Onby default. When a node is selected, a window containing the footnotes which appear in that node is created, and the footnotes are displayed within the new window. The window that Info creates to contain the footnotes is called `*Footnotes*'. If a node is selected which contains no footnotes, and a `*Footnotes*' window is on the screen, the `*Footnotes*' window is deleted. Footnote windows created in this fashion are not automatically tiled so that they can use as little of the display as is possible.
On, creating or deleting a window resizes other windows. This variable is
Offby default. Normally, typing `C-x 2' divides the current window into two equal parts. When
automatic-tilingis set to
On, all of the windows are resized automatically, keeping an equal number of lines visible in each window. There are exceptions to the automatic tiling; specifically, the windows `*Completions*' and `*Footnotes*' are not resized through automatic tiling; they remain their original size.
On, GNU Info attempts to flash the screen instead of ringing the bell. This variable is
Offby default. Of course, Info can only flash the screen if the terminal allows it; in the case that the terminal does not allow it, the setting of this variable has no effect. However, you can make Info perform quietly by setting the
On, errors cause the bell to ring. The default setting of this variable is
On, Info garbage collects files which had to be uncompressed. The default value of this variable is
Off. Whenever a node is visited in Info, the info file containing that node is read into core, and Info reads information about the tags and nodes contained in that file. Once the tags information is read by Info, it is never forgotten. However, the actual text of the nodes does not need to remain in core unless a particular info window needs it. For non-compressed files, the text of the nodes does not remain in core when it is no longer in use. But de-compressing a file can be a time consuming operation, and so Info tries hard not to do it twice.
gc-compressed-filestells Info it is okay to garbage collect the text of the nodes of a file which was compressed on disk.
On, the portion of the matched search string is highlighted in the message which explains where the matched search string was found. The default value of this variable is
On. When Info displays the location where an index match was found, (see section Searching an Info File), the portion of the string that you had typed is highlighted by displaying it in the inverse case from its surrounding characters.
Continuous. There are three possible values for this variable:
global-next-node) and `[' (
Page Only, no scrolling command can change the node that is being viewed.
scroll-stephas a nonzero value, Info attempts to scroll the node text by that many lines; if that is enough to bring the cursor back into the window, that is what is done. The default value of this variable is 0, thus placing the cursor (and the text it is attached to) in the center of the window. Setting this variable to 1 causes a kind of "smooth scrolling" which some people prefer.
On, Info accepts and displays ISO Latin characters. By default, Info assumes an ASCII character set.
ISO-Latintells Info that it is running in an environment where the European standard character set is in use, and allows you to input such characters to Info, as well as display them.
Go to the first, previous, next, last section, table of contents.