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