xref: /netbsd-src/external/gpl2/texinfo/dist/doc/info-stnd.texi (revision 29619d2afe564e54d657b83e5a3ae89584f83720)
1\input texinfo.tex    @c -*-texinfo-*-
2@c $NetBSD: info-stnd.texi,v 1.1.1.1 2016/01/14 00:11:30 christos Exp $
3@comment Id: info-stnd.texi,v 1.9 2004/12/14 16:58:15 karl Exp
4@c We must \input texinfo.tex instead of texinfo, otherwise make
5@c distcheck in the Texinfo distribution fails, because the texinfo Info
6@c file is made first, and texi2dvi must include . first in the path.
7@comment %**start of header
8@setfilename info-stnd.info
9@include version-stnd.texi
10@settitle GNU Info @value{VERSION}
11@syncodeindex vr cp
12@syncodeindex fn cp
13@syncodeindex ky cp
14@comment %**end of header
15
16@copying
17This manual is for GNU Info (version @value{VERSION}, @value{UPDATED}),
18a program for viewing documents in Info format (usually created from
19Texinfo source files).
20
21Copyright @copyright{} 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002,
222003, 2004 Free Software Foundation, Inc.
23
24@quotation
25Permission is granted to copy, distribute and/or modify this document
26under the terms of the GNU Free Documentation License, Version 1.1 or
27any later version published by the Free Software Foundation; with no
28Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
29and with the Back-Cover Texts as in (a) below.  A copy of the
30license is included in the section entitled ``GNU Free Documentation
31License.''
32
33(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
34this GNU Manual, like GNU software.  Copies published by the Free
35Software Foundation raise funds for GNU development.''
36@end quotation
37@end copying
38
39@dircategory Texinfo documentation system
40@direntry
41* info standalone: (info-stnd).            Read Info documents without Emacs.
42* infokey: (info-stnd)Invoking infokey.    Compile Info customizations.
43@end direntry
44
45@titlepage
46@title GNU Info
47@subtitle for version @value{VERSION}, @value{UPDATED}
48@author Brian J. Fox (bfox@@gnu.org)
49@page
50@vskip 0pt plus 1filll
51@insertcopying
52@end titlepage
53
54@contents
55
56@ifnottex
57@node Top
58@top GNU Info
59
60@insertcopying
61
62This documentation is different from the documentation for the Info
63reader that is part of GNU Emacs.  If you do not know how to use Info,
64but have a working Info reader, you should read the Emacs documentation
65first, as it includes more background information and a thorough tutorial.
66@end ifnottex
67
68@menu
69* What is Info::                What is Info?
70* Invoking Info::               Options you can pass on the command line.
71* Cursor Commands::             Commands which move the cursor within a node.
72* Scrolling Commands::          Commands for reading the text within a node.
73* Node Commands::               Commands for selecting a new node.
74* Searching Commands::          Commands for searching an Info file.
75* Xref Commands::               Commands for selecting cross references.
76* Window Commands::             Commands which manipulate multiple windows.
77* Printing Nodes::              How to print out the contents of a node.
78* Miscellaneous Commands::      A few commands that defy categories.
79* Variables::                   How to change the default behavior of Info.
80* Custom Key Bindings::         How to define your own key-to-command bindings.
81* Copying This Manual::         The GNU Free Documentation License.
82* Index::                       Global index containing keystrokes,
83                                  command names, variable names,
84                                  and general concepts.
85@end menu
86
87
88@node What is Info
89@chapter What is Info?
90
91@dfn{Info} is a program which is used to view Info files on an ASCII
92terminal.  @dfn{Info files} are the result of processing Texinfo files
93with the program @code{makeinfo} or with one of the Emacs commands, such
94as @code{M-x texinfo-format-buffer}.  Texinfo itself is a documentation
95system that uses a single source file to produce both on-line
96information and printed output.  You can typeset and print the files
97that you read in Info.
98
99
100@node Invoking Info
101@chapter Invoking Info
102
103@cindex Info, invoking
104@cindex invoking Info
105@cindex command line options
106@cindex options, command line
107@cindex arguments, command line
108
109GNU Info accepts several options to control the initial node being
110viewed, and to specify which directories to search for Info files.  Here
111is a template showing an invocation of GNU Info from the shell:
112
113@example
114info [@var{option}]@dots{} [@var{menu-item}@dots{}]
115@end example
116
117The program accepts the following options:
118
119@table @code
120@anchor{--apropos}
121@item --apropos=@var{string}
122@cindex Searching all indices
123@cindex Info files@r{, searching all indices}
124@cindex Apropos@r{, in Info files}
125Specify a string to search in every index of every Info file installed
126on your system.  Info looks up the named @var{string} in all the indices
127it can find, prints the results to standard output, and then exits.  If
128you are not sure which Info file explains certain issues, this option is
129your friend.  Note that if your system has a lot of Info files
130installed, searching all of them might take some time.
131
132You can invoke the apropos command from inside Info; see
133@ref{Searching Commands}.
134
135@cindex directory path
136@item --directory @var{directory-path}
137@itemx -d @var{directory-path}
138Prepend @var{directory-path} to the list of directory paths searched
139when Info needs to find a file.  You may issue @code{--directory}
140multiple times; once for each directory which contains Info files.  The
141list of directories searched by Info is constructed from the value of
142the environment variable @code{INFOPATH}; @code{--directory} causes the
143named @var{directory-path} to be prepended to that list.  The value of
144@code{INFOPATH} is a list of directories usually separated by a colon;
145on MS-DOS/MS-Windows systems, the semicolon is used.  If you do not
146define @code{INFOPATH}, Info uses a default path defined when Info was
147built as the initial list of directories.  If the value of
148@code{INFOPATH} ends with a colon (or semicolon on MS-DOS/MS-Windows),
149the initial list of directories is constructed by appending the
150build-time default to the value of @code{INFOPATH}.
151
152@cindex keystrokes, recording
153@cindex remembering user keystrokes
154@item --dribble=@var{dribble-file}
155Specify a file where all user keystrokes will be recorded.  This file
156can be used later to replay the same sequence of commands, see the
157@samp{--restore} option below.
158
159@item --file @var{filename}
160@itemx -f @var{filename}
161@cindex Info file, selecting
162Specify a particular Info file to visit.  By default, Info visits
163the file @code{dir}; if you use this option, Info will start with
164@code{(@var{filename})Top} as the first file and node.
165
166@cindex relative Info file names
167@cindex file names, relative
168@cindex Info files, relative
169If @var{filename} is an absolute file name, or begins with @file{./} or
170@file{../}, Info looks for @var{filename} only in the directory of the
171specified @var{filename}, and adds the directory of @var{filename} to
172the value of @code{INFOPATH}.  In contrast, if @var{filename} is in the
173form of a relative file name, but without the @file{./} or @file{../}
174prefix, Info will only look for it in the directories specified in
175@code{INFOPATH}.  In other words, Info does @emph{not} treat file names
176which lack @file{./} and @file{../} prefix as relative to the current
177directory.
178
179@cindex compressed Info files
180@cindex files, compressed
181@cindex Info files, compressed
182In every directory Info tries, if @var{filename} is not found, Info
183looks for it with a number of known extensions of Info files@footnote{
184@file{.info}, @file{-info}, @file{/index}, and @file{.inf}.}.  For every
185known extension, Info looks for a compressed file, if a regular file
186isn't found.  Info supports files compressed with @code{gzip},
187@code{bzip2}, @code{compress} and @code{yabba} programs; it calls
188@code{gunzip}, @code{bunzip2}, @code{uncompress} and @code{unyabba},
189accordingly, to decompress such files.  Compressed Info files are
190assumed to have @file{.z}, @file{.gz}, @file{.bz2}, @file{.Z}, or
191@file{.Y} extensions, possibly in addition to one of the known Info
192files extensions@footnote{The MS-DOS version allows for the Info
193extension, such as @code{.inf}, and the short compressed file
194extensions, such as @file{.z} and @file{.gz}, to be merged into a single
195extension, since DOS doesn't allow more than a single dot in the
196basename of a file.  Thus, on MS-DOS, if Info looks for @file{bison},
197file names like @file{bison.igz} and @file{bison.inz} will be found and
198decompressed by @code{gunzip}.}.
199
200@item --help
201@itemx -h
202Produces a relatively brief description of the available Info options.
203
204@item --index-search @var{string}
205@cindex index search, selecting from the command line
206@cindex online help, using Info as
207After processing all command-line arguments, go to the index in the Info
208file and search for index entries which match @var{string}.  If such an
209entry is found, the Info session begins with displaying the node pointed
210to by the first matching index entry; press @kbd{,} to step through the
211rest of the matching entries.  If no such entry exists, print @samp{no
212entries found} and exit with nonzero status.  This can be used from
213another program as a way to provide online help, or as a quick way of
214starting to read an Info file at a certain node when you don't know the
215exact name of that node.
216
217This command can also be invoked from inside Info; see @ref{Searching
218Commands}.
219
220@item --node @var{nodename}
221@itemx -n @var{nodename}
222@cindex node, selecting from the command line
223Specify a particular node to visit in the initial file that Info
224loads.  This is especially useful in conjunction with
225@code{--file}@footnote{Of course, you can specify both the file and node
226in a @code{--node} command; but don't forget to escape the open and
227close parentheses and whitespace from the shell as in: @code{info --node
228"(emacs)Buffers"}.}.  You may specify @code{--node} multiple times; for
229an interactive Info, each @var{nodename} is visited in its own window,
230for a non-interactive Info (such as when @code{--output} is given) each
231@var{nodename} is processed sequentially.
232
233@item --output @var{filename}
234@itemx -o @var{filename}
235@cindex file, outputting to
236@cindex outputting to a file
237Specify @var{filename} as the name of a file to which to direct output.
238Each node that Info visits will be output to @var{filename} instead of
239interactively viewed.  A value of @code{-} for @var{filename} specifies
240the standard output.
241
242@cindex colors in documents
243@cindex ANSI escape sequences in documents
244@item --raw-escapes
245@itemx --no-raw-escapes
246@itemx -R
247Do not remove ANSI escape sequences from documents.  Some versions of
248Groff, the GNU document formatter, produce man pages with ANSI escape
249sequences for bold, italics, and underlined characters, and for
250colorized text.  By default, Info lets those escape sequences pass
251through directly to the terminal.  If your terminal does not support
252these escapes, use @code{--no-raw-escapes} to make Info remove them.
253
254@cindex replaying recorded keystrokes
255@item --restore=@var{dribble-file}
256Read keystrokes from @var{dribble-file}, presumably recorded during
257previous Info session (see the description of the @samp{--dribble}
258option above).  When the keystrokes in the files are all read, Info
259reverts its input to the usual interactive operation.
260
261@anchor{--show-options}
262@cindex command-line options, how to find
263@cindex invocation description, how to find
264@item --show-options
265@itemx --usage
266@itemx -O
267This option causes Info to look for the node that describes how to
268invoke the program and its command-line options, and begin the session
269by displaying that node.  It is provided to make it easier to find the
270most important usage information in a manual without the need to wade
271through complex menu hierarchies.  The effect is similar to the
272@code{M-x goto-invocation} command (@pxref{goto-invocation}) from inside
273Info.
274
275@cindex speech synthesizers
276@item --speech-friendly
277@itemx -b
278On MS-DOS/MS-Windows only, this option causes Info to use standard file
279I/O functions for screen writes.  (By default, Info uses direct writes
280to the video memory on these systems, for faster operation and colored
281display support.)  This allows the speech synthesizers used by blind
282persons to catch the output and convert it to audible speech.
283
284@item --subnodes
285@cindex @code{--subnodes}, command line option
286This option only has meaning when given in conjunction with
287@code{--output}.  It means to recursively output the nodes appearing in
288the menus of each node being output.  Menu items which resolve to
289external Info files are not output, and neither are menu items which are
290members of an index.  Each node is only output once.
291
292@item --version
293@cindex version information
294Prints the version information of Info and exits.
295
296@anchor{--vi-keys}
297@cindex vi-like key bindings
298@cindex Less-like key bindings
299@item --vi-keys
300This option binds functions to keys differently, to emulate the key
301bindings of @code{vi} and Less.  The default key bindings are generally
302modeled after Emacs.
303(@xref{Custom Key Bindings},
304for a more general way of altering GNU Info's key bindings.)
305
306@cindex Info manual location
307@cindex Where is an Info manual?
308@item --where
309@itemx --location
310@itemx -w
311Show the filename that would be read and exit, instead of actually
312reading it and starting Info.
313
314@item @var{menu-item}
315@cindex menu, following
316@anchor{command-line menu items}
317Info treats its remaining arguments as the names of menu items.  The
318first argument is a menu item in the initial node visited (generally
319@code{dir}), the second argument is a menu item in the first argument's
320node, etc.  You can easily move to the node of your choice by specifying
321the menu names which describe the path to that node.  For example,
322
323@example
324info emacs buffers
325@end example
326
327@noindent
328first selects the menu item @samp{Emacs} in the node @samp{(dir)Top},
329and then selects the menu item @samp{Buffers} in the node
330@samp{(emacs)Top}.
331@end table
332
333To avoid searching the @file{dir} files and just show some arbitrary
334file, use @samp{-f} and the filename, as in @samp{info -f ./foo.info}.
335
336The index search and the search for the node which describes program
337invocation and command-line options begins @emph{after} processing all
338the command-line menu items.  Therefore, the Info file searched for the
339index or the invocation node is the file where Info finds itself after
340following all the menu items given on the command line.  This is so
341@samp{info emacs --show-options} does what you'd expect.
342
343@c FIXME: the feature with lowercasing the file name isn't documented
344
345
346@node Cursor Commands
347@chapter Moving the Cursor
348@cindex cursor, moving
349@cindex moving the cursor
350
351Many people find that reading screens of text page by page is made
352easier when one is able to indicate particular pieces of text with
353some kind of pointing device.  Since this is the case, GNU Info (both
354the Emacs and standalone versions) have several commands which allow
355you to move the cursor about the screen.  The notation used in this
356manual to describe keystrokes is identical to the notation used within
357the Emacs manual, and the GNU Readline manual.  @xref{User Input,,,
358emacs, the GNU Emacs Manual}, if you are unfamiliar with the
359notation.@footnote{Here's a short summary.  @kbd{C-@var{x}} means
360press the @kbd{CTRL} key and the key @var{x}.  @kbd{M-@var{x}} means
361press the @kbd{META} key and the key @var{x}.  On many terminals th
362@kbd{META} key is known as the @kbd{ALT} key.  @kbd{SPC} is the space
363bar.  The other keys are usually called by the names imprinted on
364them.}
365
366The following table lists the basic cursor movement commands in Info.
367Each entry consists of the key sequence you should type to execute the
368cursor movement, the @code{M-x}@footnote{@code{M-x} is also a command; it
369invokes @code{execute-extended-command}.  @xref{M-x, , Executing an
370extended command, emacs, the GNU Emacs Manual}, for more detailed
371information.} command name (displayed in parentheses), and a short
372description of what the command does.  All of the cursor motion commands
373can take a @dfn{numeric} argument (see @ref{Miscellaneous Commands,
374@code{universal-argument}, to find out how to supply them}.  With a
375numeric argument, the motion commands are simply executed that
376many times; for example, a numeric argument of 4 given to
377@code{next-line} causes the cursor to move down 4 lines.  With a
378negative numeric argument, the motion is reversed; an argument of -4
379given to the @code{next-line} command would cause the cursor to move
380@emph{up} 4 lines.
381
382@table @asis
383@item @key{C-n} (@code{next-line})
384@itemx @key{DOWN} (an arrow key)
385@kindex C-n
386@kindex DOWN (an arrow key)
387@findex next-line
388Move the cursor down to the next line.
389
390@item @key{C-p} (@code{prev-line})
391@itemx @key{UP} (an arrow key)
392@kindex C-p
393@kindex UP (an arrow key)
394@findex prev-line
395Move the cursor up to the previous line.
396
397@item @key{C-a} (@code{beginning-of-line})
398@itemx @key{Home} (on DOS/Windows only)
399@kindex C-a, in Info windows
400@kindex Home
401@findex beginning-of-line
402Move the cursor to the start of the current line.
403
404@item @key{C-e} (@code{end-of-line})
405@itemx @key{End} (on DOS/Windows only)
406@kindex C-e, in Info windows
407@kindex End
408@findex end-of-line
409Move the cursor to the end of the current line.
410
411@item @key{C-f} (@code{forward-char})
412@itemx @key{RIGHT} (an arrow key)
413@kindex C-f, in Info windows
414@kindex RIGHT (an arrow key)
415@findex forward-char
416Move the cursor forward a character.
417
418@item @key{C-b} (@code{backward-char})
419@itemx @key{LEFT} (an arrow key)
420@kindex C-b, in Info windows
421@kindex LEFT (an arrow key)
422@findex backward-char
423Move the cursor backward a character.
424
425@item @key{M-f} (@code{forward-word})
426@itemx @kbd{C-@key{RIGHT}} (on DOS/Windows only)
427@kindex M-f, in Info windows
428@kindex C-RIGHT
429@findex forward-word
430Move the cursor forward a word.
431
432@item @key{M-b} (@code{backward-word})
433@itemx @kbd{C-@key{LEFT}} (on DOS/Windows only)
434@kindex M-b, in Info windows
435@kindex C-LEFT
436@findex backward-word
437Move the cursor backward a word.
438
439@item @key{M-<} (@code{beginning-of-node})
440@itemx @key{C-@key{Home}} (on DOS/Windows only)
441@itemx @key{b}
442@itemx @key{M-b}, vi-like operation
443@kindex b, in Info windows
444@kindex M-<
445@kindex C-Home
446@kindex M-b, vi-like operation
447@findex beginning-of-node
448Move the cursor to the start of the current node.
449
450@item @key{M->} (@code{end-of-node})
451@itemx @key{C-@key{End}} (on DOS/Windows only)
452@itemx @key{e}
453@kindex M->
454@kindex e, in Info windows
455@kindex C-End
456@findex end-of-node
457Move the cursor to the end of the current node.
458
459@item @key{M-r} (@code{move-to-window-line})
460@kindex M-r
461@findex move-to-window-line
462Move the cursor to a specific line of the window.  Without a numeric
463argument, @code{M-r} moves the cursor to the start of the line in the
464center of the window.  With a numeric argument of @var{n}, @code{M-r}
465moves the cursor to the start of the @var{n}th line in the window.
466@end table
467
468
469@node Scrolling Commands
470@chapter Moving Text Within a Window
471@cindex scrolling
472
473Sometimes you are looking at a screenful of text, and only part of the
474current paragraph you are reading is visible on the screen.  The
475commands detailed in this section are used to shift which part of the
476current node is visible on the screen.
477
478Scrolling commands are bound differently when @samp{--vi-keys} operation
479is in effect (@pxref{--vi-keys}).  These key bindings are designated
480with ``vi-like operation''.
481
482@table @asis
483@item @key{SPC} (@code{scroll-forward})
484@kindex SPC, in Info windows
485@findex scroll-forward
486Shift the text in this window up.  That is, show more of the node which
487is currently below the bottom of the window.  With a numeric argument,
488show that many more lines at the bottom of the window; a numeric
489argument of 4 would shift all of the text in the window up 4 lines
490(discarding the top 4 lines), and show you four new lines at the bottom
491of the window.  Without a numeric argument, @key{SPC} takes the bottom
492two lines of the window and places them at the top of the window,
493redisplaying almost a completely new screenful of lines.  If you are at
494the end of a node, @key{SPC} takes you to the ``next'' node, so that you can
495read an entire manual from start to finish by repeating @key{SPC}.
496
497The default scroll size is one screen-full, but it can be changed by
498invoking the (@code{scroll-forward-page-only-set-window}) command,
499@samp{z} under @samp{--vi-keys}, with a numeric argument.
500
501@item @key{NEXT} (an arrow key) (@code{scroll-forward-page-only})
502@itemx @key{C-v}
503@itemx @key{C-f}, vi-like operation
504@itemx @key{f}, vi-like operation
505@itemx @key{M-SPC}, vi-like operation
506@kindex NEXT
507@kindex C-v
508@kindex C-f, vi-like operation
509@kindex f, vi-like operation
510@kindex M-SPC, vi-like operation
511@findex scroll-forward-page-only
512Shift the text in this window up.  This is identical to the @key{SPC}
513operation above, except that it never scrolls beyond the end of the
514current node.
515
516@kindex PageDown
517The @key{NEXT} key is known as the @key{PageDown} key on some
518keyboards.
519
520@item @key{z} (@code{scroll-forward-page-only-set-window}, vi-like operation)
521@kindex z, vi-like operation
522@findex scroll-forward-page-only-set-window
523Scroll forward, like with @key{NEXT}, but if a numeric argument is
524specified, it becomes the default scroll size for subsequent
525@code{scroll-forward} and @code{scroll-backward} commands and their
526ilk.
527
528@item @key{DEL} (@code{scroll-backward})
529@kindex DEL, in Info windows
530@findex scroll-backward
531Shift the text in this window down.  The inverse of
532@code{scroll-forward}.
533If you are at the start of a node, @key{DEL} takes you to the
534``previous'' node, so that you can read an entire manual from finish to
535start by repeating @key{DEL}.  The default scroll size can be changed by
536invoking the (@code{scroll-backward-page-only-set-window}) command,
537@samp{w} under @samp{--vi-keys}, with a numeric argument.
538
539@itemx @key{PREVIOUS} (arrow key) (@code{scroll-backward-page-only})
540@itemx @key{PRIOR} (arrow key)
541@itemx @key{M-v}
542@itemx @key{b}, vi-like operation
543@itemx @key{C-b}, vi-like operation
544@kindex PREVIOUS
545@kindex M-v
546@kindex b, vi-like operation
547@kindex C-b, vi-like operation
548@findex scroll-backward-page-only
549Shift the text in this window down.  The inverse of
550@code{scroll-forward-page-only}.  Does not scroll beyond the start of
551the current node.  The default scroll size can be changed by invoking
552the(@code{scroll-backward-page-only-set-window}) command, @samp{w} under
553@samp{--vi-keys}, with a numeric argument.
554
555@item @key{w} (@code{scroll-backward-page-only-set-window}, vi-like operation)
556@kindex w, vi-like operation
557@findex scroll-backward-page-only-set-window
558Scroll backward, like with @key{PREVIOUS}, but if a numeric argument is
559specified, it becomes the default scroll size for subsequent
560@code{scroll-forward} and @code{scroll-backward} commands.
561
562@item @key{C-n} (@code{down-line}, vi-like operation)
563@itemx @key{C-e}, vi-like operation
564@itemx @key{RET}, vi-like operation
565@itemx @key{LFD}, vi-like operation
566@itemx @key{DOWN}, vi-like operation
567@kindex C-n, vi-like operation
568@kindex C-e, vi-like operation
569@kindex RET, vi-like operation
570@kindex LFD, vi-like operation
571@kindex DOWN, vi-like operation
572@findex down-line
573Scroll forward by one line.  With a numeric argument, scroll forward
574that many lines.
575
576@item @key{C-p} (@code{up-line}, vi-like operation)
577@itemx @key{UP}, vi-like operation
578@itemx @key{y}, vi-like operation
579@itemx @key{k}, vi-like operation
580@itemx @key{C-k}, vi-like operation
581@itemx @key{C-y}, vi-like operation
582@kindex C-p, vi-like operation
583@kindex UP, vi-like operation
584@kindex y, vi-like operation
585@kindex k, vi-like operation
586@kindex C-k, vi-like operation
587@kindex C-y, vi-like operation
588@findex up-line
589Scroll backward one line.  With a numeric argument, scroll backward that
590many lines.
591
592@item @key{d} (@code{scroll-half-screen-down}, vi-like operation)
593@itemx @key{C-d}, vi-like operation
594@kindex d, vi-like operation
595@kindex C-d, vi-like operation
596@findex scroll-half-screen-down
597Scroll forward by half of the screen size.  With a numeric argument,
598scroll that many lines.  If an argument is specified, it becomes the new
599default number of lines to scroll for subsequent @samp{d} and @samp{u}
600commands.
601
602@item @key{u} (@code{scroll-half-screen-up}, vi-like operation)
603@itemx @key{C-u}, vi-like operation
604@kindex u, vi-like operation
605@kindex C-u, vi-like operation
606@findex scroll-half-screen-up
607Scroll back by half of the screen size.  With a numeric argument,
608scroll that many lines.  If an argument is specified, it becomes the new
609default number of lines to scroll for subsequent @samp{u} and @samp{d}
610commands.
611@end table
612
613@cindex scrolling through node structure
614The @code{scroll-forward} and @code{scroll-backward} commands can also
615move forward and backward through the node structure of the file.  If
616you press @key{SPC} while viewing the end of a node, or @key{DEL} while
617viewing the beginning of a node, what happens is controlled by the
618variable @code{scroll-behavior}.  @xref{Variables,
619@code{scroll-behavior}}, for more information.
620
621The @code{scroll-forward-page-only} and @code{scroll-backward-page-only}
622commands never scroll beyond the current node.
623
624@kindex PageUp
625The @key{PREVIOUS} key is the @key{PageUp} key on many keyboards.  Emacs
626refers to it by the name @key{PRIOR}.  When you use @key{PRIOR} or
627@key{PageUp} to scroll, Info never scrolls beyond the beginning of the
628current node.
629
630@kindex BS (backspace)
631If your keyboard lacks the @key{DEL} key, look for a key called
632@key{BS}, or @samp{BackSpace}, sometimes designated with an arrow which
633points to the left, which should perform the same function.
634
635@table @asis
636@item @key{C-l} (@code{redraw-display})
637@kindex C-l
638@findex redraw-display
639Redraw the display from scratch, or shift the line containing the cursor
640to a specified location.  With no numeric argument, @samp{C-l} clears
641the screen, and then redraws its entire contents.  Given a numeric
642argument of @var{n}, the line containing the cursor is shifted so that
643it is on the @var{n}th line of the window.
644
645@item @kbd{C-x @key{w}} (@code{toggle-wrap})
646@kindex C-w
647@findex toggle-wrap
648Toggles the state of line wrapping in the current window.  Normally,
649lines which are longer than the screen width @dfn{wrap}, i.e., they are
650continued on the next line.  Lines which wrap have a @samp{\} appearing
651in the rightmost column of the screen.  You can cause such lines to be
652terminated at the rightmost column by changing the state of line
653wrapping in the window with @code{C-x w}.  When a line which needs more
654space than one screen width to display is displayed, a @samp{$} appears
655in the rightmost column of the screen, and the remainder of the line is
656invisible.  When long lines are truncated, the modeline displays the
657@samp{$} character near its left edge.
658@end table
659
660
661@node Node Commands
662@chapter Selecting a Node
663@cindex nodes, selection of
664
665This section details the numerous Info commands which select a new node
666to view in the current window.
667
668The most basic node commands are @samp{n}, @samp{p}, @samp{u}, and
669@samp{l}.  Note that the commands to select nodes are mapped differently
670when @samp{--vi-keys} is in effect; these keybindings are designated
671below as ``vi-like operation''.
672
673When you are viewing a node, the top line of the node contains some Info
674@dfn{pointers} which describe where the next, previous, and up nodes
675are.  Info uses this line to move about the node structure of the file
676when you use the following commands:
677
678@table @asis
679@item @key{n} (@code{next-node})
680@itemx @kbd{C-@key{NEXT}} (on DOS/Windows only)
681@itemx @kbd{C-x @key{n}}, vi-like operation
682@kindex n
683@kindex C-NEXT
684@kindex C-x n, vi-like operation
685@findex next-node
686Select the `Next' node.
687
688@kindex C-PgDn
689The @key{NEXT} key is known as the @key{PgDn} key on some
690keyboards.
691
692@item @key{p} (@code{prev-node})
693@itemx @kbd{C-@key{PREVIOUS}} (on DOS/Windows only)
694@kindex p
695@kindex C-PREVIOUS
696@findex prev-node
697Select the `Prev' node.
698
699@kindex C-PgUp
700The @key{PREVIOUS} key is known as the @key{PgUp} key on some
701keyboards.
702
703@item @key{u} (@code{up-node})
704@itemx @kbd{C-@key{UP}} (an arrow key on DOS/Windows only)
705@itemx @kbd{C-x @key{u}}, vi-like operation
706@kindex u
707@kindex C-UP
708@kindex C-x u, vi-like operation
709@findex up-node
710Select the `Up' node.
711@end table
712
713You can easily select a node that you have already viewed in this window
714by using the @samp{l} command---this name stands for ``last'', and
715actually moves backwards through the history of visited nodes for this
716window.  This is handy when you followed a reference to another node,
717possibly to read about a related issue, and would like then to resume
718reading at the same place where you started the excursion.
719
720Each node where you press @samp{l} is discarded from the history.  Thus,
721by the time you get to the first node you visited in a window, the
722entire history of that window is discarded.
723
724@table @asis
725@item @key{l} (@code{history-node})
726@itemx @key{C-@key{CENTER}} (on DOS/Windows only)
727@itemx @key{'}, vi-like operation
728@kindex l
729@kindex C-CENTER
730@kindex ', vi-like operation
731@findex history-node
732Pop the most recently selected node in this window from the node
733history.
734@end table
735
736Two additional commands make it easy to select the most commonly
737selected nodes; they are @samp{t} and @samp{d}.
738
739@table @asis
740@item @key{t} (@code{top-node})
741@itemx @key{M-t}, vi-like operation
742@kindex t
743@kindex M-t, vi-like operation
744@findex top-node
745Select the node @samp{Top} in the current Info file.
746
747@item @key{d} (@code{dir-node})
748@itemx @key{M-d}, vi-like operation
749@kindex d
750@kindex M-d, vi-like operation
751@findex dir-node
752Select the directory node (i.e., the node @samp{(dir)}).
753@end table
754
755Here are some other commands which immediately result in the selection
756of a different node in the current window:
757
758@table @asis
759@item @key{<} (@code{first-node})
760@itemx @key{g}, vi-like operation
761@kindex <
762@kindex g, vi-like operation
763@findex first-node
764Selects the first node which appears in this file.  This node is most
765often @samp{Top}, but it does not have to be.  With a numeric argument
766@var{N}, select the @var{N}th node (the first node is node 1).  An
767argument of zero is the same as the argument of 1.
768
769@item @key{>} (@code{last-node})
770@itemx @key{G}, vi-like operation
771@kindex >
772@kindex G, vi-like operation
773@findex last-node
774Select the last node which appears in this file.  With a numeric argument
775@var{N}, select the @var{N}th node (the first node is node 1).  An
776argument of zero is the same as no argument, i.e., it selects the last
777node.
778
779@item @key{]} (@code{global-next-node})
780@kindex ]
781@findex global-next-node
782Move forward or down through node structure.  If the node that you are
783currently viewing has a @samp{Next} pointer, that node is selected.
784Otherwise, if this node has a menu, the first menu item is selected.  If
785there is no @samp{Next} and no menu, the same process is tried with the
786@samp{Up} node of this node.
787
788@item @key{[} (@code{global-prev-node})
789@kindex [
790@findex global-prev-node
791Move backward or up through node structure.  If the node that you are
792currently viewing has a @samp{Prev} pointer, that node is selected.
793Otherwise, if the node has an @samp{Up} pointer, that node is selected,
794and if it has a menu, the last item in the menu is selected.
795@end table
796
797You can get the same behavior as @code{global-next-node} and
798@code{global-prev-node} while simply scrolling through the file with
799@key{SPC} and @key{DEL}; @xref{Variables, @code{scroll-behavior}}, for
800more information.
801
802@table @asis
803@anchor{goto-node}
804@item @key{g} (@code{goto-node})
805@itemx @kbd{C-x @key{g}}, vi-like operation
806@kindex g
807@kindex C-x g, vi-like operation
808@findex goto-node
809Read the name of a node and select it.  While reading the node name,
810completion (@pxref{The Echo Area, completion}) is only done for the
811nodes which reside in one of the Info files that were loaded in the
812current Info session; if the desired node resides in some other file,
813you must type the node exactly as it appears in that Info file, and you
814must include the Info file of the other file.  For example,
815
816@example
817@code{g(emacs)Buffers}
818@end example
819
820finds the node @samp{Buffers} in the Info file @file{emacs}.
821
822@anchor{goto-invocation}
823@item @key{O} (@code{goto-invocation}
824@itemx @key{I}
825@kindex O
826@kindex I
827@findex goto-invocation
828@cindex finding the Invocation node
829Read the name of a program and look for a node in the current Info file
830which describes the invocation and the command-line options for that
831program.  The default program name is derived from the name of the
832current Info file.  This command does the same as the
833@samp{--show-options} command-line option (@pxref{--show-options}), but
834it also allows to specify the program name; this is important for those
835manuals which describe several programs.
836
837If you need to find the Invocation node of a program that is documented
838in another Info file, you need to visit that file before invoking
839@samp{I}.  For example, if you are reading the Emacs manual and want to
840see the command-line options of the @code{makeinfo} program, type @kbd{g
841(texinfo) @key{RET}} and then @kbd{I makeinfo @key{RET}}.  If you don't
842know what Info file documents the command, or if invoking @samp{I}
843doesn't display the right node, go to the @samp{(dir)} node (using the
844@samp{d} command) and invoke @samp{I} from there.
845
846@item @key{G} (@code{menu-sequence})
847@kindex G
848@findex menu-sequence
849@cindex menu, following, from inside Info
850Read a sequence of menu entries and follow it.  Info prompts for a
851sequence of menu items separated by commas.  (Since commas are not
852allowed in a node name, they are a natural choice for a delimiter in a
853list of menu items.)  Info then looks up the first item in the menu of
854the node @samp{(dir)} (if the @samp{(dir)} node cannot be found, Info
855uses @samp{Top}).  If such an entry is found, Info goes to the node it
856points to and looks up the second item in the menu of that node, etc.
857In other words, you can specify a complete path which descends through
858the menu hierarchy of a particular Info file starting at the
859@samp{(dir)} node.  This has the same effect as if you typed the menu
860item sequence on Info's command line, see @ref{command-line menu items,,
861Info command-line arguments processing}.  For example,
862
863@example
864 @kbd{G Texinfo,Overview,Reporting Bugs @key{RET}}
865@end example
866
867@noindent
868displays the node @samp{Reporting Bugs} in the Texinfo manual.  (You
869don't actually need to type the menu items in their full length, or in
870their exact letter-case.  However, if you do type the menu items
871exactly, Info will find it faster.)
872
873If any of the menu items you type are not found, Info stops at the last
874entry it did find and reports an error.
875
876@item @kbd{C-x @key{k}} (@code{kill-node})
877@kindex C-x k
878@findex kill-node
879Kill a node.  The node name is prompted for in the echo area, with a
880default of the current node.  @dfn{Killing} a node means that Info tries
881hard to forget about it, removing it from the list of history nodes kept
882for the window where that node is found.  Another node is selected in
883the window which contained the killed node.
884
885@item @kbd{C-x C-f} (@code{view-file})
886@kindex C-x C-f
887@findex view-file
888Read the name of a file and selects the entire file.  The command
889@example
890@code{C-x C-f @var{filename}}
891@end example
892is equivalent to typing
893@example
894@code{g(@var{filename})*}
895@end example
896
897@item @kbd{C-x C-b} (@code{list-visited-nodes})
898@kindex C-x C-b
899@findex list-visited-nodes
900Make a window containing a menu of all of the currently visited nodes.
901This window becomes the selected window, and you may use the standard
902Info commands within it.
903
904@item @kbd{C-x @key{b}} (@code{select-visited-node})
905@kindex C-x b
906@findex select-visited-node
907Select a node which has been previously visited in a visible window.
908This is similar to @samp{C-x C-b} followed by @samp{m}, but no window is
909created.
910@end table
911
912
913@node Searching Commands
914@chapter Searching an Info File
915@cindex searching
916
917GNU Info allows you to search for a sequence of characters throughout an
918entire Info file, search through the indices of an Info file, or find
919areas within an Info file which discuss a particular topic.
920
921@table @asis
922@item @key{s} (@code{search})
923@itemx @key{/}
924@kindex s
925@kindex /
926@findex search
927Read a string in the echo area and search for it.  If the string
928includes upper-case characters, the Info file is searched
929case-sensitively; otherwise Info ignores the letter case.  With a
930numeric argument of @var{N}, search for @var{N}th occurrence of the
931string.  Negative arguments search backwards.
932
933@item @key{?} (@code{search-backward}, vi-like operation)
934@kindex ?, vi-like operation
935@findex search-backward
936Read a string in the echo area and search backward through the Info file
937for that string.  If the string includes upper-case characters, the Info
938file is searched case-sensitively; otherwise Info ignores the letter
939case.  With a numeric argument of @var{N}, search for @var{N}th
940occurrence of the string.  Negative arguments search forward.
941
942@item @key{S} (@code{search-case-sensitively}
943@kindex S
944@findex search-case-sensitively
945@cindex search, case-sensitive
946@cindex case-sensitive search
947Read a string in the echo area and search for it case-sensitively, even
948if the string includes only lower-case letters.  With a numeric argument
949of @var{N}, search for @var{N}th occurrence of the string.  Negative
950arguments search backwards.
951
952@item @kbd{C-x @key{n}} (@code{search-next})
953@itemx @key{n}, vi-like operation
954@kindex C-x n
955@kindex n, vi-like operation
956@findex search-next
957@cindex repeated search
958Search for the same string used in the last search command, in the same
959direction, and with the same case-sensitivity option.  With a numeric
960argument of @var{N}, search for @var{N}th next occurrence.
961
962@item @kbd{C-x @key{N}} (@code{search-previous})
963@itemx @key{N}, vi-like operation
964@kindex C-x N
965@kindex n, vi-like operation
966@findex search-previous
967Search for the same string used in the last search command, and with the
968same case-sensitivity option, but in the reverse direction.  With a
969numeric argument of @var{N}, search for @var{N}th previous occurrence.
970
971@item @key{C-s} (@code{isearch-forward})
972@kindex C-s
973@findex isearch-forward
974@cindex incremental search
975Interactively search forward through the Info file for a string as you
976type it.  If the string includes upper-case characters, the search is
977case-sensitive; otherwise Info ignores the letter case.
978
979@item @key{C-r} (@code{isearch-backward})
980@kindex C-r
981@findex isearch-backward
982Interactively search backward through the Info file for a string as
983you type it.  If the string includes upper-case characters, the search
984is case-sensitive; otherwise Info ignores the letter case.
985
986@item @key{i} (@code{index-search})
987@kindex i
988@findex index-search
989@cindex index, searching
990@cindex searching, in the indices
991Look up a string in the indices for this Info file, and select a node
992to which the found index entry points.
993
994@item @key{,} (@code{next-index-match})
995@kindex ,
996@findex next-index-match
997Move to the node containing the next matching index item from the last
998@samp{i} command.
999
1000@item @kbd{M-x index-apropos}
1001@findex index-apropos
1002Grovel the indices of all the known Info files on your system for a
1003string, and build a menu of the possible matches.
1004@end table
1005
1006The most basic searching command is @samp{s} or @samp{/}
1007(@code{search}).  The @samp{s} command prompts you for a string in the
1008echo area, and then searches the remainder of the Info file for an
1009occurrence of that string.  If the string is found, the node containing
1010it is selected, and the cursor is left positioned at the start of the
1011found string.  Subsequent @samp{s} commands show you the default search
1012string within @samp{[} and @samp{]}; pressing @key{RET} instead of
1013typing a new string will use the default search string.  Under
1014@samp{--vi-keys} (@pxref{--vi-keys}), using the @samp{n} or @samp{N}
1015commands is a faster way of searching for the same string.
1016
1017@dfn{Incremental searching} is similar to basic searching, but the
1018string is looked up while you are typing it, instead of waiting until
1019the entire search string has been specified.
1020
1021@cindex search, and case-sensitivity
1022@cindex case-sensitivity, and search
1023Both incremental and non-incremental search by default ignore the case
1024of letters when comparing the Info file text with the search string.
1025However, an uppercase letter in the search string makes the search
1026case-sensitive.  You can force a case-sensitive non-incremental search,
1027even for a string that includes only lower-case letters, by using the
1028@samp{S} command (@code{search-case-sensitively}).  The @samp{n} and
1029@samp{N} commands operate case-sensitively if the last search command
1030was @samp{S}.
1031
1032The most efficient means of finding something quickly in a manual is
1033the @samp{i} command (@code{index-search}).  This command prompts for
1034a string, and then looks for that string in all the indices of the
1035current Info manual.  If it finds a matching index entry, it displays
1036the node to which that entry refers and prints the full text of the
1037entry in the echo area.  You can press @samp{,}
1038(@code{next-index-match}) to find more matches.  A good Info manual
1039has all of its important concepts indexed, so the @samp{i} command
1040lets you use a manual as a reference.
1041
1042If you don't know what manual documents something, try the @kbd{M-x
1043index-apropos} command.  It prompts for a string and then looks up
1044that string in all the indices of all the Info documents installed on
1045your system.  It can also be invoked from the command line; see
1046@ref{--apropos}.
1047
1048
1049@node Xref Commands
1050@chapter Selecting Cross References
1051
1052We have already discussed the @samp{Next}, @samp{Prev}, and @samp{Up}
1053pointers which appear at the top of a node.  In addition to these
1054pointers, a node may contain other pointers which refer you to a
1055different node, perhaps in another Info file.  Such pointers are called
1056@dfn{cross references}, or @dfn{xrefs} for short.
1057
1058@menu
1059* Parts of an Xref::            What a cross reference is made of.
1060* Selecting Xrefs::             Commands for selecting menu or note items.
1061@end menu
1062
1063@node Parts of an Xref
1064@section Parts of an Xref
1065
1066Cross references have two major parts: the first part is called the
1067@dfn{label}; it is the name that you can use to refer to the cross
1068reference, and the second is the @dfn{target}; it is the full name of
1069the node that the cross reference points to.
1070
1071The target is separated from the label by a colon @samp{:}; first the
1072label appears, and then the target.  For example, in the sample menu
1073cross reference below, the single colon separates the label from the
1074target.
1075
1076@example
1077* Foo Label: Foo Target.        More information about Foo.
1078@end example
1079
1080Note the @samp{.} which ends the name of the target.  The @samp{.} is
1081not part of the target; it serves only to let Info know where the target
1082name ends.
1083
1084A shorthand way of specifying references allows two adjacent colons to
1085stand for a target name which is the same as the label name:
1086
1087@example
1088* Foo Commands::                Commands pertaining to Foo.
1089@end example
1090
1091In the above example, the name of the target is the same as the name of
1092the label, in this case @code{Foo Commands}.
1093
1094You will normally see two types of cross reference while viewing nodes:
1095@dfn{menu} references, and @dfn{note} references.  Menu references
1096appear within a node's menu; they begin with a @samp{*} at the beginning
1097of a line, and continue with a label, a target, and a comment which
1098describes what the contents of the node pointed to contains.
1099
1100Note references appear within the body of the node text; they begin with
1101@code{*Note}, and continue with a label and a target.
1102
1103Like @samp{Next}, @samp{Prev}, and @samp{Up} pointers, cross references
1104can point to any valid node.  They are used to refer you to a place
1105where more detailed information can be found on a particular subject.
1106Here is a cross reference which points to a node within the Texinfo
1107documentation:  @xref{xref, , Writing an Xref, texinfo, the Texinfo
1108Manual}, for more information on creating your own texinfo cross
1109references.
1110
1111@node Selecting Xrefs
1112@section Selecting Xrefs
1113
1114The following table lists the Info commands which operate on menu items.
1115
1116@table @asis
1117@item @key{1} (@code{menu-digit})
1118@itemx @key{2} @dots{} @key{9}
1119@itemx @key{M-1}, vi-like operation
1120@itemx @key{M-2} @dots{} @key{M-9}, vi-like operation
1121@cindex 1 @dots{} 9, in Info windows
1122@cindex M-1 @dots{} M-9, vi-like operation
1123@kindex 1 @dots{} 9, in Info windows
1124@kindex M-1 @dots{} M-9, vi-like operation
1125@findex menu-digit
1126Within an Info window, pressing a single digit, (such as @samp{1}),
1127selects that menu item, and places its node in the current window.
1128For convenience, there is one exception; pressing @samp{0} selects the
1129@emph{last} item in the node's menu.  When @samp{--vi-keys} is in
1130effect, digits set the numeric argument, so these commands are remapped
1131to their @samp{M-} varieties.  For example, to select the last menu
1132item, press @key{M-0}.
1133
1134@item @key{0} (@code{last-menu-item})
1135@itemx @key{M-0}, vi-like operation
1136@kindex 0, in Info windows
1137@kindex M-0, vi-like operation
1138@findex last-menu-item
1139Select the last item in the current node's menu.
1140
1141@item @key{m} (@code{menu-item})
1142@kindex m
1143@findex menu-item
1144Reads the name of a menu item in the echo area and selects its node.
1145Completion is available while reading the menu label.  @xref{The Echo
1146Area, completion}.
1147
1148@item @kbd{M-x find-menu}
1149@findex find-menu
1150Move the cursor to the start of this node's menu.
1151@end table
1152
1153This table lists the Info commands which operate on cross references.
1154
1155@table @asis
1156@item @key{f} (@code{xref-item})
1157@itemx @key{r}
1158@item @key{M-f}, vi-like operation
1159@itemx @kbd{C-x @key{r}}, vi-like operation
1160@kindex f
1161@kindex r
1162@kindex M-f, vi-like operation
1163@kindex C-x r, vi-like operation
1164@findex xref-item
1165Reads the name of a note cross reference in the echo area and selects
1166its node.  Completion is available while reading the cross reference
1167label.  @xref{The Echo Area, completion}.
1168@end table
1169
1170Finally, the next few commands operate on menu or note references alike:
1171
1172@table @asis
1173@item @key{TAB} (@code{move-to-next-xref})
1174@kindex TAB, in Info windows
1175@findex move-to-next-xref
1176Move the cursor to the start of the next nearest menu item or note
1177reference in this node.  You can then use @key{RET}
1178(@code{select-reference-this-line}) to select the menu or note reference.
1179
1180@item @key{M-TAB} (@code{move-to-prev-xref})
1181@itemx @key{Shift-@key{TAB}} (on DOS/Windows only)
1182@kindex M-TAB, in Info windows
1183@findex move-to-prev-xref
1184Move the cursor the start of the nearest previous menu item or note
1185reference in this node.
1186
1187@kindex Shift-TAB, in Info windows
1188@kindex BackTab, in Info windows
1189On DOS/Windows only, the @kbd{Shift-@key{TAB}} key is an alias for
1190@kbd{M-@key{TAB}}.  This key is sometimes called @samp{BackTab}.
1191
1192@item @key{RET} (@code{select-reference-this-line})
1193@itemx @key{M-g}, vi-like operation
1194@kindex RET, in Info windows
1195@kindex M-g, vi-like operation
1196@findex select-reference-this-line
1197Select the menu item or note reference appearing on this line.
1198@end table
1199
1200
1201@node Window Commands
1202@chapter Manipulating Multiple Windows
1203@cindex windows, manipulating
1204
1205A @dfn{window} is a place to show the text of a node.  Windows have a
1206view area where the text of the node is displayed, and an associated
1207@dfn{mode line}, which briefly describes the node being viewed.
1208
1209GNU Info supports multiple windows appearing in a single screen; each
1210window is separated from the next by its modeline.  At any time, there
1211is only one @dfn{active} window, that is, the window in which the cursor
1212appears.  There are commands available for creating windows, changing
1213the size of windows, selecting which window is active, and for deleting
1214windows.
1215
1216@menu
1217* The Mode Line::               What appears in the mode line?
1218* Basic Windows::               Manipulating windows in Info.
1219* The Echo Area::               Used for displaying errors and reading input.
1220@end menu
1221
1222@node The Mode Line
1223@section The Mode Line
1224
1225A @dfn{mode line} is a line of inverse video which appears at the bottom
1226of an Info window.  It describes the contents of the window just above
1227it; this information includes the name of the file and node appearing in
1228that window, the number of screen lines it takes to display the node,
1229and the percentage of text that is above the top of the window.  It can
1230also tell you if the indirect tags table for this Info file needs to be
1231updated, and whether or not the Info file was compressed when stored on
1232disk.
1233
1234Here is a sample mode line for a window containing an uncompressed file
1235named @file{dir}, showing the node @samp{Top}.
1236
1237@example
1238@group
1239-----Info: (dir)Top, 40 lines --Top-------------------------------------
1240            ^^   ^   ^^^        ^^
1241          (file)Node #lines    where
1242@end group
1243@end example
1244
1245When a node comes from a file which is compressed on disk, this is
1246indicated in the mode line with two small @samp{z}'s.  In addition, if
1247the Info file containing the node has been split into subfiles, the name
1248of the subfile containing the node appears in the modeline as well:
1249
1250@example
1251--zz-Info: (emacs)Top, 291 lines --Top-- Subfile: emacs-1.Z-------------
1252@end example
1253
1254Truncation of long lines (as opposed to wrapping them to the next
1255display line, @pxref{Scrolling Commands, toggle-wrap}) is indicated by a
1256@samp{$} at the left edge of the mode line:
1257
1258@example
1259--$--Info: (texinfo)Top, 480 lines --Top-- Subfile: texinfo-1-----------
1260@end example
1261
1262When Info makes a node internally, such that there is no corresponding
1263info file on disk, the name of the node is surrounded by asterisks
1264(@samp{*}).  The name itself tells you what the contents of the window
1265are; the sample mode line below shows an internally constructed node
1266showing possible completions:
1267
1268@example
1269-----Info: *Completions*, 7 lines --All---------------------------------
1270@end example
1271
1272@node Basic Windows
1273@section Window Commands
1274
1275It can be convenient to view more than one node at a time.  To allow
1276this, Info can display more than one @dfn{window}.  Each window has its
1277own mode line (@pxref{The Mode Line}) and history of nodes viewed in that
1278window (@pxref{Node Commands, , @code{history-node}}).
1279
1280@table @asis
1281@item @kbd{C-x @key{o}} (@code{next-window})
1282@cindex windows, selecting
1283@kindex C-x o
1284@findex next-window
1285Select the next window on the screen.  Note that the echo area can only be
1286selected if it is already in use, and you have left it temporarily.
1287Normally, @samp{C-x o} simply moves the cursor into the next window on
1288the screen, or if you are already within the last window, into the first
1289window on the screen.  Given a numeric argument, @samp{C-x o} moves over
1290that many windows.  A negative argument causes @samp{C-x o} to select
1291the previous window on the screen.
1292
1293@item @kbd{M-x prev-window}
1294@findex prev-window
1295Select the previous window on the screen.  This is identical to
1296@samp{C-x o} with a negative argument.
1297
1298@item @kbd{C-x @key{2}} (@code{split-window})
1299@cindex windows, creating
1300@kindex C-x 2
1301@findex split-window
1302Split the current window into two windows, both showing the same node.
1303Each window is one half the size of the original window, and the cursor
1304remains in the original window.  The variable @code{automatic-tiling}
1305can cause all of the windows on the screen to be resized for you
1306automatically (@pxref{Variables, , automatic-tiling}).
1307
1308@item @kbd{C-x @key{0}} (@code{delete-window})
1309@cindex windows, deleting
1310@kindex C-x 0
1311@findex delete-window
1312Delete the current window from the screen.  If you have made too many
1313windows and your screen appears cluttered, this is the way to get rid of
1314some of them.
1315
1316@item @kbd{C-x @key{1}} (@code{keep-one-window})
1317@kindex C-x 1
1318@findex keep-one-window
1319Delete all of the windows excepting the current one.
1320
1321@item @kbd{ESC @key{C-v}} (@code{scroll-other-window})
1322@kindex ESC C-v, in Info windows
1323@findex scroll-other-window
1324Scroll the other window, in the same fashion that @samp{C-v} might
1325scroll the current window.  Given a negative argument, scroll the
1326``other'' window backward.
1327
1328@item @kbd{C-x @key{^}} (@code{grow-window})
1329@kindex C-x ^
1330@findex grow-window
1331Grow (or shrink) the current window.  Given a numeric argument, grow
1332the current window that many lines; with a negative numeric argument,
1333shrink the window instead.
1334
1335@item @kbd{C-x @key{t}} (@code{tile-windows})
1336@cindex tiling
1337@kindex C-x t
1338@findex tile-windows
1339Divide the available screen space among all of the visible windows.
1340Each window is given an equal portion of the screen in which to display
1341its contents.  The variable @code{automatic-tiling} can cause
1342@code{tile-windows} to be called when a window is created or deleted.
1343@xref{Variables, , @code{automatic-tiling}}.
1344@end table
1345
1346@node The Echo Area
1347@section The Echo Area
1348@cindex echo area
1349
1350The @dfn{echo area} is a one line window which appears at the bottom of
1351the screen.  It is used to display informative or error messages, and to
1352read lines of input from you when that is necessary.  Almost all of the
1353commands available in the echo area are identical to their Emacs
1354counterparts, so please refer to that documentation for greater depth of
1355discussion on the concepts of editing a line of text.  The following
1356table briefly lists the commands that are available while input is being
1357read in the echo area:
1358
1359@table @asis
1360@item @key{C-f} (@code{echo-area-forward})
1361@itemx @key{RIGHT} (an arrow key)
1362@itemx @key{M-h}, vi-like operation
1363@kindex C-f, in the echo area
1364@kindex RIGHT, in the echo area
1365@kindex M-h, in the echo area, vi-like operation
1366@findex echo-area-forward
1367Move forward a character.
1368
1369@item @key{C-b} (@code{echo-area-backward})
1370@itemx @key{LEFT} (an arrow key)
1371@itemx @key{M-l}, vi-like operation
1372@kindex LEFT, in the echo area
1373@kindex C-b, in the echo area
1374@kindex M-l, in the echo area, vi-like operation
1375@findex echo-area-backward
1376Move backward a character.
1377
1378@item @key{C-a} (@code{echo-area-beg-of-line})
1379@itemx @key{M-0}, vi-like operation
1380@kindex C-a, in the echo area
1381@kindex M-0, in the echo area, vi-like operation
1382@findex echo-area-beg-of-line
1383Move to the start of the input line.
1384
1385@item @key{C-e} (@code{echo-area-end-of-line})
1386@itemx @key{M-$}, vi-like operation
1387@kindex C-e, in the echo area
1388@kindex M-$, vi-like operation
1389@findex echo-area-end-of-line
1390Move to the end of the input line.
1391
1392@item @key{M-f} (@code{echo-area-forward-word})
1393@itemx @key{C-@key{RIGHT}} (DOS/Windows only)
1394@itemx @key{M-w}, vi-like operation
1395@kindex M-f, in the echo area
1396@kindex M-w, in the echo area, vi-like operation
1397@findex echo-area-forward-word
1398Move forward a word.
1399
1400@kindex C-RIGHT, in the echo area
1401On DOS/Windows, @kbd{C-@key{RIGHT}} moves forward by words.
1402
1403@item @key{M-b} (@code{echo-area-backward-word})
1404@itemx @key{C-@key{LEFT}} (DOS/Windows only)
1405@kindex M-b, in the echo area
1406@findex echo-area-backward-word
1407Move backward a word.
1408
1409@kindex C-LEFT, in the echo area
1410On DOS/Windows, @kbd{C-@key{LEFT}} moves backward by words.
1411
1412@item @key{C-d} (@code{echo-area-delete})
1413@itemx @key{M-x}, vi-like operation
1414@kindex C-d, in the echo area
1415@kindex M-x, in the echo area, vi-like operation
1416@findex echo-area-delete
1417Delete the character under the cursor.
1418
1419@item @key{DEL} (@code{echo-area-rubout})
1420@kindex DEL, in the echo area
1421@findex echo-area-rubout
1422Delete the character behind the cursor.
1423
1424On some keyboards, this key is designated @key{BS}, for
1425@samp{BackSpace}.  Those keyboards will usually bind @key{DEL} in the
1426echo area to @code{echo-area-delete}.
1427
1428@item @key{C-g} (@code{echo-area-abort})
1429@itemx @key{C-u}, vi-like operation
1430@kindex C-g, in the echo area
1431@kindex C-u, in the echo area, vi-like operation
1432@findex echo-area-abort
1433Cancel or quit the current operation.  If completion is being read, this
1434command discards the text of the input line which does not match any
1435completion.  If the input line is empty, it aborts the calling function.
1436
1437@item @key{RET} (@code{echo-area-newline})
1438@kindex RET, in the echo area
1439@findex echo-area-newline
1440Accept (or forces completion of) the current input line.
1441
1442@item @key{C-q} (@code{echo-area-quoted-insert})
1443@itemx @key{C-v}, vi-like operation
1444@kindex C-q, in the echo area
1445@kindex C-v, in the echo area, vi-like operation
1446@findex echo-area-quoted-insert
1447Insert the next character verbatim.  This is how you can insert control
1448characters into a search string, for example, or the @samp{?} character
1449when Info prompts with completion.
1450
1451@item @var{printing character} (@code{echo-area-insert})
1452@kindex printing characters, in the echo area
1453@findex echo-area-insert
1454Insert the character.  Characters that have their 8th bit set, and not
1455bound to @samp{M-} commands, are also inserted verbatim; this is useful
1456for terminals which support Latin scripts.
1457
1458@item @key{M-TAB} (@code{echo-area-tab-insert})
1459@itemx @key{Shift-@key{TAB}} (on DOS/Windows only)
1460@kindex M-TAB, in the echo area
1461@kindex Shift-TAB, in the echo area
1462@findex echo-area-tab-insert
1463Insert a TAB character.
1464
1465@kindex Shift-TAB, in the echo area
1466@kindex BackTab, in the echo area
1467On DOS/Windows only, the @kbd{Shift-@key{TAB}} key is an alias for
1468@kbd{M-@key{TAB}}.  This key is sometimes called @samp{BackTab}.
1469
1470@item @key{C-t} (@code{echo-area-transpose-chars})
1471@kindex C-t, in the echo area
1472@findex echo-area-transpose-chars
1473Transpose the characters at the cursor.
1474@end table
1475
1476The next group of commands deal with @dfn{killing}, and @dfn{yanking}
1477text@footnote{
1478Some people are used to calling these operations @dfn{cut} and
1479@dfn{paste}, respectively.}.   For an in-depth discussion of killing and
1480yanking, see @ref{Killing, , Killing and Deleting, emacs, the GNU Emacs
1481Manual}.
1482
1483@table @asis
1484@item @key{M-d} (@code{echo-area-kill-word})
1485@itemx @key{M-X}, vi-like operation
1486@kindex M-d, in the echo area
1487@kindex M-X, in the echo area, vi-like operation
1488@findex echo-area-kill-word
1489Kill the word following the cursor.
1490
1491@item @key{M-DEL} (@code{echo-area-backward-kill-word})
1492@itemx @key{M-@key{BS}}
1493@kindex M-DEL, in the echo area
1494@findex echo-area-backward-kill-word
1495Kill the word preceding the cursor.
1496
1497@kindex M-BS, in the echo area
1498On some keyboards, the @code{Backspace} key is used instead of
1499@code{DEL}, so @code{M-@key{Backspace}} has the same effect as
1500@code{M-@key{DEL}}.
1501
1502@item @key{C-k} (@code{echo-area-kill-line})
1503@kindex C-k, in the echo area
1504@findex echo-area-kill-line
1505Kill the text from the cursor to the end of the line.
1506
1507@item @kbd{C-x @key{DEL}} (@code{echo-area-backward-kill-line})
1508@kindex C-x DEL, in the echo area
1509@findex echo-area-backward-kill-line
1510Kill the text from the cursor to the beginning of the line.
1511
1512@item @key{C-y} (@code{echo-area-yank})
1513@kindex C-y, in the echo area
1514@findex echo-area-yank
1515Yank back the contents of the last kill.
1516
1517@item @key{M-y} (@code{echo-area-yank-pop})
1518@kindex M-y, in the echo area
1519@findex echo-area-yank-pop
1520Yank back a previous kill, removing the last yanked text first.
1521@end table
1522
1523@cindex completion
1524Sometimes when reading input in the echo area, the command that needed
1525input will only accept one of a list of several choices.  The choices
1526represent the @dfn{possible completions}, and you must respond with one
1527of them.  Since there are a limited number of responses you can make,
1528Info allows you to abbreviate what you type, only typing as much of the
1529response as is necessary to uniquely identify it.  In addition, you can
1530request Info to fill in as much of the response as is possible; this
1531is called @dfn{completion}.
1532
1533The following commands are available when completing in the echo area:
1534
1535@table @asis
1536@item @key{TAB} (@code{echo-area-complete})
1537@itemx @key{SPC}
1538@kindex TAB, in the echo area
1539@kindex SPC, in the echo area
1540@findex echo-area-complete
1541Insert as much of a completion as is possible.
1542
1543@item @key{?} (@code{echo-area-possible-completions})
1544@kindex ?, in the echo area
1545@findex echo-area-possible-completions
1546Display a window containing a list of the possible completions of what
1547you have typed so far.  For example, if the available choices are:
1548
1549@example
1550@group
1551bar
1552foliate
1553food
1554forget
1555@end group
1556@end example
1557
1558@noindent
1559and you have typed an @samp{f}, followed by @samp{?}, Info will pop up a
1560window showing a node called @samp{*Completions*} which lists the
1561possible completions like this:
1562
1563@example
1564@group
15653 completions:
1566foliate         food
1567forget
1568@end group
1569@end example
1570
1571@noindent
1572i.e., all of the choices which begin with @samp{f}.  Pressing @key{SPC}
1573or @key{TAB} would result in @samp{fo} appearing in the echo area, since
1574all of the choices which begin with @samp{f} continue with @samp{o}.
1575Now, typing @samp{l} followed by @samp{TAB} results in @samp{foliate}
1576appearing in the echo area, since that is the only choice which begins
1577with @samp{fol}.
1578
1579@item @key{ESC C-v} (@code{echo-area-scroll-completions-window})
1580@kindex ESC C-v, in the echo area
1581@findex echo-area-scroll-completions-window
1582Scroll the completions window, if that is visible, or the ``other''
1583window if not.
1584@end table
1585
1586
1587@node Printing Nodes
1588@chapter Printing Nodes
1589@cindex printing
1590
1591In general, we recommend that you use @TeX{} to format the document and
1592print sections of it, by running @code{tex} on the Texinfo source file.
1593However, you may wish to print out the contents of a node as a quick
1594reference document for later use, or if you don't have @TeX{} installed.
1595Info provides you with a command for doing this.
1596
1597@table @asis
1598@item @kbd{M-x print-node}
1599@findex print-node
1600@cindex INFO_PRINT_COMMAND, environment variable
1601Pipe the contents of the current node through the command in the
1602environment variable @code{INFO_PRINT_COMMAND}.  If the variable does not
1603exist, the node is simply piped to @code{lpr} (on DOS/Windows, the
1604default is to print the node to the local printer device, @file{PRN}).
1605
1606@cindex printing nodes to the local printer
1607@cindex local printer device
1608The value of @code{INFO_PRINT_COMMAND} may begin with the @samp{>}
1609character, as in @samp{>/dev/printer}, in which case Info treats the
1610rest as the name of a file or a device.  Instead of piping to a command,
1611Info opens the file, writes the node contents, and closes the file,
1612under the assumption that text written to that file will be printed by
1613the underlying OS.
1614@end table
1615
1616
1617@node Miscellaneous Commands
1618@chapter Miscellaneous Commands
1619
1620GNU Info contains several commands which self-document GNU Info:
1621
1622@table @asis
1623@item @kbd{M-x describe-command}
1624@cindex functions, describing
1625@cindex commands, describing
1626@findex describe-command
1627Read the name of an Info command in the echo area and then display a
1628brief description of what that command does.
1629
1630@item @kbd{M-x describe-key}
1631@cindex keys, describing
1632@findex describe-key
1633Read a key sequence in the echo area, and then display the name and
1634documentation of the Info command that the key sequence invokes.
1635
1636@item @kbd{M-x describe-variable}
1637Read the name of a variable in the echo area and then display a brief
1638description of what the variable affects.
1639
1640@item @kbd{M-x where-is}
1641@findex where-is
1642Read the name of an Info command in the echo area, and then display
1643a key sequence which can be typed in order to invoke that command.
1644
1645@item @key{C-h} (@code{get-help-window})
1646@itemx @key{?}
1647@itemx @key{F1} (on DOS/Windows only)
1648@itemx h, vi-like operation
1649@kindex C-h
1650@kindex ?, in Info windows
1651@kindex F1
1652@kindex h, vi-like operation
1653@findex get-help-window
1654Create (or Move into) the window displaying @code{*Help*}, and place
1655a node containing a quick reference card into it.  This window displays
1656the most concise information about GNU Info available.
1657
1658@item @key{h} (@code{get-info-help-node})
1659@itemx @key{M-h}, vi-like operation
1660@kindex h
1661@kindex M-h, vi-like operation
1662@findex get-info-help-node
1663Try hard to visit the node @code{(info)Help}.  The Info file
1664@file{info.texi} distributed with GNU Info contains this node.  Of
1665course, the file must first be processed with @code{makeinfo}, and then
1666placed into the location of your Info directory.
1667@end table
1668
1669Here are the commands for creating a numeric argument:
1670
1671@table @asis
1672@item @key{C-u} (@code{universal-argument})
1673@cindex numeric arguments
1674@kindex C-u
1675@findex universal-argument
1676Start (or multiply by 4) the current numeric argument.  @samp{C-u} is
1677a good way to give a small numeric argument to cursor movement or
1678scrolling commands; @samp{C-u C-v} scrolls the screen 4 lines, while
1679@samp{C-u C-u C-n} moves the cursor down 16 lines.  @samp{C-u} followed
1680by digit keys sets the numeric argument to the number thus typed:
1681@kbd{C-u 1 2 0} sets the argument to 120.
1682
1683@item @key{M-1} (@code{add-digit-to-numeric-arg})
1684@itemx @key{1}, vi-like operation
1685@itemx @key{M-2} @dots{} @key{M-9}
1686@itemx @key{2} @dots{} @key{9}, vi-like operation
1687@itemx @key{M-0}
1688@itemx @key{0}, vi-like operation
1689@kindex M-0 @dots{} M-9
1690@kindex 0 @dots{} 9, vi-like operation
1691@findex add-digit-to-numeric-arg
1692Add the digit value of the invoking key to the current numeric
1693argument.  Once Info is reading a numeric argument, you may just type
1694the digits of the argument, without the Meta prefix.  For example, you
1695might give @samp{C-l} a numeric argument of 32 by typing:
1696
1697@example
1698@kbd{C-u 3 2 C-l}
1699@end example
1700
1701@noindent
1702or
1703
1704@example
1705@kbd{M-3 2 C-l}
1706@end example
1707
1708@item @key{M--} (@code{add-digit-to-numeric-arg}
1709@itemx @key{-}
1710@kindex M--
1711@kindex -
1712@cindex negative arguments
1713@cindex arguments, negative
1714@cindex numeric arguments, negative
1715To make a negative argument, type @kbd{-}.  Typing @kbd{-} alone makes a
1716negative argument with a value of -1.  If you continue to type digit or
1717Meta-digit keys after @kbd{-}, the result is a negative number produced
1718by those digits.
1719
1720@kbd{-} doesn't work when you type in the echo area, because you need to
1721be able to insert the @samp{-} character itself; use @kbd{M--} instead,
1722if you need to specify negative arguments in the echo area.
1723@end table
1724
1725@samp{C-g} is used to abort the reading of a multi-character key
1726sequence, to cancel lengthy operations (such as multi-file searches) and
1727to cancel reading input in the echo area.
1728
1729@table @asis
1730@item @key{C-g} (@code{abort-key})
1731@itemx @key{C-u}, vi-like operation
1732@cindex cancelling typeahead
1733@cindex cancelling the current operation
1734@kindex C-g, in Info windows
1735@kindex C-u cancels typeahead, vi-like operation
1736@findex abort-key
1737Cancel current operation.
1738@end table
1739
1740The @samp{q} command of Info simply quits running Info.  Under
1741@samp{--vi-keys} (@pxref{--vi-keys}), you can also exit with @samp{:q}
1742or @samp{ZZ}.
1743
1744@table @asis
1745@item @key{q} (@code{quit})
1746@itemx @kbd{C-x C-c}
1747@itemx @kbd{:q}, vi-like operation
1748@itemx @kbd{ZZ}, vi-like operation
1749@cindex quitting
1750@kindex q
1751@kindex C-x C-c
1752@kindex ZZ, vi-like operation
1753@findex quit
1754Exit GNU Info.
1755@end table
1756
1757If the operating system tells GNU Info that the screen is 60 lines tall,
1758and it is actually only 40 lines tall, here is a way to tell Info that
1759the operating system is correct.
1760
1761@table @asis
1762@item @kbd{M-x set-screen-height}
1763@findex set-screen-height
1764@cindex screen, changing the height of
1765Read a height value in the echo area and set the height of the
1766displayed screen to that value.
1767@end table
1768
1769On MS-DOS/MS-Windows, this command actually tries to change the
1770dimensions of the visible screen to the value you type in the echo
1771area.
1772
1773Finally, Info provides a convenient way to display footnotes which might
1774be associated with the current node that you are viewing:
1775
1776@table @asis
1777@item @key{ESC C-f} (@code{show-footnotes})
1778@kindex ESC C-f
1779@findex show-footnotes
1780@cindex footnotes, displaying
1781Show the footnotes (if any) associated with the current node in another
1782window.  You can have Info automatically display the footnotes
1783associated with a node when the node is selected by setting the variable
1784@code{automatic-footnotes}.  @xref{Variables, , @code{automatic-footnotes}}.
1785@end table
1786
1787
1788@node Variables
1789@chapter Manipulating Variables
1790
1791GNU Info contains several @dfn{variables} whose values are looked at by
1792various Info commands.  You can change the values of these variables,
1793and thus change the behavior of Info to more closely match your
1794environment and Info file reading manner.
1795
1796There are two ways to set the value of a variable: interactively, using
1797the @code{set-variable} command described below, or in the @code{#var}
1798section of the @code{.infokey} file.  @xref{Custom Key Bindings}.
1799
1800@table @asis
1801@item @kbd{M-x set-variable}
1802@cindex variables, setting
1803@findex set-variable
1804Read the name of a variable, and the value for it, in the echo area and
1805then set the variable to that value.  Completion is available when
1806reading the variable name (@pxref{The Echo Area, completion}); often,
1807completion is available when reading the value to give to the variable,
1808but that depends on the variable itself.  If a variable does @emph{not}
1809supply multiple choices to complete over, it expects a numeric value.
1810
1811@item @kbd{M-x describe-variable}
1812@cindex variables, describing
1813@findex describe-variable
1814Read the name of a variable in the echo area and then display a brief
1815description of what the variable affects.
1816@end table
1817
1818Here is a list of the variables that you can set in Info.
1819
1820@table @code
1821@item automatic-footnotes
1822@vindex automatic-footnotes
1823When set to @code{On}, footnotes appear and disappear automatically;
1824else, they appear at the bottom of the node text.  This variable is
1825@code{Off} by default.  When a node is selected, a window containing
1826the footnotes which appear in that node is created, and the footnotes
1827are displayed within the new window.  The window that Info creates to
1828contain the footnotes is called @samp{*Footnotes*}.  If a node is
1829selected which contains no footnotes, and a @samp{*Footnotes*} window
1830is on the screen, the @samp{*Footnotes*} window is deleted.  Footnote
1831windows created in this fashion are not automatically tiled so that
1832they can use as little of the display as is possible.
1833
1834@item automatic-tiling
1835@vindex automatic-tiling
1836When set to @code{On}, creating or deleting a window resizes other
1837windows.  This variable is @code{Off} by default.  Normally, typing
1838@samp{C-x 2} divides the current window into two equal parts.  When
1839@code{automatic-tiling} is set to @code{On}, all of the windows are
1840resized automatically, keeping an equal number of lines visible in each
1841window.  There are exceptions to the automatic tiling; specifically, the
1842windows @samp{*Completions*} and @samp{*Footnotes*} are @emph{not}
1843resized through automatic tiling; they remain their original size.
1844
1845@item errors-ring-bell
1846@vindex errors-ring-bell
1847When set to @code{On}, errors cause the bell to ring.  The default
1848setting of this variable is @code{On}.
1849
1850@item gc-compressed-files
1851@vindex gc-compressed-files
1852When set to @code{On}, Info garbage collects files which had to be
1853uncompressed.  The default value of this variable is @code{Off}.
1854Whenever a node is visited in Info, the Info file containing that node
1855is read into core, and Info reads information about the tags and nodes
1856contained in that file.  Once the tags information is read by Info, it
1857is never forgotten.  However, the actual text of the nodes does not need
1858to remain in core unless a particular Info window needs it.  For
1859non-compressed files, the text of the nodes does not remain in core when
1860it is no longer in use.  But de-compressing a file can be a time
1861consuming operation, and so Info tries hard not to do it twice.
1862@code{gc-compressed-files} tells Info it is okay to garbage collect the
1863text of the nodes of a file which was compressed on disk.
1864
1865@item ISO-Latin
1866@cindex ISO Latin characters
1867@vindex ISO-Latin
1868When set to @code{On}, Info accepts and displays ISO Latin characters.
1869By default, Info assumes an ASCII character set.  @code{ISO-Latin} tells
1870Info that it is running in an environment where the European standard
1871character set is in use, and allows you to input such characters to
1872Info, as well as display them.
1873
1874@item scroll-behavior
1875@vindex scroll-behavior
1876Control what happens when forward scrolling is requested at the end of
1877a node, or when backward scrolling is requested at the beginning of a
1878node.  The default value for this variable is @code{Continuous}.  There
1879are three possible values for this variable:
1880
1881@table @code
1882@item Continuous
1883Try to get the first item in this node's menu, or failing that, the
1884@samp{Next} node, or failing that, the @samp{Next} of the @samp{Up}.
1885This behavior is identical to using the @samp{]}
1886(@code{global-next-node}) and @samp{[} (@code{global-prev-node})
1887commands.
1888
1889@item Next Only
1890Only try to get the @samp{Next} node.
1891
1892@item Page Only
1893Simply give up, changing nothing.  If @code{scroll-behavior} is
1894@code{Page Only}, no scrolling command can change the node that is being
1895viewed.
1896@end table
1897
1898@item scroll-step
1899@vindex scroll-step
1900The number of lines to scroll when the cursor moves out of the window.
1901Scrolling happens automatically if the cursor has moved out of the
1902visible portion of the node text when it is time to display.  Usually
1903the scrolling is done so as to put the cursor on the center line of the
1904current window.  However, if the variable @code{scroll-step} has a
1905nonzero value, Info attempts to scroll the node text by that many lines;
1906if that is enough to bring the cursor back into the window, that is what
1907is done.  The default value of this variable is 0, thus placing the
1908cursor (and the text it is attached to) in the center of the window.
1909Setting this variable to 1 causes a kind of ``smooth scrolling'' which
1910some people prefer.
1911
1912@item show-index-match
1913@vindex show-index-match
1914When set to @code{On}, the portion of the matched search string is
1915highlighted in the message which explains where the matched search
1916string was found.  The default value of this variable is @code{On}.
1917When Info displays the location where an index match was found,
1918(@pxref{Searching Commands, , @code{next-index-match}}), the portion of the
1919string that you had typed is highlighted by displaying it in the inverse
1920case from its surrounding characters.
1921
1922@item visible-bell
1923@vindex visible-bell
1924When set to @code{On}, GNU Info attempts to flash the screen instead of
1925ringing the bell.  This variable is @code{Off} by default.  Of course,
1926Info can only flash the screen if the terminal allows it; in the case
1927that the terminal does not allow it, the setting of this variable has no
1928effect.  However, you can make Info perform quietly by setting the
1929@code{errors-ring-bell} variable to @code{Off}.
1930
1931@end table
1932
1933
1934@node Custom Key Bindings
1935@chapter Customizing Key Bindings and Variables
1936
1937@cindex default key bindings, overriding
1938@cindex overriding default key bindings
1939@cindex customizing key bindings
1940@cindex key bindings, customizing
1941@cindex infokey
1942@cindex .info
1943@cindex .infokey
1944@cindex _info file (MS-DOS)
1945
1946For those whose editor/pager of choice is not Emacs and who are not
1947entirely satisfied with the --vi-keys option (@pxref{--vi-keys}), GNU
1948Info provides a way to define different key-to-command bindings and
1949variable settings from the defaults described in this document.
1950
1951On startup, GNU Info looks for a configuration file in the invoker's
1952HOME directory called @file{.info}@footnote{Due to the limitations of
1953DOS filesystems, the MS-DOS version of Info looks for a file
1954@file{_info} instead.  If the @env{HOME} variable is not defined, Info
1955additionally looks in the current directory.}.  If it is present, and
1956appears to contain Info configuration data, and was created with the
1957current version of the @code{infokey} command, then Info adopts the
1958key bindings and variable settings contained therein.
1959
1960The @file{.info} file contains compact, non-textual data for reasons of
1961efficiency and because its design was lifted wholesale from the GNU Less
1962program, which also does it that way.  It must be created by compiling a
1963textual source file using the @code{infokey} command.
1964
1965@menu
1966* Invoking infokey::
1967* infokey source format::
1968@end menu
1969
1970
1971@node Invoking infokey
1972@section Invoking @command{infokey}
1973
1974@cindex invoking infokey
1975@cindex infokey, invoking
1976@cindex _infokey file (MS-DOS)
1977
1978@command{infokey} compiles a source file
1979(@file{$HOME/.infokey}@footnote{This file is named @file{_infokey} in
1980the MS-DOS version, and is looked for in the current directory if
1981@env{HOME} is undefined.} by default) containing Info customizations
1982into a binary format (@file{$HOME/.info} by default).  GNU Info reads
1983the binary file at startup to override the default key bindings and
1984variable definitions.  Synopsis:
1985
1986@example
1987infokey [@var{option}@dots{}] [@var{input-file}]
1988@end example
1989
1990Besides the standard @option{--help} and @option{--version}, the only
1991option is @option{--output @var{file}}.  This tells @command{infokey} to
1992write the binary data to @var{file} instead of @file{$HOME/.info}.
1993
1994
1995@node infokey source format
1996@section @command{infokey} source format
1997
1998@cindex infokey source format
1999@cindex .infokey source format
2000@cindex format of .infokey source
2001
2002The format of the source file read by @command{infokey} is most easily
2003illustrated by example.  For instance, here is a sample @file{.infokey}
2004source file suitable for aficionados of @command{vi} or @command{less}:
2005
2006@example
2007#info
2008j       next-line
2009k       prev-line
2010l       forward-char
2011h       backward-char
2012\kd     next-line
2013\ku     prev-line
2014\kr     forward-char
2015\kl     backward-char
2016\       scroll-forward
2017\kD     scroll-forward-page-only
2018b       scroll-backward
2019\kU     scroll-backward-page-only
2020g       beginning-of-node
2021\kh     beginning-of-node
2022G       end-of-node
2023\ke     end-of-node
2024\t      select-reference-this-line
2025-       history-node
2026n       next-node
2027p       prev-node
2028u       up-node
2029t       top-node
2030d       dir-node
2031#var
2032scroll-step=1
2033@end example
2034
2035The source file consists of one or more @dfn{sections}.
2036Each section starts with a line that identifies the type of section.
2037Possible sections are:
2038
2039@table @code
2040@item #info
2041Key bindings for Info windows.
2042The start of this section is indicated by a line containing just
2043@code{#info} by itself.  If this is the first section in the source
2044file, the @code{#info} line can be omitted.  The rest of this section
2045consists of lines of the form:
2046
2047@example
2048@var{string} whitespace @var{action} [ whitespace [ # comment ] ] newline
2049@end example
2050
2051Whitespace is any sequence of one or more spaces and/or tabs.  Comment
2052is any sequence of any characters, excluding newline.  @var{string} is
2053the key sequence which invokes the action.  @var{action} is the name of
2054an Info command.  The characters in @var{string} are interpreted
2055literally or prefixed by a caret (@code{^}) to indicate a control
2056character.  A backslash followed by certain characters specifies input
2057keystrokes as follows:
2058
2059@table @code
2060@item \b
2061Backspace
2062@item \e
2063Escape (ESC)
2064@item \n
2065Newline
2066@item \r
2067Return
2068@item \t
2069Tab
2070@item \ku
2071Up arrow
2072@item \kd
2073Down arrow
2074@item \kl
2075Left arrow
2076@item \kr
2077Right arrow
2078@item \kU
2079Page Up
2080@item \kD
2081Page Down
2082@item \kh
2083HOME
2084@item \ke
2085END
2086@item \kx
2087Delete (DEL)
2088@item \m@var{x}
2089Meta-@var{x} where @var{x} is any character as described above.
2090@end table
2091
2092Backslash followed by any other character indicates that character is to
2093be taken literally.  Characters which must be preceded by a backslash
2094include caret, space, tab, and backslash itself.
2095
2096@item #echo-area
2097Key bindings for the echo area.
2098The start of this section is indicated by a line containing just
2099@code{#echo-area} by itself.  The rest of this section has a syntax
2100identical to that for the key definitions for the Info area, described
2101above.
2102
2103@item #var
2104Variable initializations.
2105The start of this section is indicated by a line containing just
2106@code{#var} by itself.  Following this line is a list of variable
2107assignments, one per line.  Each line consists of a variable name
2108(@xref{Variables},) followed by @code{=} followed by a value.
2109There may be no white space between the variable name and the @code{=},
2110and all characters following the @code{=}, including white space,
2111are included in the value.
2112@end table
2113
2114Blank lines and lines starting with @code{#} are ignored, except for
2115the special section header lines.
2116
2117Key bindings defined in the @file{.info} file take precedence over GNU
2118Info's default key bindings, whether or not @samp{--vi-keys} is used.  A
2119default key binding may be disabled by overriding it in the @file{.info}
2120file with the action @code{invalid}.  In addition, @emph{all} default
2121key bindings can be disabled by adding this line @emph{anywhere} in the
2122relevant section:
2123
2124@example
2125#stop
2126@end example
2127
2128This will cause GNU Info to ignore all the default key commands for that
2129section.
2130
2131Beware: @code{#stop} can be dangerous.  Since it disables all default
2132key bindings, you must supply enough new key bindings to enable all
2133necessary actions.  Failure to bind any key to the @code{quit} command,
2134for example, can lead to frustration.
2135
2136The order in which key bindings are defined in the @file{.info} file is
2137not important, except that the command summary produced by the
2138@code{get-help-window} command only displays the @emph{first} key that
2139is bound to each command.
2140
2141
2142@c the following is incomplete
2143@ignore
2144@c node Info for Sys Admins
2145@c chapter Info for System Administrators
2146
2147This text describes some common ways of setting up an Info hierarchy
2148from scratch, and details the various options that are available when
2149installing Info.  This text is designed for the person who is installing
2150GNU Info on the system; although users may find the information present
2151in this section interesting, none of it is vital to understanding how to
2152use GNU Info.
2153
2154@menu
2155* Setting the INFOPATH::        Where are my Info files kept?
2156* Editing the DIR node::        What goes in `DIR', and why?
2157* Storing Info files::          Alternate formats allow flexibility in setups.
2158* Using `localdir'::            Building DIR on the fly.
2159* Example setups::              Some common ways to organize Info files.
2160@end menu
2161
2162@c node Setting the INFOPATH
2163@c section Setting the INFOPATH
2164
2165Where are my Info files kept?
2166
2167@c node Editing the DIR node
2168@c section Editing the DIR node
2169
2170What goes in `DIR', and why?
2171
2172@c node Storing Info files
2173@c section Storing Info files
2174
2175Alternate formats allow flexibility in setups.
2176
2177@c node Using `localdir'
2178@c section Using `localdir'
2179
2180Building DIR on the fly.
2181
2182@c node Example setups
2183@c section Example setups
2184
2185Some common ways to organize Info files.
2186@end ignore
2187
2188
2189@node Copying This Manual
2190@appendix Copying This Manual
2191
2192@menu
2193* GNU Free Documentation License::  License for copying this manual.
2194@end menu
2195
2196@include fdl.texi
2197
2198
2199@node Index
2200@appendix Index
2201
2202@printindex cp
2203
2204@bye
2205