Remove string.h hack.
[bpt/emacs.git] / man / info-stnd.texi
CommitLineData
26901792
DL
1@c This file is meant to be included in any arbitrary piece of
2@c documentation that wishes to describe the info program.
3@c
4@c This file documents the use of the standalone GNU Info program,
5@c versions 2.7 and later. It was authored by Brian Fox (bfox@gnu.org).
6
7@ifclear InfoProgVer
8@set InfoProgVer 2.10
9@end ifclear
10@synindex vr cp
11@synindex fn cp
12@synindex ky cp
13
14@heading What is Info?
15
16This text documents the use of the GNU Info program, version
17@value{InfoProgVer}.
18
19@dfn{Info} is a program which is used to view info files on an ASCII
20terminal. @dfn{info files} are the result of processing texinfo files
21with the program @code{makeinfo} or with the Emacs command @code{M-x
22texinfo-format-buffer}. Finally, @dfn{texinfo} is a documentation
23language which allows a printed manual and online documentation (an info
24file) to be produced from a single source file.
25
26@menu
27* Options:: Options you can pass on the command line.
28* Cursor Commands:: Commands which move the cursor within a node.
29* Scrolling Commands:: Commands for moving the node around in a window.
30* Node Commands:: Commands for selecting a new node.
31* Searching Commands:: Commands for searching an info file.
32* Xref Commands:: Commands for selecting cross references.
33* Window Commands:: Commands which manipulate multiple windows.
34* Printing Nodes:: How to print out the contents of a node.
35* Miscellaneous Commands:: A few commands that defy categories.
36* Variables:: How to change the default behaviour of Info.
37@ifset NOTSET
38* Info for Sys Admins:: How to setup Info. Using special options.
39@end ifset
40@ifset STANDALONE
41* GNU Info Global Index:: Global index containing keystrokes, command names,
42 variable names, and general concepts.
43@end ifset
44@end menu
45
46@node Options
47@chapter Command Line Options
48@cindex command line options
49@cindex arguments, command line
50
51GNU Info accepts several options to control the initial node being
52viewed, and to specify which directories to search for info files. Here
53is a template showing an invocation of GNU Info from the shell:
54
55@example
56info [--@var{option-name} @var{option-value}] @var{menu-item}@dots{}
57@end example
58
59The following @var{option-names} are available when invoking Info from
60the shell:
61
62@table @code
63@cindex directory path
64@item --directory @var{directory-path}
65@itemx -d @var{directory-path}
66Adds @var{directory-path} to the list of directory paths searched when
67Info needs to find a file. You may issue @code{--directory} multiple
68times; once for each directory which contains info files.
69Alternatively, you may specify a value for the environment variable
70@code{INFOPATH}; if @code{--directory} is not given, the value of
71@code{INFOPATH} is used. The value of @code{INFOPATH} is a colon
72separated list of directory names. If you do not supply
73@code{INFOPATH} or @code{--directory-path} a default path is used.
74
75@item --file @var{filename}
76@itemx -f @var{filename}
77@cindex info file, selecting
78Specifies a particular info file to visit. Instead of visiting the file
79@code{dir}, Info will start with @code{(@var{filename})Top} as the first
80file and node.
81
82@item --node @var{nodename}
83@itemx -n @var{nodename}
84@cindex node, selecting
85Specifies a particular node to visit in the initial file loaded. This
86is especially useful in conjunction with @code{--file}@footnote{Of
87course, you can specify both the file and node in a @code{--node}
88command; but don't forget to escape the open and close parentheses from
89the shell as in: @code{info --node '(emacs)Buffers'}}. You may specify
90@code{--node} multiple times; for an interactive Info, each
91@var{nodename} is visited in its own window, for a non-interactive Info
92(such as when @code{--output} is given) each @var{nodename} is processed
93sequentially.
94
95@item --output @var{filename}
96@itemx -o @var{filename}
97@cindex file, outputting to
98@cindex outputting to a file
99Specify @var{filename} as the name of a file to output to. Each node
100that Info visits will be output to @var{filename} instead of
101interactively viewed. A value of @code{-} for @var{filename} specifies
102the standard output.
103
104@item --subnodes
105@cindex @code{--subnodes}, command line option
106This option only has meaning when given in conjunction with
107@code{--output}. It means to recursively output the nodes appearing in
108the menus of each node being output. Menu items which resolve to
109external info files are not output, and neither are menu items which are
110members of an index. Each node is only output once.
111
112@item --help
113@itemx -h
114Produces a relatively brief description of the available Info options.
115
116@item --version
117@cindex version information
118Prints the version information of Info and exits.
119
120@item @var{menu-item}
121@cindex menu, following
122Remaining arguments to Info are treated as the names of menu items. The
123first argument would be a menu item in the initial node visited, while
124the second argument would be a menu item in the first argument's node.
125You can easily move to the node of your choice by specifying the menu
126names which describe the path to that node. For example,
127
128@example
129info emacs buffers
130@end example
131
132first selects the menu item @samp{Emacs} in the node @samp{(dir)Top},
133and then selects the menu item @samp{Buffers} in the node
134@samp{(emacs)Top}.
135
136@end table
137
138@node Cursor Commands
139@chapter Moving the Cursor
140@cindex cursor, moving
141Many people find that reading screens of text page by page is made
142easier when one is able to indicate particular pieces of text with some
143kind of pointing device. Since this is the case, GNU Info (both the
144Emacs and standalone versions) have several commands which allow you to
145move the cursor about the screen. The notation used in this manual to
146describe keystrokes is identical to the notation used within the Emacs
147manual, and the GNU Readline manual. @xref{Characters, , Character
148Conventions, emacs, the GNU Emacs Manual}, if you are unfamiliar with the
149notation.
150
151The following table lists the basic cursor movement commands in Info.
152Each entry consists of the key sequence you should type to execute the
153cursor movement, the @code{M-x}@footnote{@code{M-x} is also a command; it
154invokes @code{execute-extended-command}. @xref{M-x, , Executing an
155extended command, emacs, the GNU Emacs Manual}, for more detailed
156information.} command name (displayed in parentheses), and a short
157description of what the command does. All of the cursor motion commands
158can take an @dfn{numeric} argument (@pxref{Miscellaneous Commands,
159@code{universal-argument}}), to find out how to supply them. With a
160numeric argument, the motion commands are simply executed that
161many times; for example, a numeric argument of 4 given to
162@code{next-line} causes the cursor to move down 4 lines. With a
163negative numeric argument, the motion is reversed; an argument of -4
164given to the @code{next-line} command would cause the cursor to move
165@emph{up} 4 lines.
166
167@table @asis
168@item @code{C-n} (@code{next-line})
169@kindex C-n
170@findex next-line
171Moves the cursor down to the next line.
172
173@item @code{C-p} (@code{prev-line})
174@kindex C-p
175@findex prev-line
176Move the cursor up to the previous line.
177
178@item @code{C-a} (@code{beginning-of-line})
179@kindex C-a, in Info windows
180@findex beginning-of-line
181Move the cursor to the start of the current line.
182
183@item @code{C-e} (@code{end-of-line})
184@kindex C-e, in Info windows
185@findex end-of-line
186Moves the cursor to the end of the current line.
187
188@item @code{C-f} (@code{forward-char})
189@kindex C-f, in Info windows
190@findex forward-char
191Move the cursor forward a character.
192
193@item @code{C-b} (@code{backward-char})
194@kindex C-b, in Info windows
195@findex backward-char
196Move the cursor backward a character.
197
198@item @code{M-f} (@code{forward-word})
199@kindex M-f, in Info windows
200@findex forward-word
201Moves the cursor forward a word.
202
203@item @code{M-b} (@code{backward-word})
204@kindex M-b, in Info winows
205@findex backward-word
206Moves the cursor backward a word.
207
208@item @code{M-<} (@code{beginning-of-node})
209@itemx @code{b}
210@kindex b, in Info winows
211@kindex M-<
212@findex beginning-of-node
213Moves the cursor to the start of the current node.
214
215@item @code{M->} (@code{end-of-node})
216@kindex M->
217@findex end-of-node
218Moves the cursor to the end of the current node.
219
220@item @code{M-r} (@code{move-to-window-line})
221@kindex M-r
222@findex move-to-window-line
223Moves the cursor to a specific line of the window. Without a numeric
224argument, @code{M-r} moves the cursor to the start of the line in the
225center of the window. With a numeric argument of @var{n}, @code{M-r}
226moves the cursor to the start of the @var{n}th line in the window.
227@end table
228
229@node Scrolling Commands
230@chapter Moving Text Within a Window
231@cindex scrolling
232
233Sometimes you are looking at a screenful of text, and only part of the
234current paragraph you are reading is visible on the screen. The
235commands detailed in this section are used to shift which part of the
236current node is visible on the screen.
237
238@table @asis
239@item @code{SPC} (@code{scroll-forward})
240@itemx @code{C-v}
241@kindex SPC, in Info windows
242@kindex C-v
243@findex scroll-forward
244Shift the text in this window up. That is, show more of the node which
245is currently below the bottom of the window. With a numeric argument,
246show that many more lines at the bottom of the window; a numeric
247argument of 4 would shift all of the text in the window up 4 lines
248(discarding the top 4 lines), and show you four new lines at the bottom
249of the window. Without a numeric argument, @key{SPC} takes the bottom
250two lines of the window and places them at the top of the window,
251redisplaying almost a completely new screenful of lines.
252
253@item @code{DEL} (@code{scroll-backward})
254@itemx @code{M-v}
255@kindex DEL, in Info windows
256@kindex M-v
257@findex scroll-backward
258Shift the text in this window down. The inverse of
259@code{scroll-forward}.
260
261@end table
262
263@cindex scrolling through node structure
264The @code{scroll-forward} and @code{scroll-backward} commands can also
265move forward and backward through the node structure of the file. If
266you press @key{SPC} while viewing the end of a node, or @key{DEL} while
267viewing the beginning of a node, what happens is controlled by the
268variable @code{scroll-behaviour}. @xref{Variables,
269@code{scroll-behaviour}}, for more information.
270
271@table @asis
272@item @code{C-l} (@code{redraw-display})
273@kindex C-l
274@findex redraw-display
275Redraw the display from scratch, or shift the line containing the cursor
276to a specified location. With no numeric argument, @samp{C-l} clears
277the screen, and then redraws its entire contents. Given a numeric
278argument of @var{n}, the line containing the cursor is shifted so that
279it is on the @var{n}th line of the window.
280
281@item @code{C-x w} (@code{toggle-wrap})
282@kindex C-w
283@findex toggle-wrap
284Toggles the state of line wrapping in the current window. Normally,
285lines which are longer than the screen width @dfn{wrap}, i.e., they are
286continued on the next line. Lines which wrap have a @samp{\} appearing
287in the rightmost column of the screen. You can cause such lines to be
288terminated at the rightmost column by changing the state of line
289wrapping in the window with @code{C-x w}. When a line which needs more
290space than one screen width to display is displayed, a @samp{$} appears
291in the rightmost column of the screen, and the remainder of the line is
292invisible.
293@end table
294
295@node Node Commands
296@chapter Selecting a New Node
297@cindex nodes, selection of
298
299This section details the numerous Info commands which select a new node
300to view in the current window.
301
302The most basic node commands are @samp{n}, @samp{p}, @samp{u}, and
303@samp{l}.
304
305When you are viewing a node, the top line of the node contains some Info
306@dfn{pointers} which describe where the next, previous, and up nodes
307are. Info uses this line to move about the node structure of the file
308when you use the following commands:
309
310@table @asis
311@item @code{n} (@code{next-node})
312@kindex n
313@findex next-node
314Selects the `Next' node.
315
316@item @code{p} (@code{prev-node})
317@kindex p
318@findex prev-node
319Selects the `Prev' node.
320
321@item @code{u} (@code{up-node})
322@kindex u
323@findex up-node
324Selects the `Up' node.
325@end table
326
327You can easily select a node that you have already viewed in this window
328by using the @samp{l} command -- this name stands for "last", and
329actually moves through the list of already visited nodes for this
330window. @samp{l} with a negative numeric argument moves forward through
331the history of nodes for this window, so you can quickly step between
332two adjacent (in viewing history) nodes.
333
334@table @asis
335@item @code{l} (@code{history-node})
336@kindex l
337@findex history-node
338Selects the most recently selected node in this window.
339@end table
340
341Two additional commands make it easy to select the most commonly
342selected nodes; they are @samp{t} and @samp{d}.
343
344@table @asis
345@item @code{t} (@code{top-node})
346@kindex t
347@findex top-node
348Selects the node @samp{Top} in the current info file.
349
350@item @code{d} (@code{dir-node})
351@kindex d
352@findex dir-node
353Selects the directory node (i.e., the node @samp{(dir)}).
354@end table
355
356Here are some other commands which immediately result in the selection
357of a different node in the current window:
358
359@table @asis
360@item @code{<} (@code{first-node})
361@kindex <
362@findex first-node
363Selects the first node which appears in this file. This node is most
364often @samp{Top}, but it doesn't have to be.
365
366@item @code{>} (@code{last-node})
367@kindex >
368@findex last-node
369Selects the last node which appears in this file.
370
371@item @code{]} (@code{global-next-node})
372@kindex ]
373@findex global-next-node
374Moves forward or down through node structure. If the node that you are
375currently viewing has a @samp{Next} pointer, that node is selected.
376Otherwise, if this node has a menu, the first menu item is selected. If
377there is no @samp{Next} and no menu, the same process is tried with the
378@samp{Up} node of this node.
379
380@item @code{[} (@code{global-prev-node})
381@kindex [
382@findex global-prev-node
383Moves backward or up through node structure. If the node that you are
384currently viewing has a @samp{Prev} pointer, that node is selected.
385Otherwise, if the node has an @samp{Up} pointer, that node is selected,
386and if it has a menu, the last item in the menu is selected.
387@end table
388
389You can get the same behaviour as @code{global-next-node} and
390@code{global-prev-node} while simply scrolling through the file with
391@key{SPC} and @key{DEL}; @xref{Variables, @code{scroll-behaviour}}, for
392more information.
393
394@table @asis
395@item @code{g} (@code{goto-node})
396@kindex g
397@findex goto-node
398Reads the name of a node and selects it. No completion is done while
399reading the node name, since the desired node may reside in a separate
400file. The node must be typed exactly as it appears in the info file. A
401file name may be included as with any node specification, for example
402
403@example
404@code{g(emacs)Buffers}
405@end example
406
407finds the node @samp{Buffers} in the info file @file{emacs}.
408
409@item @code{C-x k} (@code{kill-node})
410@kindex C-x k
411@findex kill-node
412Kills a node. The node name is prompted for in the echo area, with a
413default of the current node. @dfn{Killing} a node means that Info tries
414hard to forget about it, removing it from the list of history nodes kept
415for the window where that node is found. Another node is selected in
416the window which contained the killed node.
417
418@item @code{C-x C-f} (@code{view-file})
419@kindex C-x C-f
420@findex view-file
421Reads the name of a file and selects the entire file. The command
422@example
423@code{C-x C-f @var{filename}}
424@end example
425is equivalent to typing
426@example
427@code{g(@var{filename})*}
428@end example
429
430@item @code{C-x C-b} (@code{list-visited-nodes})
431@kindex C-x C-b
432@findex list-visited-nodes
433Makes a window containing a menu of all of the currently visited nodes.
434This window becomes the selected window, and you may use the standard
435Info commands within it.
436
437@item @code{C-x b} (@code{select-visited-node})
438@kindex C-x b
439@findex select-visited-node
440Selects a node which has been previously visited in a visible window.
441This is similar to @samp{C-x C-b} followed by @samp{m}, but no window is
442created.
443@end table
444
445@node Searching Commands
446@chapter Searching an Info File
447@cindex searching
448
449GNU Info allows you to search for a sequence of characters throughout an
450entire info file, search through the indices of an info file, or find
451areas within an info file which discuss a particular topic.
452
453@table @asis
454@item @code{s} (@code{search})
455@kindex s
456@findex search
457Reads a string in the echo area and searches for it.
458
459@item @code{C-s} (@code{isearch-forward})
460@kindex C-s
461@findex isearch-forward
462Interactively searches forward through the info file for a string as you
463type it.
464
465@item @code{C-r} (@code{isearch-backward})
466@kindex C-r
467@findex isearch-backward
468Interactively searches backward through the info file for a string as
469you type it.
470
471@item @code{i} (@code{index-search})
472@kindex i
473@findex index-search
474Looks up a string in the indices for this info file, and selects a node
475where the found index entry points to.
476
477@item @code{,} (@code{next-index-match})
478@kindex ,
479@findex next-index-match
480Moves to the node containing the next matching index item from the last
481@samp{i} command.
482@end table
483
484The most basic searching command is @samp{s} (@code{search}). The
485@samp{s} command prompts you for a string in the echo area, and then
486searches the remainder of the info file for an occurrence of that string.
487If the string is found, the node containing it is selected, and the
488cursor is left positioned at the start of the found string. Subsequent
489@samp{s} commands show you the default search string within @samp{[} and
490@samp{]}; pressing @key{RET} instead of typing a new string will use the
491default search string.
492
493@dfn{Incremental searching} is similar to basic searching, but the
494string is looked up while you are typing it, instead of waiting until
495the entire search string has been specified.
496
497@node Xref Commands
498@chapter Selecting Cross References
499
500We have already discussed the @samp{Next}, @samp{Prev}, and @samp{Up}
501pointers which appear at the top of a node. In addition to these
502pointers, a node may contain other pointers which refer you to a
503different node, perhaps in another info file. Such pointers are called
504@dfn{cross references}, or @dfn{xrefs} for short.
505
506@menu
507* Parts of an Xref:: What a cross reference is made of.
508* Selecting Xrefs:: Commands for selecting menu or note items.
509@end menu
510
511@node Parts of an Xref
512@section Parts of an Xref
513
514Cross references have two major parts: the first part is called the
515@dfn{label}; it is the name that you can use to refer to the cross
516reference, and the second is the @dfn{target}; it is the full name of
517the node that the cross reference points to.
518
519The target is separated from the label by a colon @samp{:}; first the
520label appears, and then the target. For example, in the sample menu
521cross reference below, the single colon separates the label from the
522target.
523
524@example
525* Foo Label: Foo Target. More information about Foo.
526@end example
527
528Note the @samp{.} which ends the name of the target. The @samp{.} is
529not part of the target; it serves only to let Info know where the target
530name ends.
531
532A shorthand way of specifying references allows two adjacent colons to
533stand for a target name which is the same as the label name:
534
535@example
536* Foo Commands:: Commands pertaining to Foo.
537@end example
538
539In the above example, the name of the target is the same as the name of
540the label, in this case @code{Foo Commands}.
541
542You will normally see two types of cross references while viewing nodes:
543@dfn{menu} references, and @dfn{note} references. Menu references
544appear within a node's menu; they begin with a @samp{*} at the beginning
545of a line, and continue with a label, a target, and a comment which
546describes what the contents of the node pointed to contains.
547
548Note references appear within the body of the node text; they begin with
549@code{*Note}, and continue with a label and a target.
550
551Like @samp{Next}, @samp{Prev} and @samp{Up} pointers, cross references
552can point to any valid node. They are used to refer you to a place
553where more detailed information can be found on a particular subject.
554Here is a cross reference which points to a node within the Texinfo
555documentation: @xref{xref, , Writing an Xref, texinfo, the Texinfo
556Manual}, for more information on creating your own texinfo cross
557references.
558
559@node Selecting Xrefs
560@section Selecting Xrefs
561
562The following table lists the Info commands which operate on menu items.
563
564@table @asis
565@item @code{1} (@code{menu-digit})
566@itemx @code{2} @dots{} @code{9}
567@cindex 1 @dots{} 9, in Info windows
568@kindex 1 @dots{} 9, in Info windows
569@findex menu-digit
570Within an Info window, pressing a single digit, (such as @samp{1}),
571selects that menu item, and places its node in the current window.
572For convenience, there is one exception; pressing @samp{0} selects the
573@emph{last} item in the node's menu.
574
575@item @code{0} (@code{last-menu-item})
576@kindex 0, in Info windows
577@findex last-menu-item
578Select the last item in the current node's menu.
579
580@item @code{m} (@code{menu-item})
581@kindex m
582@findex menu-item
583Reads the name of a menu item in the echo area and selects its node.
584Completion is available while reading the menu label.
585
586@item @code{M-x find-menu}
587@findex find-menu
588Moves the cursor to the start of this node's menu.
589@end table
590
591This table lists the Info commands which operate on note cross references.
592
593@table @asis
594@item @code{f} (@code{xref-item})
595@itemx @code{r}
596@kindex f
597@kindex r
598@findex xref-item
599Reads the name of a note cross reference in the echo area and selects
600its node. Completion is available while reading the cross reference
601label.
602@end table
603
604Finally, the next few commands operate on menu or note references alike:
605
606@table @asis
607@item @code{TAB} (@code{move-to-next-xref})
608@kindex TAB, in Info windows
609@findex move-to-next-xref
610Moves the cursor to the start of the next nearest menu item or note
611reference in this node. You can then use @key{RET}
612(@code{select-reference-this-line} to select the menu or note reference.
613
614@item @code{M-TAB} (@code{move-to-prev-xref})
615@kindex M-TAB, in Info windows
616@findex move-to-prev-xref
617Moves the cursor the start of the nearest previous menu item or note
618reference in this node.
619
620@item @code{RET} (@code{select-reference-this-line})
621@kindex RET, in Info windows
622@findex select-reference-this-line
623Selects the menu item or note reference appearing on this line.
624@end table
625
626@node Window Commands
627@chapter Manipulating Multiple Windows
628@cindex windows, manipulating
629
630A @dfn{window} is a place to show the text of a node. Windows have a
631view area where the text of the node is displayed, and an associated
632@dfn{mode line}, which briefly describes the node being viewed.
633
634GNU Info supports multiple windows appearing in a single screen; each
635window is separated from the next by its modeline. At any time, there
636is only one @dfn{active} window, that is, the window in which the cursor
637appears. There are commands available for creating windows, changing
638the size of windows, selecting which window is active, and for deleting
639windows.
640
641@menu
642* The Mode Line:: What appears in the mode line?
643* Basic Windows:: Manipulating windows in Info.
644* The Echo Area:: Used for displaying errors and reading input.
645@end menu
646
647@node The Mode Line
648@section The Mode Line
649
650A @dfn{mode line} is a line of inverse video which appears at the bottom
651of an info window. It describes the contents of the window just above
652it; this information includes the name of the file and node appearing in
653that window, the number of screen lines it takes to display the node,
654and the percentage of text that is above the top of the window. It can
655also tell you if the indirect tags table for this info file needs to be
656updated, and whether or not the info file was compressed when stored on
657disk.
658
659Here is a sample mode line for a window containing an uncompressed file
660named @file{dir}, showing the node @samp{Top}.
661
662@example
663-----Info: (dir)Top, 40 lines --Top---------------------------------------
664 ^^ ^ ^^^ ^^
665 (file)Node #lines where
666@end example
667
668When a node comes from a file which is compressed on disk, this is
669indicated in the mode line with two small @samp{z}'s. In addition, if
670the info file containing the node has been split into subfiles, the name
671of the subfile containing the node appears in the modeline as well:
672
673@example
674--zz-Info: (emacs)Top, 291 lines --Top-- Subfile: emacs-1.Z---------------
675@end example
676
677When Info makes a node internally, such that there is no corresponding
678info file on disk, the name of the node is surrounded by asterisks
679(@samp{*}). The name itself tells you what the contents of the window
680are; the sample mode line below shows an internally constructed node
681showing possible completions:
682
683@example
684-----Info: *Completions*, 7 lines --All-----------------------------------
685@end example
686
687@node Basic Windows
688@section Window Commands
689
690It can be convenient to view more than one node at a time. To allow
691this, Info can display more than one @dfn{window}. Each window has its
692own mode line (@pxref{The Mode Line}) and history of nodes viewed in that
693window (@pxref{Node Commands, , @code{history-node}}).
694
695@table @asis
696@item @code{C-x o} (@code{next-window})
697@cindex windows, selecting
698@kindex C-x o
699@findex next-window
700Selects the next window on the screen. Note that the echo area can only be
701selected if it is already in use, and you have left it temporarily.
702Normally, @samp{C-x o} simply moves the cursor into the next window on
703the screen, or if you are already within the last window, into the first
704window on the screen. Given a numeric argument, @samp{C-x o} moves over
705that many windows. A negative argument causes @samp{C-x o} to select
706the previous window on the screen.
707
708@item @code{M-x prev-window}
709@findex prev-window
710Selects the previous window on the screen. This is identical to
711@samp{C-x o} with a negative argument.
712
713@item @code{C-x 2} (@code{split-window})
714@cindex windows, creating
715@kindex C-x 2
716@findex split-window
717Splits the current window into two windows, both showing the same node.
718Each window is one half the size of the original window, and the cursor
719remains in the original window. The variable @code{automatic-tiling}
720can cause all of the windows on the screen to be resized for you
721automatically, please @pxref{Variables, , automatic-tiling} for more
722information.
723
724@item @code{C-x 0} (@code{delete-window})
725@cindex windows, deleting
726@kindex C-x 0
727@findex delete-window
728Deletes the current window from the screen. If you have made too many
729windows and your screen appears cluttered, this is the way to get rid of
730some of them.
731
732@item @code{C-x 1} (@code{keep-one-window})
733@kindex C-x 1
734@findex keep-one-window
735Deletes all of the windows excepting the current one.
736
737@item @code{ESC C-v} (@code{scroll-other-window})
738@kindex ESC C-v, in Info windows
739@findex scroll-other-window
740Scrolls the other window, in the same fashion that @samp{C-v} might
741scroll the current window. Given a negative argument, the "other"
742window is scrolled backward.
743
744@item @code{C-x ^} (@code{grow-window})
745@kindex C-x ^
746@findex grow-window
747Grows (or shrinks) the current window. Given a numeric argument, grows
748the current window that many lines; with a negative numeric argument,
749the window is shrunk instead.
750
751@item @code{C-x t} (@code{tile-windows})
752@cindex tiling
753@kindex C-x t
754@findex tile-windows
755Divides the available screen space among all of the visible windows.
756Each window is given an equal portion of the screen in which to display
757its contents. The variable @code{automatic-tiling} can cause
758@code{tile-windows} to be called when a window is created or deleted.
759@xref{Variables, , @code{automatic-tiling}}.
760@end table
761
762@node The Echo Area
763@section The Echo Area
764@cindex echo area
765
766The @dfn{echo area} is a one line window which appears at the bottom of
767the screen. It is used to display informative or error messages, and to
768read lines of input from you when that is necessary. Almost all of the
769commands available in the echo area are identical to their Emacs
770counterparts, so please refer to that documentation for greater depth of
771discussion on the concepts of editing a line of text. The following
772table briefly lists the commands that are available while input is being
773read in the echo area:
774
775@table @asis
776@item @code{C-f} (@code{echo-area-forward})
777@kindex C-f, in the echo area
778@findex echo-area-forward
779Moves forward a character.
780
781@item @code{C-b} (@code{echo-area-backward})
782@kindex C-b, in the echo area
783@findex echo-area-backward
784Moves backward a character.
785
786@item @code{C-a} (@code{echo-area-beg-of-line})
787@kindex C-a, in the echo area
788@findex echo-area-beg-of-line
789Moves to the start of the input line.
790
791@item @code{C-e} (@code{echo-area-end-of-line})
792@kindex C-e, in the echo area
793@findex echo-area-end-of-line
794Moves to the end of the input line.
795
796@item @code{M-f} (@code{echo-area-forward-word})
797@kindex M-f, in the echo area
798@findex echo-area-forward-word
799Moves forward a word.
800
801@item @code{M-b} (@code{echo-area-backward-word})
802@kindex M-b, in the echo area
803@findex echo-area-backward-word
804Moves backward a word.
805
806@item @code{C-d} (@code{echo-area-delete})
807@kindex C-d, in the echo area
808@findex echo-area-delete
809Deletes the character under the cursor.
810
811@item @code{DEL} (@code{echo-area-rubout})
812@kindex DEL, in the echo area
813@findex echo-area-rubout
814Deletes the character behind the cursor.
815
816@item @code{C-g} (@code{echo-area-abort})
817@kindex C-g, in the echo area
818@findex echo-area-abort
819Cancels or quits the current operation. If completion is being read,
820@samp{C-g} discards the text of the input line which does not match any
821completion. If the input line is empty, @samp{C-g} aborts the calling
822function.
823
824@item @code{RET} (@code{echo-area-newline})
825@kindex RET, in the echo area
826@findex echo-area-newline
827Accepts (or forces completion of) the current input line.
828
829@item @code{C-q} (@code{echo-area-quoted-insert})
830@kindex C-q, in the echo area
831@findex echo-area-quoted-insert
832Inserts the next character verbatim. This is how you can insert control
833characters into a search string, for example.
834
835@item @var{printing character} (@code{echo-area-insert})
836@kindex printing characters, in the echo area
837@findex echo-area-insert
838Inserts the character.
839
840@item @code{M-TAB} (@code{echo-area-tab-insert})
841@kindex M-TAB, in the echo area
842@findex echo-area-tab-insert
843Inserts a TAB character.
844
845@item @code{C-t} (@code{echo-area-transpose-chars})
846@kindex C-t, in the echo area
847@findex echo-area-transpose-chars
848Transposes the characters at the cursor.
849@end table
850
851The next group of commands deal with @dfn{killing}, and @dfn{yanking}
852text. For an in depth discussion of killing and yanking,
853@pxref{Killing, , Killing and Deleting, emacs, the GNU Emacs Manual}
854
855@table @asis
856@item @code{M-d} (@code{echo-area-kill-word})
857@kindex M-d, in the echo area
858@findex echo-area-kill-word
859Kills the word following the cursor.
860
861@item @code{M-DEL} (@code{echo-area-backward-kill-word})
862@kindex M-DEL, in the echo area
863@findex echo-area-backward-kill-word
864Kills the word preceding the cursor.
865
866@item @code{C-k} (@code{echo-area-kill-line})
867@kindex C-k, in the echo area
868@findex echo-area-kill-line
869Kills the text from the cursor to the end of the line.
870
871@item @code{C-x DEL} (@code{echo-area-backward-kill-line})
872@kindex C-x DEL, in the echo area
873@findex echo-area-backward-kill-line
874Kills the text from the cursor to the beginning of the line.
875
876@item @code{C-y} (@code{echo-area-yank})
877@kindex C-y, in the echo area
878@findex echo-area-yank
879Yanks back the contents of the last kill.
880
881@item @code{M-y} (@code{echo-area-yank-pop})
882@kindex M-y, in the echo area
883@findex echo-area-yank-pop
884Yanks back a previous kill, removing the last yanked text first.
885@end table
886
887Sometimes when reading input in the echo area, the command that needed
888input will only accept one of a list of several choices. The choices
889represent the @dfn{possible completions}, and you must respond with one
890of them. Since there are a limited number of responses you can make,
891Info allows you to abbreviate what you type, only typing as much of the
892response as is necessary to uniquely identify it. In addition, you can
893request Info to fill in as much of the response as is possible; this
894is called @dfn{completion}.
895
896The following commands are available when completing in the echo area:
897
898@table @asis
899@item @code{TAB} (@code{echo-area-complete})
900@itemx @code{SPC}
901@kindex TAB, in the echo area
902@kindex SPC, in the echo area
903@findex echo-area-complete
904Inserts as much of a completion as is possible.
905
906@item @code{?} (@code{echo-area-possible-completions})
907@kindex ?, in the echo area
908@findex echo-area-possible-completions
909Displays a window containing a list of the possible completions of what
910you have typed so far. For example, if the available choices are:
911@example
912bar
913foliate
914food
915forget
916@end example
917and you have typed an @samp{f}, followed by @samp{?}, the possible
918completions would contain:
919@example
920foliate
921food
922forget
923@end example
924i.e., all of the choices which begin with @samp{f}. Pressing @key{SPC}
925or @key{TAB} would result in @samp{fo} appearing in the echo area, since
926all of the choices which begin with @samp{f} continue with @samp{o}.
927Now, typing @samp{l} followed by @samp{TAB} results in @samp{foliate}
928appearing in the echo area, since that is the only choice which begins
929with @samp{fol}.
930
931@item @code{ESC C-v} (@code{echo-area-scroll-completions-window})
932@kindex ESC C-v, in the echo area
933@findex echo-area-scroll-completions-window
934Scrolls the completions window, if that is visible, or the "other"
935window if not.
936@end table
937
938@node Printing Nodes
939@chapter Printing Out Nodes
940@cindex printing
941
942You may wish to print out the contents of a node as a quick reference
943document for later use. Info provides you with a command for doing
944this. In general, we recommend that you use @TeX{} to format the
945document and print sections of it, by running @code{tex} on the texinfo
946source file.
947
948@table @asis
949@item @code{M-x print-node}
950@findex print-node
951@cindex INFO_PRINT_COMMAND, environment variable
952Pipes the contents of the current node through the command in the
953environment variable @code{INFO_PRINT_COMMAND}. If the variable doesn't
954exist, the node is simply piped to @code{lpr}.
955@end table
956
957@node Miscellaneous Commands
958@chapter Miscellaneous Commands
959
960GNU Info contains several commands which self-document GNU Info:
961
962@table @asis
963@item @code{M-x describe-command}
964@cindex functions, describing
965@cindex commands, describing
966@findex describe-command
967Reads the name of an Info command in the echo area and then displays a
968brief description of what that command does.
969
970@item @code{M-x describe-key}
971@cindex keys, describing
972@findex describe-key
973Reads a key sequence in the echo area, and then displays the name and
974documentation of the Info command that the key sequence invokes.
975
976@item @code{M-x describe-variable}
977Reads the name of a variable in the echo area and then displays a brief
978description of what the variable affects.
979
980@item @code{M-x where-is}
981@findex where-is
982Reads the name of an Info command in the echo area, and then displays
983a key sequence which can be typed in order to invoke that command.
984
985@item @code{C-h} (@code{get-help-window})
986@itemx @code{?}
987@kindex C-h
988@kindex ?, in Info windows
989@findex get-help-window
990Creates (or moves into) the window displaying @code{*Help*}, and places
991a node containing a quick reference card into it. This window displays
992the most concise information about GNU Info available.
993
994@item @code{h} (@code{get-info-help-node})
995@kindex h
996@findex get-info-help-node
997Tries hard to visit the node @code{(info)Help}. The info file
998@file{info.texi} distributed with GNU Info contains this node. Of
999course, the file must first be processed with @code{makeinfo}, and then
1000placed into the location of your info directory.
1001@end table
1002
1003Here are the commands for creating a numeric argument:
1004
1005@table @asis
1006@item @code{C-u} (@code{universal-argument})
1007@cindex numeric arguments
1008@kindex C-u
1009@findex universal-argument
1010Starts (or multiplies by 4) the current numeric argument. @samp{C-u} is
1011a good way to give a small numeric argument to cursor movement or
1012scrolling commands; @samp{C-u C-v} scrolls the screen 4 lines, while
1013@samp{C-u C-u C-n} moves the cursor down 16 lines.
1014
1015@item @code{M-1} (@code{add-digit-to-numeric-arg})
1016@itemx @code{M-2} @dots{} @code{M-9}
1017@kindex M-1 @dots{} M-9
1018@findex add-digit-to-numeric-arg
1019Adds the digit value of the invoking key to the current numeric
1020argument. Once Info is reading a numeric argument, you may just type
1021the digits of the argument, without the Meta prefix. For example, you
1022might give @samp{C-l} a numeric argument of 32 by typing:
1023
1024@example
1025@kbd{C-u 3 2 C-l}
1026@end example
1027or
1028@example
1029@kbd{M-3 2 C-l}
1030@end example
1031@end table
1032
1033@samp{C-g} is used to abort the reading of a multi-character key
1034sequence, to cancel lengthy operations (such as multi-file searches) and
1035to cancel reading input in the echo area.
1036
1037@table @asis
1038@item @code{C-g} (@code{abort-key})
1039@cindex cancelling typeahead
1040@cindex cancelling the current operation
1041@kindex C-g, in Info windows
1042@findex abort-key
1043Cancels current operation.
1044@end table
1045
1046The @samp{q} command of Info simply quits running Info.
1047
1048@table @asis
1049@item @code{q} (@code{quit})
1050@cindex quitting
1051@kindex q
1052@findex quit
1053Exits GNU Info.
1054@end table
1055
1056If the operating system tells GNU Info that the screen is 60 lines tall,
1057and it is actually only 40 lines tall, here is a way to tell Info that
1058the operating system is correct.
1059
1060@table @asis
1061@item @code{M-x set-screen-height}
1062@findex set-screen-height
1063@cindex screen, changing the height of
1064Reads a height value in the echo area and sets the height of the
1065displayed screen to that value.
1066@end table
1067
1068Finally, Info provides a convenient way to display footnotes which might
1069be associated with the current node that you are viewing:
1070
1071@table @asis
1072@item @code{ESC C-f} (@code{show-footnotes})
1073@kindex ESC C-f
1074@findex show-footnotes
1075@cindex footnotes, displaying
1076Shows the footnotes (if any) associated with the current node in another
1077window. You can have Info automatically display the footnotes
1078associated with a node when the node is selected by setting the variable
1079@code{automatic-footnotes}. @xref{Variables, , @code{automatic-footnotes}}.
1080@end table
1081
1082@node Variables
1083@chapter Manipulating Variables
1084
1085GNU Info contains several @dfn{variables} whose values are looked at by various
1086Info commands. You can change the values of these variables, and thus
1087change the behaviour of Info to more closely match your environment and
1088info file reading manner.
1089
1090@table @asis
1091@item @code{M-x set-variable}
1092@cindex variables, setting
1093@findex set-variable
1094Reads the name of a variable, and the value for it, in the echo area and
1095then sets the variable to that value. Completion is available when
1096reading the variable name; often, completion is available when reading
1097the value to give to the variable, but that depends on the variable
1098itself. If a variable does @emph{not} supply multiple choices to
1099complete over, it expects a numeric value.
1100
1101@item @code{M-x describe-variable}
1102@cindex variables, describing
1103@findex describe-variable
1104Reads the name of a variable in the echo area and then displays a brief
1105description of what the variable affects.
1106@end table
1107
1108Here is a list of the variables that you can set in Info.
1109
1110@table @code
1111@item automatic-footnotes
1112@vindex automatic-footnotes
1113When set to @code{On}, footnotes appear and disappear automatically.
1114This variable is @code{On} by default. When a node is selected, a
1115window containing the footnotes which appear in that node is created,
1116and the footnotes are displayed within the new window. The window that
1117Info creates to contain the footnotes is called @samp{*Footnotes*}. If
1118a node is selected which contains no footnotes, and a @samp{*Footnotes*}
1119window is on the screen, the @samp{*Footnotes*} window is deleted.
1120Footnote windows created in this fashion are not automatically tiled so
1121that they can use as little of the display as is possible.
1122
1123@item automatic-tiling
1124@vindex automatic-tiling
1125When set to @code{On}, creating or deleting a window resizes other
1126windows. This variable is @code{Off} by default. Normally, typing
1127@samp{C-x 2} divides the current window into two equal parts. When
1128@code{automatic-tiling} is set to @code{On}, all of the windows are
1129resized automatically, keeping an equal number of lines visible in each
1130window. There are exceptions to the automatic tiling; specifically, the
1131windows @samp{*Completions*} and @samp{*Footnotes*} are @emph{not}
1132resized through automatic tiling; they remain their original size.
1133
1134@item visible-bell
1135@vindex visible-bell
1136When set to @code{On}, GNU Info attempts to flash the screen instead of
1137ringing the bell. This variable is @code{Off} by default. Of course,
1138Info can only flash the screen if the terminal allows it; in the case
1139that the terminal does not allow it, the setting of this variable has no
1140effect. However, you can make Info perform quietly by setting the
1141@code{errors-ring-bell} variable to @code{Off}.
1142
1143@item errors-ring-bell
1144@vindex errors-ring-bell
1145When set to @code{On}, errors cause the bell to ring. The default
1146setting of this variable is @code{On}.
1147
1148@item gc-compressed-files
1149@vindex gc-compressed-files
1150When set to @code{On}, Info garbage collects files which had to be
1151uncompressed. The default value of this variable is @code{Off}.
1152Whenever a node is visited in Info, the info file containing that node
1153is read into core, and Info reads information about the tags and nodes
1154contained in that file. Once the tags information is read by Info, it
1155is never forgotten. However, the actual text of the nodes does not need
1156to remain in core unless a particular info window needs it. For
1157non-compressed files, the text of the nodes does not remain in core when
1158it is no longer in use. But de-compressing a file can be a time
1159consuming operation, and so Info tries hard not to do it twice.
1160@code{gc-compressed-files} tells Info it is okay to garbage collect the
1161text of the nodes of a file which was compressed on disk.
1162
1163@item show-index-match
1164@vindex show-index-match
1165When set to @code{On}, the portion of the matched search string is
1166highlighted in the message which explains where the matched search
1167string was found. The default value of this variable is @code{On}.
1168When Info displays the location where an index match was found,
1169(@pxref{Searching Commands, , @code{next-index-match}}), the portion of the
1170string that you had typed is highlighted by displaying it in the inverse
1171case from its surrounding characters.
1172
1173@item scroll-behaviour
1174@vindex scroll-behaviour
1175Controls what happens when forward scrolling is requested at the end of
1176a node, or when backward scrolling is requested at the beginning of a
1177node. The default value for this variable is @code{Continuous}. There
1178are three possible values for this variable:
1179
1180@table @code
1181@item Continuous
1182Tries to get the first item in this node's menu, or failing that, the
1183@samp{Next} node, or failing that, the @samp{Next} of the @samp{Up}.
1184This behaviour is identical to using the @samp{]}
1185(@code{global-next-node}) and @samp{[} (@code{global-prev-node})
1186commands.
1187
1188@item Next Only
1189Only tries to get the @samp{Next} node.
1190
1191@item Page Only
1192Simply gives up, changing nothing. If @code{scroll-behaviour} is
1193@code{Page Only}, no scrolling command can change the node that is being
1194viewed.
1195@end table
1196
1197@item scroll-step
1198@vindex scroll-step
1199The number of lines to scroll when the cursor moves out of the window.
1200Scrolling happens automatically if the cursor has moved out of the
1201visible portion of the node text when it is time to display. Usually
1202the scrolling is done so as to put the cursor on the center line of the
1203current window. However, if the variable @code{scroll-step} has a
1204nonzero value, Info attempts to scroll the node text by that many lines;
1205if that is enough to bring the cursor back into the window, that is what
1206is done. The default value of this variable is 0, thus placing the
1207cursor (and the text it is attached to) in the center of the window.
1208Setting this variable to 1 causes a kind of "smooth scrolling" which
1209some people prefer.
1210
1211@item ISO-Latin
1212@cindex ISO Latin-1 characters
1213@vindex ISO-Latin
1214When set to @code{On}, Info accepts and displays ISO Latin-1 characters.
1215By default, Info assumes an ASCII character set. @code{ISO-Latin} tells
1216Info that it is running in an environment where the European standard
1217character set is in use, and allows you to input such characters to
1218Info, as well as display them.
1219@end table
1220
1221@c The following node and its children are currently unfinished. Please feel
1222@c free to finish it!
1223
1224@ifset NOTSET
1225@node Info for Sys Admins
1226@chapter Info for System Administrators
1227
1228This text describes some common ways of setting up an Info hierarchy
1229from scratch, and details the various options that are available when
1230installing Info. This text is designed for the person who is installing
1231GNU Info on the system; although users may find the information present
1232in this section interesting, none of it is vital to understanding how to
1233use GNU Info.
1234
1235@menu
1236* Setting the INFOPATH:: Where are my Info files kept?
1237* Editing the DIR node:: What goes in `DIR', and why?
1238* Storing Info files:: Alternate formats allow flexibility in setups.
1239* Using `localdir':: Building DIR on the fly.
1240* Example setups:: Some common ways to organize Info files.
1241@end menu
1242
1243@node Setting the INFOPATH
1244@section Setting the INFOPATH
1245Where are my Info files kept?
1246
1247@node Editing the DIR node
1248@section Editing the DIR node
1249What goes in `DIR', and why?
1250
1251@node Storing Info files
1252@section Storing Info files
1253Alternate formats allow flexibility in setups.
1254
1255@node Using `localdir'
1256@section Using `localdir'
1257Building DIR on the fly.
1258
1259@node Example setups
1260@section Example setups
1261Some common ways to organize Info files.
1262@end ifset
1263
1264@ifset STANDALONE
1265@node GNU Info Global Index
1266@appendix Global Index
1267@printindex cp
1268@end ifset