1146515Sru\input texinfo.tex    @c -*-texinfo-*-
2146515Sru@c We must \input texinfo.tex instead of texinfo, otherwise make
3146515Sru@c distcheck in the Texinfo distribution fails, because the texinfo Info
4146515Sru@c file is made first, and texi2dvi must include . first in the path.
556160Sru@comment %**start of header
642660Smarkm@setfilename info.info
756160Sru@settitle Info
893139Sru@syncodeindex fn cp
993139Sru@syncodeindex vr cp
1093139Sru@syncodeindex ky cp
1156160Sru@comment %**end of header
1242660Smarkm
13114472Sru@copying
1456160SruThis file describes how to use Info, the on-line, menu-driven GNU
1556160Srudocumentation system.
1642660Smarkm
17146515SruCopyright (C) 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
1893139SruFree Software Foundation, Inc.
1942660Smarkm
20114472Sru@quotation
2193139SruPermission is granted to copy, distribute and/or modify this document
2293139Sruunder the terms of the GNU Free Documentation License, Version 1.1 or
2393139Sruany later version published by the Free Software Foundation; with no
2493139SruInvariant Sections, with the Front-Cover texts being ``A GNU
2593139SruManual'', and with the Back-Cover Texts as in (a) below.  A copy of the
2693139Srulicense is included in the section entitled ``GNU Free Documentation
2793139SruLicense'' in the Emacs manual.
2842660Smarkm
2993139Sru(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
3093139Sruthis GNU Manual, like GNU software.  Copies published by the Free
3193139SruSoftware Foundation raise funds for GNU development.''
3242660Smarkm
3393139SruThis document is part of a collection distributed under the GNU Free
3493139SruDocumentation License.  If you want to distribute this document
3593139Sruseparately from the collection, you can do so by adding a copy of the
3693139Srulicense to the document, as described in section 6 of the license.
37114472Sru@end quotation
38114472Sru@end copying
3942660Smarkm
40114472Sru@dircategory Texinfo documentation system
41114472Sru@direntry
42114472Sru* Info: (info).         How to use the documentation browsing system.
43114472Sru@end direntry
44114472Sru
4542660Smarkm@titlepage
4642660Smarkm@title Info
4793139Sru@subtitle The online, hyper-text GNU documentation system
4842660Smarkm@author Brian Fox
4993139Sru@author and the GNU Texinfo community
5042660Smarkm@page
5142660Smarkm@vskip 0pt plus 1filll
52114472Sru@insertcopying
5342660Smarkm@end titlepage
5442660Smarkm
55146515Sru@contents
56146515Sru
5756160Sru@ifnottex
5856160Sru@node Top
5942660Smarkm@top Info: An Introduction
6042660Smarkm
61114472SruThe GNU Project distributes most of its on-line manuals in the
62114472Sru@dfn{Info format}, which you read using an @dfn{Info reader}.  You are
63114472Sruprobably using an Info reader to read this now.
6442660Smarkm
65146515SruThere are two primary Info readers: @code{info}, a stand-alone program
66146515Srudesigned just to read Info files, and the @code{info} package in GNU
67146515SruEmacs, a general-purpose editor.  At present, only the Emacs reader
68146515Srusupports using a mouse.
69146515Sru
7093139Sru@ifinfo
71114472SruIf you are new to the Info reader and want to learn how to use it,
72114472Srutype the command @kbd{h} now.  It brings you to a programmed
73114472Sruinstruction sequence.
7493139Sru
75114472SruTo read about expert-level Info commands, type @kbd{n} twice.  This
76114472Srubrings you to @cite{Info for Experts}, skipping over the `Getting
77114472SruStarted' chapter.
7893139Sru@end ifinfo
7956160Sru@end ifnottex
8042660Smarkm
8142660Smarkm@menu
8242660Smarkm* Getting Started::             Getting started using an Info reader.
83114472Sru* Expert Info::                 Info commands for experts.
8456160Sru* Creating an Info File::       How to make your own Info file.
8593139Sru* Index::                       An index of topics, commands, and variables.
8642660Smarkm@end menu
8742660Smarkm
88114472Sru@node Getting Started, Expert Info, Top, Top
8942660Smarkm@comment  node-name,  next,  previous,  up
9042660Smarkm@chapter Getting Started
9142660Smarkm
92146515SruThis first part of this Info manual describes how to get around inside
9342660Smarkmof Info.  The second part of the manual describes various advanced
9442660SmarkmInfo commands, and how to write an Info as distinct from a Texinfo
9593139Srufile.  The third part briefly explains how to generate Info files from
9642660SmarkmTexinfo files.
9742660Smarkm
9893139Sru@ifnotinfo
9993139SruThis manual is primarily designed for browsing with an Info reader
10093139Sruprogram on a computer, so that you can try Info commands while reading
10193139Sruabout them.  Reading it on paper or with an HTML browser is less
10242660Smarkmeffective, since you must take it on faith that the commands described
10393139Srureally do what the manual says.  By all means go through this manual
10493139Srunow that you have it; but please try going through the on-line version
10593139Sruas well.
10642660Smarkm
10793139Sru@cindex Info reader, how to invoke
10893139Sru@cindex entering Info
10942660SmarkmThere are two ways of looking at the online version of this manual:
11042660Smarkm
11142660Smarkm@enumerate
11242660Smarkm@item
11342660SmarkmType @code{info} at your shell's command line.  This approach uses a
11493139Srustand-alone program designed just to read Info files.
11542660Smarkm
11642660Smarkm@item
11793139SruType @code{emacs} at the command line; then type @kbd{C-h i}
11893139Sru(@kbd{Control-h}, followed by @kbd{i}).  This approach uses the Info
119146515Srumode of the Emacs editor.
12042660Smarkm@end enumerate
12142660Smarkm
12242660SmarkmIn either case, then type @kbd{mInfo} (just the letters), followed by
12342660Smarkm@key{RET}---the ``Return'' or ``Enter'' key.  At this point, you should
12442660Smarkmbe ready to follow the instructions in this manual as you read them on
12542660Smarkmthe screen.
12642660Smarkm@c FIXME! (pesch@cygnus.com, 14 dec 1992)
12742660Smarkm@c Is it worth worrying about what-if the beginner goes to somebody
12842660Smarkm@c else's Emacs session, which already has an Info running in the middle
12942660Smarkm@c of something---in which case these simple instructions won't work?
13093139Sru@end ifnotinfo
13142660Smarkm
13242660Smarkm@menu
133146515Sru* Help-Small-Screen::   Starting Info on a Small Screen.
134146515Sru* Help::                How to use Info.
135146515Sru* Help-P::              Returning to the Previous node.
13693139Sru* Help-^L::             The Space, DEL, B and ^L commands.
137146515Sru* Help-Inv::            Invisible text in Emacs Info.
138146515Sru* Help-M::              Menus.
139146515Sru* Help-Xref::           Following cross-references.
140146515Sru* Help-Int::            Some intermediate Info commands.
141146515Sru* Help-Q::              Quitting Info.
14242660Smarkm@end menu
14342660Smarkm
14493139Sru@node Help-Small-Screen
14542660Smarkm@section Starting Info on a Small Screen
14642660Smarkm
14793139Sru@ifnotinfo
14842660Smarkm(In Info, you only see this section if your terminal has a small
14942660Smarkmnumber of lines; most readers pass by it without seeing it.)
15093139Sru@end ifnotinfo
15142660Smarkm
15293139Sru@cindex small screen, moving around
15393139SruSince your terminal has a relatively small number of lines on its
15442660Smarkmscreen, it is necessary to give you special advice at the beginning.
15542660Smarkm
15693139SruIf you see the text @samp{--All----} near the bottom right corner
15742660Smarkmof the screen, it means the entire text you are looking at fits on the
15842660Smarkmscreen.  If you see @samp{--Top----} instead, it means that there is
15942660Smarkmmore text below that does not fit.  To move forward through the text
16093139Sruand see another screen full, press @key{SPC}, the Space bar.  To move
16193139Sruback up, press the key labeled @samp{Backspace} or @samp{DEL} (on some
16293139Srukeyboards, this key might be labeled @samp{Delete}).
16342660Smarkm
16442660Smarkm@ifinfo
16593139SruHere are 40 lines of junk, so you can try @key{SPC} and @key{DEL} and
16642660Smarkmsee what they do.  At the end are instructions of what you should do
16742660Smarkmnext.
16842660Smarkm
16993139Sru@format
17093139SruThis is line 20
17193139SruThis is line 21
17293139SruThis is line 22
17393139SruThis is line 23
17493139SruThis is line 24
17593139SruThis is line 25
17693139SruThis is line 26
17793139SruThis is line 27
17893139SruThis is line 28
17993139SruThis is line 29
18093139SruThis is line 30
18193139SruThis is line 31
18293139SruThis is line 32
18393139SruThis is line 33
18493139SruThis is line 34
18593139SruThis is line 35
18693139SruThis is line 36
18793139SruThis is line 37
18893139SruThis is line 38
18993139SruThis is line 39
19093139SruThis is line 40
19193139SruThis is line 41
19293139SruThis is line 42
19393139SruThis is line 43
19493139SruThis is line 44
19593139SruThis is line 45
19693139SruThis is line 46
19793139SruThis is line 47
19893139SruThis is line 48
19993139SruThis is line 49
20093139SruThis is line 50
20193139SruThis is line 51
20293139SruThis is line 52
20393139SruThis is line 53
20493139SruThis is line 54
20593139SruThis is line 55
20693139SruThis is line 56
20793139SruThis is line 57
20893139SruThis is line 58
20993139SruThis is line 59
21093139Sru@end format
21142660Smarkm
21242660SmarkmIf you have managed to get here, go back to the beginning with
21393139Sru@kbd{DEL} (or @key{BACKSPACE}), and come back here again, then you
21493139Sruunderstand the about the @samp{Space} and @samp{Backspace} keys.  So
215146515Srunow type an @kbd{n}---just one character; don't type the quotes and
216146515Srudon't type the Return key afterward---to get to the normal start of
21793139Sruthe course.
21842660Smarkm@end ifinfo
21942660Smarkm
22042660Smarkm@node Help, Help-P, Help-Small-Screen, Getting Started
22142660Smarkm@comment  node-name,  next,  previous,  up
22242660Smarkm@section How to use Info
22342660Smarkm
22442660SmarkmYou are talking to the program Info, for reading documentation.
22542660Smarkm
226146515Sru  There are two ways to use Info: from within Emacs or as a
227146515Srustand-alone reader that you can invoke from a shell using the command
228146515Sru@command{info}.
229146515Sru
23093139Sru@cindex node, in Info documents
23142660Smarkm  Right now you are looking at one @dfn{Node} of Information.
23242660SmarkmA node contains text describing a specific topic at a specific
23393139Srulevel of detail.  This node's topic is ``how to use Info''.  The mode
23493139Sruline says that this is node @samp{Help} in the file @file{info}.
23542660Smarkm
23693139Sru@cindex header of Info node
237114472Sru  The top line of a node is its @dfn{header}.  This node's header
238114472Sru(look at it now) says that the @samp{Next} node after this one is the
239114472Srunode called @samp{Help-P}.  An advanced Info command lets you go to
240114472Sruany node whose name you know.  In the stand-alone Info reader program,
241114472Sruthe header line shows the names of this node and the info file as
242114472Sruwell.  In Emacs, the header line is duplicated in a special typeface,
243114472Sruand the duplicate remains at the top of the window all the time even
244114472Sruif you scroll through the node.
24542660Smarkm
246146515Sru  Besides a @samp{Next}, a node can have a @samp{Previous} link, or an
247146515Sru@samp{Up} link, or both.  As you can see, this node has all of these
24893139Srulinks.
24942660Smarkm
25093139Sru@kindex n @r{(Info mode)}
25142660Smarkm  Now it is time to move on to the @samp{Next} node, named @samp{Help-P}.
25242660Smarkm
25393139Sru@format
25493139Sru>> Type @kbd{n} to move there.  Type just one character;
25542660Smarkm   do not type the quotes and do not type a @key{RET} afterward.
25693139Sru@end format
25742660Smarkm
25893139Sru@noindent
25942660Smarkm@samp{>>} in the margin means it is really time to try a command.
26042660Smarkm
26193139Sru@format
262114472Sru>> If you are in Emacs and have a mouse, and if you already practiced
263114472Sru   typing @kbd{n} to get to the next node, click now with the middle
264114472Sru   mouse button on the @samp{Next} link to do the same ``the mouse way''.
26593139Sru@end format
26693139Sru
26742660Smarkm@node Help-P, Help-^L, Help, Getting Started
26842660Smarkm@comment  node-name,  next,  previous,  up
26942660Smarkm@section Returning to the Previous node
27042660Smarkm
27193139Sru@kindex p @r{(Info mode)}
27242660SmarkmThis node is called @samp{Help-P}.  The @samp{Previous} node, as you see,
27342660Smarkmis @samp{Help}, which is the one you just came from using the @kbd{n}
27442660Smarkmcommand.  Another @kbd{n} command now would take you to the next
275114472Srunode, @samp{Help-^L}.
27642660Smarkm
27793139Sru@format
278146515Sru>> But do not type @kbd{n} yet.  First, try the @kbd{p} command, or
279146515Sru   (in Emacs) click the middle mouse button on the @samp{Prev} link.
280146515Sru   That takes you to the @samp{Previous} node.  Then use @kbd{n} to
281146515Sru   return here.
28293139Sru@end format
28342660Smarkm
28493139Sru  If you read this in Emacs, you will see an @samp{Info} item in the
285114472Srumenu bar, close to its right edge.  Clicking the mouse on the
28693139Sru@samp{Info} menu-bar item opens a menu of commands which include
28793139Sru@samp{Next} and @samp{Prev} (and also some others which you didn't yet
28893139Srulearn about).
28993139Sru
290114472Sru  This all probably seems insultingly simple so far, but @emph{please
291114472Srudon't} start skimming.  Things will get complicated soon enough!
292114472SruAlso, please do not try a new command until you are told it is time
293114472Sruto.  You could make Info skip past an important warning that was
294114472Srucoming up.
29542660Smarkm
29693139Sru@format
297146515Sru>> Now do an @kbd{n}, or (in Emacs) click the middle mouse button on
298146515Sru   the @samp{Next} link, to get to the node @samp{Help-^L} and learn more.
29993139Sru@end format
30042660Smarkm
301146515Sru@node Help-^L, Help-Inv, Help-P, Getting Started
30242660Smarkm@comment  node-name,  next,  previous,  up
303146515Sru@section The Space, DEL, B and ^L commands
30442660Smarkm
305114472Sru  This node's mode line tells you that you are now at node
306114472Sru@samp{Help-^L}, and the header line tells you that @kbd{p} would get
307114472Sruyou back to @samp{Help-P}.  The node's title is highlighted and may be
308114472Sruunderlined as well; it says what the node is about.
30942660Smarkm
31042660Smarkm  This is a big node and it does not all fit on your display screen.
31142660SmarkmYou can tell that there is more that is not visible because you
31242660Smarkmcan see the string @samp{--Top-----} rather than @samp{--All----} near
31342660Smarkmthe bottom right corner of the screen.
31442660Smarkm
31593139Sru@kindex SPC @r{(Info mode)}
31693139Sru@kindex DEL @r{(Info mode)}
31793139Sru@kindex BACKSPACE @r{(Info mode)}
31893139Sru@findex Info-scroll-up
31993139Sru@findex Info-scroll-down
32093139Sru  The @key{SPC}, @key{BACKSPACE} (or @key{DEL})@footnote{The key which
32193139Sruwe call ``Backspace or DEL'' in this manual is labeled differently on
32293139Srudifferent keyboards.  Look for a key which is a little ways above the
32393139Sru@key{ENTER} or @key{RET} key and which you normally use outside Emacs
32493139Sruto erase the character before the cursor, i.e.@: the character you
32593139Srutyped last.  It might be labeled @samp{Backspace} or @samp{<-} or
32693139Sru@samp{DEL}, or sometimes @samp{Delete}.} and @kbd{b} commands exist to
32793139Sruallow you to ``move around'' in a node that does not all fit on the
32893139Sruscreen at once.  @key{SPC} moves forward, to show what was below the
32993139Srubottom of the screen.  @key{DEL} or @key{BACKSPACE} moves backward, to
33093139Srushow what was above the top of the screen (there is not anything above
331114472Sruthe top until you have typed some spaces).
33242660Smarkm
33393139Sru@format
33493139Sru>> Now try typing a @key{SPC} (afterward, type a @key{BACKSPACE} to
33593139Sru   return here).
33693139Sru@end format
33742660Smarkm
33893139Sru  When you type the @key{SPC}, the two lines that were at the bottom of
33993139Sruthe screen appear at the top, followed by more lines.  @key{DEL} or
34093139Sru@key{BACKSPACE} takes the two lines from the top and moves them to the
34193139Srubottom, @emph{usually}, but if there are not a full screen's worth of
34293139Srulines above them they may not make it all the way to the bottom.
34342660Smarkm
34493139Sru  If you are reading this in Emacs, note that the header line is
34593139Srualways visible, never scrolling off the display.  That way, you can
34693139Srualways see the @samp{Next}, @samp{Prev}, and @samp{Up} links, and you
347114472Srucan conveniently go to one of these links at any time by
348114472Sruclicking the middle mouse button on the link.
34942660Smarkm
35093139Sru@cindex reading Info documents top to bottom
35193139Sru@cindex Info documents as tutorials
35293139Sru  @key{SPC} and @key{DEL} not only move forward and backward through
353114472Sruthe current node.  They also move between nodes.  @key{SPC} at the end
354114472Sruof a node moves to the next node; @key{DEL} (or @key{BACKSPACE}) at
355114472Sruthe beginning of a node moves to the previous node.  In effect, these
356114472Srucommands scroll through all the nodes in an Info file as a single
357114472Srulogical sequence.  You can read an entire manual top to bottom by just
358114472Srutyping @key{SPC}, and move backward through the entire manual from
359114472Srubottom to top by typing @key{DEL} (or @key{BACKSPACE}).
36042660Smarkm
361114472Sru  In this sequence, a node's subnodes appear following their parent.
362114472SruIf a node has a menu, @key{SPC} takes you into the subnodes listed in
363114472Sruthe menu, one by one.  Once you reach the end of a node, and have seen
364114472Sruall of its subnodes, @key{SPC} takes you to the next node or to the
365114472Sruparent's next node.
366114472Sru
36793139Sru@kindex PAGEUP @r{(Info mode)}
36893139Sru@kindex PAGEDOWN @r{(Info mode)}
36993139Sru  Many keyboards nowadays have two scroll keys labeled @samp{PageUp}
37093139Sruand @samp{PageDown} (or maybe @samp{Prior} and @samp{Next}).  If your
37193139Srukeyboard has these keys, you can use them to move forward and backward
372114472Sruthrough the text of one node, like @key{SPC} and @key{BACKSPACE} (or
373114472Sru@key{DEL}).  However, @key{PAGEUP} and @key{PAGEDOWN} keys never
374114472Sruscroll beyond the beginning or the end of the current node.
37593139Sru
37693139Sru@kindex C-l @r{(Info mode)}
37793139Sru  If your screen is ever garbaged, you can tell Info to display it
378146515Sruagain by typing @kbd{C-l} (@kbd{Control-L}---that is, hold down
37993139Sru@key{CTRL} and type @kbd{L} or @kbd{l}).
38093139Sru
38193139Sru@format
38242660Smarkm>> Type @kbd{C-l} now.
38393139Sru@end format
38442660Smarkm
38593139Sru@kindex b @r{(Info mode)}
38642660Smarkm  To move back to the beginning of the node you are on, you can type
387114472Sruthe @key{BACKSPACE} key (or @key{DEL}) many times.  You can also type
388114472Sru@kbd{b} just once.  @kbd{b} stands for ``beginning.''
38993139Sru
39093139Sru@format
39142660Smarkm>> Try that now.  (We have put in enough verbiage to push this past
39293139Sru   the first screenful, but screens are so big nowadays that perhaps it
39393139Sru   isn't enough.  You may need to shrink your Emacs or Info window.)
394114472Sru   Then come back, by typing @key{SPC} one or more times.
39593139Sru@end format
39642660Smarkm
397114472Sru  If your screen is very tall, all of this node might fit at once.  In
398114472Sruthat case, @kbd{b} won't do anything.  But you could observe the
399114472Srueffect of the @kbd{b} key if you use a smaller window.
40042660Smarkm
40193139Sru@kindex ? @r{(Info mode)}
40293139Sru@findex Info-summary
40342660Smarkm  You have just learned a considerable number of commands.  If you
40442660Smarkmwant to use one but have trouble remembering which, you should type
40593139Srua @kbd{?} (in Emacs it runs the @code{Info-summary} command) which
40693139Srudisplays a brief list of commands.  When you are finished looking at
40793139Sruthe list, make it go away by typing a @key{SPC} repeatedly.
40842660Smarkm
40993139Sru@format
41042660Smarkm>> Type a @key{?} now.  Press @key{SPC} to see consecutive screenfuls of
411114472Sru   the list until finished.  Then type @key{SPC} several times.  If
412114472Sru   you are using Emacs, the help will then go away automatically.
41393139Sru@end format
41442660Smarkm
41593139Sru  (If you are using the stand-alone Info reader, type @kbd{C-x 0} to
41693139Srureturn here, that is---press and hold @key{CTRL}, type an @kbd{x},
417146515Sruthen release @key{CTRL} and @kbd{x}, and press @kbd{0}; that's a zero,
418146515Srunot the letter ``o''.)
41993139Sru
42042660Smarkm  From now on, you will encounter large nodes without warning, and
42193139Sruwill be expected to know how to use @key{SPC} and @key{BACKSPACE} to
42293139Srumove around in them without being told.  Since not all terminals have
42342660Smarkmthe same size screen, it would be impossible to warn you anyway.
42442660Smarkm
42593139Sru@format
426114472Sru>> Now type @kbd{n}, or click the middle mouse button on the @samp{Next} link,
427146515Sru   to visit the next node.
42893139Sru@end format
42942660Smarkm
430146515Sru@node Help-Inv, Help-M, Help-^L, Getting Started
43142660Smarkm@comment  node-name,  next,  previous,  up
432146515Sru@section Invisible text in Emacs Info
433146515Sru
434146515Sru  Before discussing menus, we need to make some remarks that are only
435146515Srurelevant to users reading Info using Emacs.  Users of the stand-alone
436146515Sruversion can skip this node by typing @kbd{]} now.
437146515Sru
438146515Sru@cindex invisible text in Emacs
439146515Sru  In Emacs, certain text that appears in the stand-alone version is
440146515Srunormally hidden, technically because it has the @samp{invisibility}
441146515Sruproperty.  Invisible text is really a part of the text.  It becomes
442146515Sruvisible (by default) after killing and yanking, it appears in printed
443146515Sruoutput, it gets saved to file just like any other text, and so on.
444146515SruThus it is useful to know it is there.
445146515Sru
446146515Sru@findex visible-mode
447146515SruYou can make invisible text visible by using the command @kbd{M-x
448146515Sruvisible-mode}.  Visible mode is a minor mode, so using the command a
449146515Srusecond time will make the text invisible again.  Watch the effects of
450146515Sruthe command on the ``menu'' below and the top line of this node.
451146515Sru
452146515SruIf you prefer to @emph{always} see the invisible text, you can set
453146515Sru@code{Info-hide-note-references} to @code{nil}.  Enabling Visible mode
454146515Srupermanently is not a real alternative, because Emacs Info also uses
455146515Sru(although less extensively) another text property that can change the
456146515Srutext being displayed, the @samp{display} property.  Only the
457146515Sruinvisibility property is affected by Visible mode.  When, in this
458146515Srututorial, we refer to the @samp{Emacs} behavior, we mean the
459146515Sru@emph{default} Emacs behavior.
460146515Sru
461146515SruNow type @kbd{]}, to learn about the @kbd{]} and @kbd{[} commands.
462146515Sru
463146515Sru@menu
464146515Sru* ]:         Help-].               Node telling about ].
465146515Sru* stuff:     Help-].               Same node.
466146515Sru* Help-]::                         Yet again, same node.
467146515Sru@end menu
468146515Sru
469146515Sru@node Help-], , , Help-Inv
470146515Sru@subsection The @kbd{]} and @kbd{[} commands
471146515Sru
472146515SruIf you type @kbd{n} now, you get an error message saying that this
473146515Srunode has no next node.  Similarly, if you type @kbd{p}, the error
474146515Srumessage tells you that there is no previous node.  (The exact message
475146515Srudepends on the Info reader you use.)  This is because @kbd{n} and
476146515Sru@kbd{p} carry you to the next and previous node @emph{at the same
477146515Srulevel}.  The present node is contained in a menu (see next) of the
478146515Srunode you came from, and hence is considered to be at a lower level.
479146515SruIt is the only node in the previous node's menu (even though it was
480146515Srulisted three times). Hence it has no next or previous node that
481146515Sru@kbd{n} or @kbd{p} could move to.
482146515Sru
483146515SruIf you systematically move through a manual by typing @kbd{n}, you run
484146515Sruthe risk of skipping many nodes.  You do not run this risk if you
485146515Srusystematically use @kbd{@key{SPC}}, because, when you scroll to the
486146515Srubottom of a node and type another @kbd{@key{SPC}}, then this carries
487146515Sruyou to the following node in the manual @emph{regardless of level}.
488146515SruIf you immediately want to go to that node, without having to scroll
489146515Sruto the bottom of the screen first, you can type @kbd{]}.
490146515Sru
491146515SruSimilarly, @kbd{@key{BACKSPACE}} carries you to the preceding node
492146515Sruregardless of level, after you scrolled to the beginning of the
493146515Srupresent node.  If you want to go to the preceding node immediately,
494146515Sruyou can type @kbd{[}.
495146515Sru
496146515SruFor instance, typing this sequence will come back here in three steps:
497146515Sru@kbd{[ n [}.  To do the same backward, type @kbd{] p ]}.
498146515Sru
499146515SruNow type @kbd{]} to go to the next node and learn about menus.
500146515Sru
501146515Sru@node Help-M, Help-Xref, Help-Inv, Getting Started
502146515Sru@comment  node-name,  next,  previous,  up
50393139Sru@section Menus and the @kbd{m} command
50442660Smarkm
50593139Sru@cindex menus in an Info document
50693139Sru@cindex Info menus
507146515Sru  With only the @kbd{n} (next), @kbd{p} (previous), @kbd{@key{SPC}},
508146515Sru@kbd{@key{BACKSPACE}}, @kbd{]} and @kbd{[} commands for moving between
509146515Srunodes, nodes are restricted to a linear sequence.  Menus allow a
510146515Srubranching structure.  A menu is a list of other nodes you can move to.
511146515SruIt is actually just part of the text of the node formatted specially
512146515Sruso that Info can interpret it.  The beginning of a menu is always
513146515Sruidentified by a line which starts with @w{@samp{* Menu:}}.  A node
514146515Srucontains a menu if and only if it has a line in it which starts that
515146515Sruway.  The only menu you can use at any moment is the one in the node
516146515Sruyou are in.  To use a menu in any other node, you must move to that
517146515Srunode first.
51842660Smarkm
51942660Smarkm  After the start of the menu, each line that starts with a @samp{*}
520146515Sruidentifies one subtopic.  The line usually contains a brief name for
521146515Sruthe subtopic (followed by a @samp{:}, normally hidden in Emacs), the
522146515Sruname of the node that talks about that subtopic (again, normally
523146515Sruhidden in Emacs), and optionally some further description of the
52442660Smarkmsubtopic.  Lines in the menu that do not start with a @samp{*} have no
52542660Smarkmspecial meaning---they are only for the human reader's benefit and do
52642660Smarkmnot define additional subtopics.  Here is an example:
52742660Smarkm
52842660Smarkm@example
529114472Sru* Foo:  Node about FOO.      This tells about FOO.
53042660Smarkm@end example
53142660Smarkm
53293139SruThe subtopic name is Foo, and the node describing it is @samp{Node
53393139Sruabout FOO}.  The rest of the line is just for the reader's
53493139SruInformation.  [[ But this line is not a real menu item, simply because
535146515Sruthere is no line above it which starts with @w{@samp{* Menu:}}.  Also,
536146515Sruin a real menu item, the @samp{*} would appear at the very start of
537146515Sruthe line.  This is why the ``normally hidden'' text in Emacs, namely
538146515Sru@samp{: Node about FOO.}, is actually visible in this example, even
539146515Sruwhen Visible mode is off.]]
54042660Smarkm
54142660Smarkm  When you use a menu to go to another node (in a way that will be
54242660Smarkmdescribed soon), what you specify is the subtopic name, the first
54342660Smarkmthing in the menu line.  Info uses it to find the menu line, extracts
54442660Smarkmthe node name from it, and goes to that node.  The reason that there
54542660Smarkmis both a subtopic name and a node name is that the node name must be
54642660Smarkmmeaningful to the computer and may therefore have to be ugly looking.
54742660SmarkmThe subtopic name can be chosen just to be convenient for the user to
54842660Smarkmspecify.  Often the node name is convenient for the user to specify
54942660Smarkmand so both it and the subtopic name are the same.  There is an
55042660Smarkmabbreviation for this:
55142660Smarkm
55242660Smarkm@example
553114472Sru* Foo::   This tells about FOO.
55442660Smarkm@end example
55542660Smarkm
55642660Smarkm@noindent
55742660SmarkmThis means that the subtopic name and node name are the same; they are
558146515Sruboth @samp{Foo}.  (The @samp{::} is normally hidden in Emacs.)
55942660Smarkm
56093139Sru@format
56193139Sru>> Now use @key{SPC} to find the menu in this node, then come back to
56293139Sru   the front with a @kbd{b} and some @key{SPC}s.  As you see, a menu is
56342660Smarkm   actually visible in its node.  If you cannot find a menu in a node
56442660Smarkm   by looking at it, then the node does not have a menu and the
56542660Smarkm   @kbd{m} command is not available.
56693139Sru@end format
56742660Smarkm
568114472SruIf you keep typing @key{SPC} once the menu appears on the screen, it
569114472Sruwill move to another node (the first one in the menu).  If that
570114472Sruhappens, type @key{BACKSPACE} to come back.
571114472Sru
57293139Sru@kindex m @r{(Info mode)}
573114472Sru  The command to go to one of the subnodes is @kbd{m}.  This is very
574114472Srudifferent from the commands you have used: it is a command that
575114472Sruprompts you for more input.
57642660Smarkm
577114472Sru  The Info commands you know do not need additional input; when you
578114472Srutype one of them, Info processes it instantly and then is ready for
579114472Sruanother command.  The @kbd{m} command is different: it needs to know
580114472Sruthe @dfn{name of the subtopic}.  Once you have typed @kbd{m}, Info
581114472Srutries to read the subtopic name.
582114472Sru
583146515Sru  Now, in the stand-alone Info, look for the line containing many
584146515Srudashes near the bottom of the screen.  (This is the stand-alone
585146515Sruequivalent for the mode line in Emacs.)  There is one more line
586146515Srubeneath that one, but usually it is blank.  (In Emacs, this is the
587146515Sruecho area.)  When it is blank, Info is ready for a command, such as
588146515Sru@kbd{n} or @kbd{b} or @key{SPC} or @kbd{m}.  If that line contains
589146515Srutext ending in a colon, it means Info is reading more input for the
590146515Srulast command.  You can't type an Info command then, because Info is
591146515Srutrying to read input, not commands.  You must either give the input
592146515Sruand finish the command you started, or type @kbd{Control-g} to cancel
593146515Sruthe command.  When you have done one of those things, the input entry
594146515Sruline becomes blank again.  Then you can type Info commands again.
59542660Smarkm
59693139Sru@findex Info-menu
59742660Smarkm  The command to go to a subnode via a menu is @kbd{m}.  After you type
59842660Smarkmthe @kbd{m}, the line at the bottom of the screen says @samp{Menu item: }.
59942660SmarkmYou must then type the name of the subtopic you want, and end it with
60093139Srua @key{RET}.  In Emacs, @kbd{m} runs the command @code{Info-menu}.
60142660Smarkm
60293139Sru@cindex abbreviating Info subnodes
60342660Smarkm  You can abbreviate the subtopic name.  If the abbreviation is not
60442660Smarkmunique, the first matching subtopic is chosen.  Some menus put
60542660Smarkmthe shortest possible abbreviation for each subtopic name in capital
60642660Smarkmletters, so you can see how much you need to type.  It does not
60742660Smarkmmatter whether you use upper case or lower case when you type the
60842660Smarkmsubtopic.  You should not put any spaces at the end, or inside of the
60942660Smarkmitem name, except for one space where a space appears in the item in
61042660Smarkmthe menu.
61142660Smarkm
61293139Sru@cindex completion of Info node names
613114472Sru  You can also use the @dfn{completion} feature to help enter the
614114472Srusubtopic name.  If you type the @key{TAB} key after entering part of a
615114472Sruname, it will fill in more of the name---as much as Info can deduce
616114472Srufrom the part you have entered.
61742660Smarkm
61842660Smarkm  If you move the cursor to one of the menu subtopic lines, then you do
61993139Srunot need to type the argument: you just type a @key{RET}, and it
620114472Srustands for the subtopic of the line you are on.  You can also click
621114472Sruthe middle mouse button directly on the subtopic line to go there.
62242660Smarkm
62356160SruHere is a menu to give you a chance to practice.  This menu gives you
62456160Sruthree ways of going to one place, Help-FOO:
62542660Smarkm
62656160Sru@menu
62756160Sru* Foo:  Help-FOO.       A node you can visit for fun.
628114472Sru* Bar:  Help-FOO.       We have made two ways to get to the same place.
62956160Sru* Help-FOO::            And yet another!
63056160Sru@end menu
63142660Smarkm
632146515Sru(Turn Visible mode on if you are using Emacs.)
633146515Sru
63493139Sru@format
63542660Smarkm>>  Now type just an @kbd{m} and see what happens:
63693139Sru@end format
63742660Smarkm
63842660Smarkm  Now you are ``inside'' an @kbd{m} command.  Commands cannot be used
63942660Smarkmnow; the next thing you will type must be the name of a subtopic.
64042660Smarkm
64193139Sru  You can change your mind about doing the @kbd{m} by typing
64293139Sru@kbd{Control-g}.
64342660Smarkm
64493139Sru@format
64542660Smarkm>> Try that now;  notice the bottom line clear.
64693139Sru@end format
64742660Smarkm
64893139Sru@format
64942660Smarkm>> Then type another @kbd{m}.
65093139Sru@end format
65142660Smarkm
65293139Sru@format
65393139Sru>> Now type @kbd{BAR}, the item name.  Do not type @key{RET} yet.
65493139Sru@end format
65542660Smarkm
65693139Sru  While you are typing the item name, you can use the @key{DEL} (or
65793139Sru@key{BACKSPACE}) key to cancel one character at a time if you make a
65893139Srumistake.
65942660Smarkm
66093139Sru@format
66193139Sru>> Press @key{DEL} to cancel the @samp{R}.  You could type another @kbd{R}
66293139Sru   to replace it.  But you do not have to, since @samp{BA} is a valid
66393139Sru   abbreviation.
66493139Sru@end format
66542660Smarkm
66693139Sru@format
66742660Smarkm>> Now you are ready to go.  Type a @key{RET}.
66893139Sru@end format
66942660Smarkm
67093139Sru  After visiting @samp{Help-FOO}, you should return here.
67142660Smarkm
67293139Sru  Another way to move to the menu subtopic lines and between them is
67393139Sruto type @key{TAB}.  Each time you type a @key{TAB}, you move to the
67493139Srunext subtopic line.  To move to a previous subtopic line, type
67593139Sru@kbd{M-@key{TAB}}---that is, press and hold the @key{META} key and then
67693139Srupress @key{TAB}.  (On some keyboards, the @key{META} key might be labeled
67793139Sru@samp{Alt}.)
67842660Smarkm
67993139Sru  Once you move cursor to a subtopic line, press @key{RET} to go to
68093139Sruthat subtopic's node.
68142660Smarkm
68293139Sru@cindex mouse support in Info mode
68393139Sru@kindex Mouse-2 @r{(Info mode)}
68493139Sru  If your terminal supports a mouse, you have yet another way of going
68593139Sruto a subtopic.  Move your mouse pointer to the subtopic line,
68693139Srusomewhere between the beginning @samp{*} and the colon @samp{:} which
68793139Sruends the subtopic's brief name.  You will see the subtopic's name
68893139Sruchange its appearance (usually, its background color will change), and
68993139Sruthe shape of the mouse pointer will change if your platform supports
690114472Sruthat.  After a while, if you leave the mouse on that spot, a small
691114472Sruwindow will pop up, saying ``Mouse-2: go to that node'', or the same
692114472Srumessage may appear at the bottom of the screen.
69342660Smarkm
694114472Sru  @kbd{Mouse-2} is the second button of your mouse counting from the
695114472Sruleft---the middle button on a 3-button mouse.  (On a 2-button mouse,
696114472Sruyou may have to press both buttons together to ``press the middle
697114472Srubutton''.)  The message tells you pressing @kbd{Mouse-2} with the
698114472Srucurrent position of the mouse pointer (on subtopic in the menu) will
699114472Srugo to that subtopic.
700114472Sru
70193139Sru@findex Info-mouse-follow-nearest-node
702114472Sru  More generally, @kbd{Mouse-2} in an Info buffer finds the nearest
70393139Srulink to another node and goes there.  For example, near a cross
70493139Srureference it acts like @kbd{f}, in a menu it acts like @kbd{m}, on the
70593139Srunode's header line it acts like @kbd{n}, @kbd{p}, or @kbd{u}, etc.  At
70693139Sruend of the node's text @kbd{Mouse-2} moves to the next node, or up if
70793139Sruthere's no next node.
70893139Sru
70993139Sru@format
71093139Sru>> Type @kbd{n} to see more commands.
71193139Sru@end format
71293139Sru
71342660Smarkm@node Help-FOO,  ,  , Help-M
71442660Smarkm@subsection The @kbd{u} command
71542660Smarkm
71693139Sru  Congratulations!  This is the node @samp{Help-FOO}.  It has an @samp{Up}
71793139Srupointer @samp{Help-M}, the node you just came from via the @kbd{m}
71893139Srucommand.  This is the usual convention---the nodes you reach from a menu
71993139Sruhave @samp{Up} nodes that lead back to the menu.  Menus move Down in the
72093139Srutree, and @samp{Up} moves Up.  @samp{Previous}, on the other hand, is
72193139Sruusually used to ``stay on the same level but go backwards''.
72242660Smarkm
72393139Sru@kindex u @r{(Info mode)}
72493139Sru@findex Info-up
72542660Smarkm  You can go back to the node @samp{Help-M} by typing the command
72693139Sru@kbd{u} for ``Up'' (the Emacs command run by @kbd{u} is
72793139Sru@code{Info-up}).  That puts you at the @emph{front} of the node---to
72893139Sruget back to where you were reading you have to type some @key{SPC}s.
72993139Sru(Some Info readers, such as the one built into Emacs, put you at the
73093139Srusame place where you were reading in @samp{Help-M}.)
73142660Smarkm
732114472Sru  Another way to go Up is to click @kbd{Mouse-2} on the @samp{Up}
733114472Srupointer shown in the header line (provided that you have a mouse).
73493139Sru
73593139Sru@format
73642660Smarkm>> Now type @kbd{u} to move back up to @samp{Help-M}.
73793139Sru@end format
73842660Smarkm
73993139Sru@node Help-Xref, Help-Int, Help-M, Getting Started
74042660Smarkm@comment  node-name,  next,  previous,  up
74193139Sru@section Following Cross-References
74242660Smarkm
74393139Sru@cindex cross references in Info documents
74493139Sru  In Info documentation, you will see many @dfn{cross references}.
74593139SruCross references look like this: @xref{Help-Cross, Cross}.  That text
74693139Sruis a real, live cross reference, whose name is @samp{Cross} and which
747146515Srupoints to the node named @samp{Help-Cross}.  (The node name is hidden
748146515Sruin Emacs.  Do @kbd{M-x visible-mode} to show or hide it.)
74942660Smarkm
75093139Sru@kindex f @r{(Info mode)}
75193139Sru@findex Info-follow-reference
75293139Sru  There are two ways to follow a cross reference.  You can move the
75393139Srucursor to it and press @key{RET}, just as in a menu.  @key{RET}
75493139Srufollows the cross reference that the cursor is on.  Or you can type
75593139Sru@kbd{f} and then specify the name of the cross reference (in this
75693139Srucase, @samp{Cross}) as an argument.  In Emacs Info, @kbd{f} runs
75793139Sru@code{Info-follow-reference},
75893139Sru
75993139Sru  In the @kbd{f} command, you select the cross reference with its
76093139Sruname, so it does not matter where the cursor was.  If the cursor is on
76193139Sruor near a cross reference, @kbd{f} suggests that reference name in
76293139Sruparentheses as the default; typing @key{RET} will follow that
76393139Srureference.  However, if you type a different reference name, @kbd{f}
76493139Sruwill follow the other reference which has that name.
76593139Sru
76693139Sru@format
76793139Sru>> Type @kbd{f}, followed by @kbd{Cross}, and then @key{RET}.
76893139Sru@end format
76993139Sru
77093139Sru  As you enter the reference name, you can use the @key{DEL} (or
77193139Sru@key{BACKSPACE}) key to edit your input.  If you change your mind
77293139Sruabout following any reference, you can use @kbd{Control-g} to cancel
77393139Sruthe command.  Completion is available in the @kbd{f} command; you can
77493139Srucomplete among all the cross reference names in the current node by
77593139Srutyping a @key{TAB}.
77693139Sru
77793139Sru  To get a list of all the cross references in the current node, you
77893139Srucan type @kbd{?} after an @kbd{f}.  The @kbd{f} continues to await a
77993139Srucross reference name even after displaying the list, so if you don't
78093139Sruactually want to follow a reference, you should type a @kbd{Control-g}
78193139Sruto cancel the @kbd{f}.
78293139Sru
78393139Sru@format
78493139Sru>> Type @kbd{f?} to get a list of the cross references in this node.  Then
78593139Sru   type a @kbd{Control-g} and see how the @samp{f} gives up.
78693139Sru@end format
78793139Sru
78893139Sru  The @key{TAB} and @kbd{M-@key{TAB}} key, which move between menu
78993139Sruitems in a menu, also move between cross references outside of menus.
79093139Sru
791146515Sru  Sometimes a cross reference (or a node) can lead to another file (in
792146515Sruother words another ``manual''), or, on occasion, even a file on a
793146515Sruremote machine (although Info files distributed with Emacs or the
794146515Srustand-alone Info avoid using remote links).  Such a cross reference
795146515Srulooks like this: @xref{Top,, Overview of Texinfo, texinfo, Texinfo:
796146515SruThe GNU Documentation Format}.  (After following this link, type
797146515Sru@kbd{l} to get back to this node.)  Here the name @samp{texinfo}
798146515Srubetween parentheses (shown in the stand-alone version) refers to the
799146515Srufile name.  This file name appears in cross references and node names
800146515Sruif it differs from the current file.  In Emacs, the file name is
801146515Sruhidden (along with other text).  (Use @kbd{M-x visible-mode} to show
802146515Sruor hide it.)
803146515Sru
804146515Sru  The remainder of this node applies only to the Emacs version.  If
805146515Sruyou use the stand-alone version, you can type @kbd{n} immediately.
806146515Sru
807146515Sru  To some users, switching manuals is a much bigger switch than
808146515Sruswitching sections.  These users like to know that they are going to
809146515Srube switching to another manual (and which one) before actually doing
810146515Sruso, especially given that, if one does not notice, Info commands like
811146515Sru@kbd{t} (see the next node) can have confusing results.
812146515Sru
813146515Sru  If you put your mouse over the cross reference and if the cross
814146515Srureference leads to a different manual, then the information appearing
815146515Sruin a separate box (tool tip) or in the echo area, will mention the
816146515Srufile the cross reference will carry you to (between parentheses).
817146515SruThis is also true for menu subtopic names.  If you have a mouse, just
818146515Sruleave it over the @samp{Overview} cross reference above and watch what
819146515Sruhappens.
820146515Sru
821146515Sru  If you always like to have that information available without having
822146515Sruto move your mouse over the cross reference, set
823146515Sru@code{Info-hide-note-references} to a value other than t (@pxref{Emacs
824146515SruInfo Variables}).  You might also want to do that if you have a lot of
825146515Srucross references to files on remote machines and have non-permanent or
826146515Sruslow access, since otherwise you might not be able to distinguish
827146515Srubetween local and remote links.
828146515Sru
829146515Sru@format
830146515Sru>> Now type @kbd{n} to learn more commands.
831146515Sru@end format
832146515Sru
83393139Sru@node Help-Int, Help-Q, Help-Xref, Getting Started
83493139Sru@comment  node-name,  next,  previous,  up
83593139Sru@section Some intermediate Info commands
83693139Sru
83793139Sru  The introductory course is almost over; please continue
83893139Srua little longer to learn some intermediate-level commands.
83993139Sru
840146515Sru  Most Info files have an index, which is actually a large node
841146515Srucontaining little but a menu.  The menu has one menu item for each
842146515Srutopic listed in the index.  (As a special feature, menus for indices
843146515Srumay also include the line number within the node of the index entry.
844146515SruThis allows Info readers to go to the exact line of an entry, not just
845146515Sruthe start of the containing node.)
84693139Sru
847146515Sru  You can get to the index from the main menu of the file with the
848146515Sru@kbd{m} command; then you can use the @kbd{m} command again in the
849146515Sruindex node to go to the node that describes the topic you want.
850146515Sru
85193139Sru  There is also a short-cut Info command, @kbd{i}, which does all of
85293139Sruthat for you.  It searches the index for a given topic (a string) and
85393139Srugoes to the node which is listed in the index for that topic.
85493139Sru@xref{Info Search}, for a full explanation.
85593139Sru
85693139Sru@kindex l @r{(Info mode)}
85793139Sru@findex Info-last
85893139Sru@cindex going back in Info mode
85942660Smarkm  If you have been moving around to different nodes and wish to
86042660Smarkmretrace your steps, the @kbd{l} command (@kbd{l} for @dfn{last}) will
86142660Smarkmdo that, one node-step at a time.  As you move from node to node, Info
86242660Smarkmrecords the nodes where you have been in a special history list.  The
86342660Smarkm@kbd{l} command revisits nodes in the history list; each successive
86442660Smarkm@kbd{l} command moves one step back through the history.
86542660Smarkm
86693139Sru  In Emacs, @kbd{l} runs the command @code{Info-last}.
86793139Sru
86893139Sru@format
869146515Sru>> Try typing @kbd{p p n} and then three @kbd{l}'s, pausing in between
870146515Sruto see what each @kbd{l} does.  You should wind up right back here.
87193139Sru@end format
87242660Smarkm
87342660Smarkm  Note the difference between @kbd{l} and @kbd{p}: @kbd{l} moves to
87442660Smarkmwhere @emph{you} last were, whereas @kbd{p} always moves to the node
87593139Sruwhich the header says is the @samp{Previous} node (from this node, the
876146515Sru@samp{Prev} link leads to @samp{Help-Xref}).
87742660Smarkm
87893139Sru@kindex d @r{(Info mode)}
87993139Sru@findex Info-directory
88093139Sru@cindex go to Directory node
88193139Sru  The @kbd{d} command (@code{Info-directory} in Emacs) gets you
88293139Sruinstantly to the Directory node.  This node, which is the first one
88393139Sruyou saw when you entered Info, has a menu which leads (directly or
88493139Sruindirectly, through other menus), to all the nodes that exist.  The
88593139SruDirectory node lists all the manuals and other Info documents that
88693139Sruare, or could be, installed on your system.
88742660Smarkm
88893139Sru@format
88993139Sru>> Try doing a @kbd{d}, then do an @kbd{l} to return here (yes,
89042660Smarkm   @emph{do} return).
89193139Sru@end format
89242660Smarkm
89393139Sru@kindex t @r{(Info mode)}
89493139Sru@findex Info-top-node
89593139Sru@cindex go to Top node
89693139Sru  The @kbd{t} command moves to the @samp{Top} node of the manual.
89793139SruThis is useful if you want to browse the manual's main menu, or select
89893139Srusome specific top-level menu item.  The Emacs command run by @kbd{t}
89993139Sruis @code{Info-top-node}.
90042660Smarkm
90193139Sru  Clicking @kbd{Mouse-2} on or near a cross reference also follows the
90293139Srureference.  You can see that the cross reference is mouse-sensitive by
90393139Srumoving the mouse pointer to the reference and watching how the
90493139Sruunderlying text and the mouse pointer change in response.
90542660Smarkm
90693139Sru@format
90793139Sru>> Now type @kbd{n} to see the last node of the course.
90893139Sru@end format
90942660Smarkm
910114472Sru  @xref{Expert Info}, for more advanced Info features.
91142660Smarkm
91242660Smarkm@c If a menu appears at the end of this node, remove it.
91342660Smarkm@c It is an accident of the menu updating command.
91442660Smarkm
915114472Sru@node Expert Info
91642660Smarkm@chapter Info for Experts
91742660Smarkm
918114472Sru  This chapter describes various Info commands for experts.  (If you
919114472Sruare using a stand-alone Info reader, there are additional commands
92093139Sruspecific to it, which are documented in several chapters of @ref{Top,,
92193139SruGNU Info, info-stnd, GNU Info}.)
92242660Smarkm
92393139Sru  This chapter also explains how to write an Info as distinct from a
92493139SruTexinfo file.  (However, in most cases, writing a Texinfo file is
925114472Srubetter, since you can use it to make a printed manual or produce other
926114472Sruformats, such as HTML and DocBook, as well as for generating Info
927114472Srufiles.)  @xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU
928146515SruDocumentation Format}.
92993139Sru
93042660Smarkm@menu
931146515Sru* Advanced::             Advanced Info commands: g, e, and 1 - 9.
93293139Sru* Info Search::          How to search Info documents for specific subjects.
93342660Smarkm* Add::                  Describes how to add new nodes to the hierarchy.
93442660Smarkm                           Also tells what nodes look like.
93542660Smarkm* Menus::                How to add to or create menus in Info nodes.
93642660Smarkm* Cross-refs::           How to add cross-references to Info nodes.
93793139Sru* Tags::                 How to make tags tables for Info files.
93842660Smarkm* Checking::             Checking an Info File
93942660Smarkm* Emacs Info Variables:: Variables modifying the behavior of Emacs Info.
94042660Smarkm@end menu
94142660Smarkm
942114472Sru@node Advanced, Info Search,  , Expert Info
94342660Smarkm@comment  node-name,  next,  previous,  up
94442660Smarkm@section Advanced Info Commands
94542660Smarkm
94693139SruHere are some more Info commands that make it easier to move around.
94742660Smarkm
948146515Sru@subheading @kbd{g} goes to a node by name
94993139Sru
95093139Sru@kindex g @r{(Info mode)}
95193139Sru@findex Info-goto-node
95293139Sru@cindex go to a node by name
95393139Sru  If you know a node's name, you can go there by typing @kbd{g}, the
95442660Smarkmname, and @key{RET}.  Thus, @kbd{gTop@key{RET}} would go to the node
95593139Srucalled @samp{Top} in this file.  (This is equivalent to @kbd{t}, see
956114472Sru@ref{Help-Int}.)  @kbd{gAdvanced@key{RET}} would come back here.
95793139Sru@kbd{g} in Emacs runs the command @code{Info-goto-node}.
95842660Smarkm
95993139Sru  Unlike @kbd{m}, @kbd{g} does not allow the use of abbreviations.
96093139SruBut it does allow completion, so you can type @key{TAB} to complete a
96193139Srupartial node name.
96242660Smarkm
96393139Sru@cindex go to another Info file
96493139Sru  To go to a node in another file, you can include the file name in the
96542660Smarkmnode name by putting it at the front, in parentheses.  Thus,
96642660Smarkm@kbd{g(dir)Top@key{RET}} would go to the Info Directory node, which is
96793139Sruthe node @samp{Top} in the Info file @file{dir}.  Likewise,
96893139Sru@kbd{g(emacs)Top@key{RET}} goes to the top node of the Emacs manual.
96942660Smarkm
97093139Sru  The node name @samp{*} specifies the whole file.  So you can look at
97142660Smarkmall of the current file by typing @kbd{g*@key{RET}} or all of any
97293139Sruother file with @kbd{g(@var{filename})@key{RET}}.
97342660Smarkm
974146515Sru@subheading @kbd{1}--@kbd{9} choose a menu subtopic by its number
97593139Sru
97693139Sru@kindex 1 @r{through} 9 @r{(Info mode)}
97793139Sru@findex Info-nth-menu-item
97893139Sru@cindex select @var{n}'th menu item
97993139Sru  If you begrudge each character of type-in which your system requires,
98093139Sruyou might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4},
98193139Sru@dots{}, @kbd{9}.  They are short for the @kbd{m} command together
98293139Sruwith a name of a menu subtopic.  @kbd{1} goes through the first item
98393139Sruin the current node's menu; @kbd{2} goes through the second item, etc.
98493139SruIn the stand-alone reader, @kbd{0} goes through the last menu item;
98593139Sruthis is so you need not count how many entries are there.  In Emacs,
98693139Sruthe digit keys run the command @code{Info-nth-menu-item}.
98793139Sru
988146515Sru  If your display supports multiple fonts, colors or underlining, and
989146515Sruyou are using Emacs' Info mode to read Info files, the third, sixth
990146515Sruand ninth menu items have a @samp{*} that stands out, either in color
991146515Sruor in some other attribute, such as underline; this makes it easy to
992146515Srusee at a glance which number to use for an item.
99393139Sru
994146515Sru  Some terminals don't support either multiple fonts, colors or
995146515Sruunderlining.  If you need to actually count items, it is better to use
996146515Sru@kbd{m} instead, and specify the name, or use @key{TAB} to quickly
997146515Srumove between menu items.
99893139Sru
999146515Sru@subheading @kbd{e} makes Info document editable
100093139Sru
100193139Sru@kindex e @r{(Info mode)}
100293139Sru@findex Info-edit
100393139Sru@cindex edit Info document
100493139Sru  The Info command @kbd{e} changes from Info mode to an ordinary
100593139SruEmacs editing mode, so that you can edit the text of the current node.
100693139SruType @kbd{C-c C-c} to switch back to Info.  The @kbd{e} command is allowed
100793139Sruonly if the variable @code{Info-enable-edit} is non-@code{nil}.
100893139Sru
100993139Sru  The @kbd{e} command only works in Emacs, where it runs the command
101093139Sru@code{Info-edit}.  The stand-alone Info reader doesn't allow you to
101193139Sruedit the Info file, so typing @kbd{e} there goes to the end of the
101293139Srucurrent node.
101393139Sru
1014146515Sru@subheading @kbd{M-n} creates a new independent Info buffer in Emacs
1015146515Sru
1016146515Sru@kindex M-n @r{(Info mode)}
1017146515Sru@findex clone-buffer
1018146515Sru@cindex multiple Info buffers
1019146515Sru  If you are reading Info in Emacs, you can select a new independent
1020146515SruInfo buffer in another window by typing @kbd{M-n}.  The new buffer
1021146515Srustarts out as an exact copy of the old one, but you will be able to
1022146515Srumove independently between nodes in the two buffers.  (In Info mode,
1023146515Sru@kbd{M-n} runs the Emacs command @code{clone-buffer}.)
1024146515Sru
1025146515Sru  In Emacs Info, you can also produce new Info buffers by giving a
1026146515Srunumeric prefix argument to the @kbd{m} and @kbd{g} commands.  @kbd{C-u
1027146515Srum} and @kbd{C-u g} go to a new node in exactly the same way that
1028146515Sru@kbd{m} and @kbd{g} do, but they do so in a new Info buffer which they
1029146515Sruselect in another window.
1030146515Sru
1031114472Sru@node Info Search, Add, Advanced, Expert Info
103293139Sru@comment  node-name,  next,  previous,  up
103393139Sru@section How to search Info documents for specific subjects
103493139Sru
103593139Sru@cindex searching Info documents
103693139Sru@cindex Info document as a reference
103793139Sru  The commands which move between and inside nodes allow you to read
103893139Sruthe entire manual or its large portions.  But what if you need to find
103993139Srusome information in the manual as fast as you can, and you don't know
104093139Sruor don't remember in what node to look for it?  This need arises when
104193139Sruyou use a manual as a @dfn{reference}, or when it is impractical to
104293139Sruread the entire manual before you start using the programs it
104393139Srudescribes.
104493139Sru
104593139Sru  Info has powerful searching facilities that let you find things
104693139Sruquickly.  You can search either the manual indices or its text.
104793139Sru
104893139Sru@kindex i @r{(Info mode)}
104993139Sru@findex Info-index
105093139Sru  Since most subjects related to what the manual describes should be
105193139Sruindexed, you should try the index search first.  The @kbd{i} command
105293139Sruprompts you for a subject and then looks up that subject in the
105393139Sruindices.  If it finds an index entry with the subject you typed, it
105493139Srugoes to the node to which that index entry points.  You should browse
105593139Sruthrough that node to see whether the issue you are looking for is
105693139Srudescribed there.  If it isn't, type @kbd{,} one or more times to go
105793139Sruthrough additional index entries which match your subject.
105893139Sru
105993139Sru  The @kbd{i} command finds all index entries which include the string
106093139Sruyou typed @emph{as a substring}.  For each match, Info shows in the
106193139Sruecho area the full index entry it found.  Often, the text of the full
106293139Sruindex entry already gives you enough information to decide whether it
106393139Sruis relevant to what you are looking for, so we recommend that you read
1064146515Sruwhat Info shows in the echo area before looking at the node it
106593139Srudisplays.
106693139Sru
106793139Sru  Since @kbd{i} looks for a substring, you can search for subjects even
106893139Sruif you are not sure how they are spelled in the index.  For example,
106993139Srusuppose you want to find something that is pertinent to commands which
107093139Srucomplete partial input (e.g., when you type @key{TAB}).  If you want
107193139Sruto catch index entries that refer to ``complete'', ``completion'', and
107293139Sru``completing'', you could type @kbd{icomplet@key{RET}}.
107393139Sru
107493139Sru  Info documents which describe programs should index the commands,
107593139Sruoptions, and key sequences that the program provides.  If you are
107693139Srulooking for a description of a command, an option, or a key, just type
107793139Srutheir names when @kbd{i} prompts you for a topic.  For example, if you
107893139Sruwant to read the description of what the @kbd{C-f} key does, type
1079146515Sru@kbd{i C - f @key{RET}}.  Here @kbd{C-f} are 3 literal characters
108093139Sru@samp{C}, @samp{-}, and @samp{f}, not the ``Control-f'' command key
108193139Sruyou type inside Emacs to run the command bound to @kbd{C-f}.
108293139Sru
108393139Sru  In Emacs, @kbd{i} runs the command @code{Info-index}.
108493139Sru
1085146515Sru@findex info-apropos
1086146515SruIf you don't know what manual documents something, try the @kbd{M-x
1087146515Sruinfo-apropos} command.  It prompts for a string and then looks up that
1088146515Srustring in all the indices of all the Info documents installed on your
1089146515Srusystem.
1090146515Sru
109193139Sru@kindex s @r{(Info mode)}
109293139Sru@findex Info-search
109393139Sru  The @kbd{s} command allows you to search a whole file for a string.
109442660SmarkmIt switches to the next node if and when that is necessary.  You
109542660Smarkmtype @kbd{s} followed by the string to search for, terminated by
109642660Smarkm@key{RET}.  To search for the same string again, just @kbd{s} followed
109742660Smarkmby @key{RET} will do.  The file's nodes are scanned in the order
109842660Smarkmthey are in in the file, which has no necessary relationship to the
109993139Sruorder that they may be in the tree structure of menus and @samp{next}
110056160Srupointers.  But normally the two orders are not very different.  In any
110156160Srucase, you can always do a @kbd{b} to find out what node you have
110256160Srureached, if the header is not visible (this can happen, because @kbd{s}
110356160Sruputs your cursor at the occurrence of the string, not at the beginning
110456160Sruof the node).
110542660Smarkm
110693139Sru@kindex M-s @r{(Info mode)}
110793139Sru  In Emacs, @kbd{Meta-s} is equivalent to @kbd{s}.  That is for
110893139Srucompatibility with other GNU packages that use @kbd{M-s} for a similar
110993139Srukind of search command.  Both @kbd{s} and @kbd{M-s} run in Emacs the
111093139Srucommand @code{Info-search}.
111142660Smarkm
111242660Smarkm
1113114472Sru@node Add, Menus, Info Search, Expert Info
111442660Smarkm@comment  node-name,  next,  previous,  up
111542660Smarkm@section Adding a new node to Info
111642660Smarkm
111742660SmarkmTo add a new topic to the list in the Info directory, you must:
111893139Sru
111942660Smarkm@enumerate
112042660Smarkm@item
112142660SmarkmCreate some nodes, in some file, to document that topic.
112242660Smarkm@item
112342660SmarkmPut that topic in the menu in the directory.  @xref{Menus, Menu}.
112442660Smarkm@end enumerate
112542660Smarkm
112693139Sru  Usually, the way to create the nodes is with Texinfo (@pxref{Top,,
112793139SruOverview of Texinfo, texinfo, Texinfo: The GNU Documentation Format});
1128114472Sruthis has the advantage that you can also make a printed manual or HTML
1129114472Srufrom them.  You would use the @samp{@@dircategory} and
1130114472Sru@samp{@@direntry} commands to put the manual into the Info directory.
1131114472SruHowever, if you want to edit an Info file manually and install it
1132114472Srumanually, here is how.
113342660Smarkm
113493139Sru@cindex node delimiters
113593139Sru  The new node can live in an existing documentation file, or in a new
113693139Sruone.  It must have a @samp{^_} character before it (invisible to the
113742660Smarkmuser; this node has one but you cannot see it), and it ends with either
113893139Srua @samp{^_}, a @samp{^L} (``formfeed''), or the end of file.@footnote{If
113993139Sruyou put in a @samp{^L} to end a new node, be sure that there is a
114093139Sru@samp{^_} after it to start the next one, since @samp{^L} cannot
114193139Sru@emph{start} a node.  Also, a nicer way to make a node boundary be a
114293139Srupage boundary as well is to put a @samp{^L} @emph{right after} the
114393139Sru@samp{^_}.}
114442660Smarkm
114593139Sru  The @samp{^_} starting a node must be followed by a newline or a
1146114472Sru@samp{^L} newline, after which comes the node's header line.  The
1147114472Sruheader line must give the node's name (by which Info finds it), and
1148114472Srustate the names of the @samp{Next}, @samp{Previous}, and @samp{Up}
1149114472Srunodes (if there are any).  As you can see, this node's @samp{Up} node
1150114472Sruis the node @samp{Expert Info}.  The @samp{Next} node is @samp{Menus}.
115142660Smarkm
115293139Sru@cindex node header line format
115393139Sru@cindex format of node headers
115493139Sru  The keywords @dfn{Node}, @dfn{Next}, @dfn{Previous}, and @dfn{Up}
115542660Smarkmmay appear in any order, anywhere in the header line, but the
115642660Smarkmrecommended order is the one in this sentence.  Each keyword must be
115742660Smarkmfollowed by a colon, spaces and tabs, and then the appropriate name.
115842660SmarkmThe name may be terminated with a tab, a comma, or a newline.  A space
115942660Smarkmdoes not end it; node names may contain spaces.  The case of letters
116042660Smarkmin the names is insignificant.
116142660Smarkm
116293139Sru@cindex node name format
116393139Sru@cindex Directory node
116442660Smarkm  A node name has two forms.  A node in the current file is named by
116542660Smarkmwhat appears after the @samp{Node: } in that node's first line.  For
116642660Smarkmexample, this node's name is @samp{Add}.  A node in another file is
116742660Smarkmnamed by @samp{(@var{filename})@var{node-within-file}}, as in
116842660Smarkm@samp{(info)Add} for this node.  If the file name starts with ``./'',
116993139Sruthen it is relative to the current directory; otherwise, it is
117093139Srurelative starting from the standard directory for Info files of your
117193139Srusite.  The name @samp{(@var{filename})Top} can be abbreviated to just
117293139Sru@samp{(@var{filename})}.  By convention, the name @samp{Top} is used
117393139Srufor the ``highest'' node in any single file---the node whose @samp{Up}
117493139Srupoints out of the file.  The @samp{Directory} node is @file{(dir)}, it
117593139Srupoints to a file @file{dir} which holds a large menu listing all the
117693139SruInfo documents installed on your site.  The @samp{Top} node of a
117793139Srudocument file listed in the @samp{Directory} should have an @samp{Up:
117842660Smarkm(dir)} in it.
117942660Smarkm
118093139Sru@cindex unstructured documents
118142660Smarkm  The node name @kbd{*} is special: it refers to the entire file.
118242660SmarkmThus, @kbd{g*} shows you the whole current file.  The use of the
118342660Smarkmnode @kbd{*} is to make it possible to make old-fashioned,
118442660Smarkmunstructured files into nodes of the tree.
118542660Smarkm
118642660Smarkm  The @samp{Node:} name, in which a node states its own name, must not
118793139Srucontain a file name, since when Info searches for a node, it does not
118893139Sruexpect a file name to be there.  The @samp{Next}, @samp{Previous} and
118993139Sru@samp{Up} names may contain them.  In this node, since the @samp{Up}
119093139Srunode is in the same file, it was not necessary to use one.
119142660Smarkm
119242660Smarkm  Note that the nodes in this file have a file name in the header
119342660Smarkmline.  The file names are ignored by Info, but they serve as comments
119442660Smarkmto help identify the node for the user.
119542660Smarkm
1196114472Sru@node Menus, Cross-refs, Add, Expert Info
119742660Smarkm@comment  node-name,  next,  previous,  up
119842660Smarkm@section How to Create Menus
119942660Smarkm
120056160Sru  Any node in the Info hierarchy may have a @dfn{menu}---a list of subnodes.
120142660SmarkmThe @kbd{m} command searches the current node's menu for the topic which it
120242660Smarkmreads from the terminal.
120342660Smarkm
120493139Sru@cindex menu and menu entry format
1205146515Sru  A menu begins with a line starting with @w{@samp{* Menu:}}.  The
1206146515Srurest of the line is a comment.  After the starting line, every line
1207146515Sruthat begins with a @samp{* } lists a single topic.  The name of the
1208146515Srutopic---what the user must type at the @kbd{m}'s command prompt to
1209146515Sruselect this topic---comes right after the star and space, and is
1210146515Srufollowed by a colon, spaces and tabs, and the name of the node which
1211146515Srudiscusses that topic.  The node name, like node names following
1212146515Sru@samp{Next}, @samp{Previous} and @samp{Up}, may be terminated with a
1213146515Srutab, comma, or newline; it may also be terminated with a period.
121442660Smarkm
121542660Smarkm  If the node name and topic name are the same, then rather than
121693139Srugiving the name twice, the abbreviation @samp{* @var{name}::} may be
121793139Sruused (and should be used, whenever possible, as it reduces the visual
121842660Smarkmclutter in the menu).
121942660Smarkm
122042660Smarkm  It is considerate to choose the topic names so that they differ
122142660Smarkmfrom each other very near the beginning---this allows the user to type
122242660Smarkmshort abbreviations.  In a long menu, it is a good idea to capitalize
122342660Smarkmthe beginning of each item name which is the minimum acceptable
122442660Smarkmabbreviation for it (a long menu is more than 5 or so entries).
122542660Smarkm
122656160Sru  The nodes listed in a node's menu are called its ``subnodes'', and it
122756160Sruis their ``superior''.  They should each have an @samp{Up:} pointing at
122856160Sruthe superior.  It is often useful to arrange all or most of the subnodes
122956160Sruin a sequence of @samp{Next} and @samp{Previous} pointers so that
123056160Srusomeone who wants to see them all need not keep revisiting the Menu.
123142660Smarkm
123242660Smarkm  The Info Directory is simply the menu of the node @samp{(dir)Top}---that
123342660Smarkmis, node @samp{Top} in file @file{.../info/dir}.  You can put new entries
123442660Smarkmin that menu just like any other menu.  The Info Directory is @emph{not} the
123542660Smarkmsame as the file directory called @file{info}.  It happens that many of
123693139SruInfo's files live in that file directory, but they do not have to; and
123793139Srufiles in that directory are not automatically listed in the Info
123842660SmarkmDirectory node.
123942660Smarkm
124042660Smarkm  Also, although the Info node graph is claimed to be a ``hierarchy'',
124142660Smarkmin fact it can be @emph{any} directed graph.  Shared structures and
124242660Smarkmpointer cycles are perfectly possible, and can be used if they are
124342660Smarkmappropriate to the meaning to be expressed.  There is no need for all
124442660Smarkmthe nodes in a file to form a connected structure.  In fact, this file
124542660Smarkmhas two connected components.  You are in one of them, which is under
124642660Smarkmthe node @samp{Top}; the other contains the node @samp{Help} which the
124742660Smarkm@kbd{h} command goes to.  In fact, since there is no garbage
124842660Smarkmcollector, nothing terrible happens if a substructure is not pointed
124942660Smarkmto, but such a substructure is rather useless since nobody can
125042660Smarkmever find out that it exists.
125142660Smarkm
1252114472Sru@node Cross-refs, Tags, Menus, Expert Info
125342660Smarkm@comment  node-name,  next,  previous,  up
125442660Smarkm@section Creating Cross References
125542660Smarkm
125693139Sru@cindex cross reference format
125742660Smarkm  A cross reference can be placed anywhere in the text, unlike a menu
125842660Smarkmitem which must go at the front of a line.  A cross reference looks
125993139Srulike a menu item except that it has @samp{*note} instead of @samp{*}.
126042660SmarkmIt @emph{cannot} be terminated by a @samp{)}, because @samp{)}'s are
126142660Smarkmso often part of node names.  If you wish to enclose a cross reference
126242660Smarkmin parentheses, terminate it with a period first.  Here are two
126342660Smarkmexamples of cross references pointers:
126442660Smarkm
126542660Smarkm@example
126642660Smarkm*Note details: commands.  (See *note 3: Full Proof.)
126742660Smarkm@end example
126842660Smarkm
126993139Sru@noindent
127093139Sru@emph{These are just examples.}  The places they ``lead to'' do not
127193139Srureally exist!
127242660Smarkm
127393139Sru@menu
127493139Sru* Help-Cross::                  Target of a cross-reference.
127593139Sru@end menu
127693139Sru
127793139Sru
127893139Sru@node Help-Cross,  ,  , Cross-refs
127993139Sru@subsection The node reached by the cross reference in Info
128093139Sru
128193139Sru  This is the node reached by the cross reference named @samp{Cross}.
128293139Sru
128393139Sru  While this node is specifically intended to be reached by a cross
128493139Srureference, most cross references lead to nodes that ``belong''
128593139Srusomeplace else far away in the structure of an Info document.  So you
128693139Srucannot expect this node to have a @samp{Next}, @samp{Previous} or
128793139Sru@samp{Up} links pointing back to where you came from.  In general, the
128893139Sru@kbd{l} (el) command is the only way to get back there.
128993139Sru
129093139Sru@format
129193139Sru>> Type @kbd{l} to return to the node where the cross reference was.
129293139Sru@end format
129393139Sru
129493139Sru@node Help-Q,  , Help-Int, Getting Started
129593139Sru@comment  node-name,  next,  previous,  up
129693139Sru@section Quitting Info
129793139Sru
129893139Sru@kindex q @r{(Info mode)}
129993139Sru@findex Info-exit
130093139Sru@cindex quitting Info mode
130193139Sru  To get out of Info, back to what you were doing before, type @kbd{q}
130293139Srufor @dfn{Quit}.  This runs @code{Info-exit} in Emacs.
130393139Sru
130493139Sru  This is the end of the basic course on using Info.  You have learned
130593139Sruhow to move in an Info document, and how to follow menus and cross
130693139Srureferences.  This makes you ready for reading manuals top to bottom,
130793139Sruas new users should do when they learn a new package.
130893139Sru
130993139Sru  Another set of Info commands is useful when you need to find
131093139Srusomething quickly in a manual---that is, when you need to use a manual
1311114472Sruas a reference rather than as a tutorial.  We urge you to learn
131293139Sruthese search commands as well.  If you want to do that now, follow this
131393139Srucross reference to @ref{Info Search}.
131493139Sru
131593139SruYet another set of commands are meant for experienced users; you can
131693139Srufind them by looking in the Directory node for documentation on Info.
131793139SruFinding them will be a good exercise in using Info in the usual
131893139Srumanner.
131993139Sru
132093139Sru@format
132193139Sru>> Type @kbd{d} to go to the Info directory node; then type
132293139Sru   @kbd{mInfo} and Return, to get to the node about Info and
132393139Sru   see what other help is available.
132493139Sru@end format
132593139Sru
132693139Sru
1327114472Sru@node Tags, Checking, Cross-refs, Expert Info
132842660Smarkm@comment  node-name,  next,  previous,  up
132993139Sru@section Tags Tables for Info Files
133042660Smarkm
133193139Sru@cindex tags tables in info files
133242660Smarkm  You can speed up the access to nodes of a large Info file by giving
133393139Sruit a tags table.  Unlike the tags table for a program, the tags table for
133456160Sruan Info file lives inside the file itself and is used
133542660Smarkmautomatically whenever Info reads in the file.
133642660Smarkm
133793139Sru@findex Info-tagify
133893139Sru  To make a tags table, go to a node in the file using Emacs Info mode and type
133942660Smarkm@kbd{M-x Info-tagify}.  Then you must use @kbd{C-x C-s} to save the
134093139Srufile.  Info files produced by the @code{makeinfo} command that is part
134193139Sruof the Texinfo package always have tags tables to begin with.
134242660Smarkm
134393139Sru@cindex stale tags tables
134493139Sru@cindex update Info tags table
134593139Sru  Once the Info file has a tags table, you must make certain it is up
134693139Sruto date.  If you edit an Info file directly (as opposed to editing its
134793139SruTexinfo source), and, as a result of deletion of text, any node moves back
134842660Smarkmmore than a thousand characters in the file from the position
134993139Srurecorded in the tags table, Info will no longer be able to find that
135093139Srunode.  To update the tags table, use the @code{Info-tagify} command
135193139Sruagain.
135242660Smarkm
135393139Sru  An Info file tags table appears at the end of the file and looks like
135442660Smarkmthis:
135542660Smarkm
135642660Smarkm@example
135793139Sru^_^L
135842660SmarkmTag Table:
135942660SmarkmFile: info, Node: Cross-refs^?21419
136042660SmarkmFile: info,  Node: Tags^?22145
136142660Smarkm^_
136242660SmarkmEnd Tag Table
136342660Smarkm@end example
136442660Smarkm
136542660Smarkm@noindent
136642660SmarkmNote that it contains one line per node, and this line contains
136742660Smarkmthe beginning of the node's header (ending just after the node name),
136893139Srua @samp{DEL} character, and the character position in the file of the
136942660Smarkmbeginning of the node.
137042660Smarkm
137156160Sru
1372114472Sru@node Checking, Emacs Info Variables, Tags, Expert Info
137342660Smarkm@section Checking an Info File
137442660Smarkm
137556160SruWhen creating an Info file, it is easy to forget the name of a node when
137656160Sruyou are making a pointer to it from another node.  If you put in the
137756160Sruwrong name for a node, this is not detected until someone tries to go
137856160Sruthrough the pointer using Info.  Verification of the Info file is an
137956160Sruautomatic process which checks all pointers to nodes and reports any
138056160Srupointers which are invalid.  Every @samp{Next}, @samp{Previous}, and
138142660Smarkm@samp{Up} is checked, as is every menu item and every cross reference.  In
138256160Sruaddition, any @samp{Next} which does not have a @samp{Previous} pointing
138356160Sruback is reported.  Only pointers within the file are checked, because
138456160Sruchecking pointers to other files would be terribly slow.  But those are
138556160Sruusually few.
138642660Smarkm
138793139Sru@findex Info-validate
138856160SruTo check an Info file, do @kbd{M-x Info-validate} while looking at any
138956160Srunode of the file with Emacs Info mode.
139042660Smarkm
1391114472Sru@node Emacs Info Variables, , Checking, Expert Info
139242660Smarkm@section Emacs Info-mode Variables
139342660Smarkm
139493139SruThe following variables may modify the behavior of Info-mode in Emacs;
139542660Smarkmyou may wish to set one or several of these variables interactively, or
139642660Smarkmin your @file{~/.emacs} init file.  @xref{Examining, Examining and Setting
139742660SmarkmVariables, Examining and Setting Variables, emacs, The GNU Emacs
139893139SruManual}.  The stand-alone Info reader program has its own set of
139993139Sruvariables, described in @ref{Variables,, Manipulating Variables,
140093139Sruinfo-stnd, GNU Info}.
140142660Smarkm
140242660Smarkm@vtable @code
140393139Sru@item Info-directory-list
140493139SruThe list of directories to search for Info files.  Each element is a
140593139Srustring (directory name) or @code{nil} (try default directory).  If not
140693139Sruinitialized Info uses the environment variable @env{INFOPATH} to
140793139Sruinitialize it, or @code{Info-default-directory-list} if there is no
140893139Sru@env{INFOPATH} variable in the environment.
140942660Smarkm
141093139SruIf you wish to customize the Info directory search list for both Emacs
141193139Sruinfo and stand-alone Info, it is best to set the @env{INFOPATH}
141293139Sruenvironment variable, since that applies to both programs.
141393139Sru
141493139Sru@item Info-additional-directory-list
141593139SruA list of additional directories to search for Info documentation files.
141693139SruThese directories are not searched for merging the @file{dir} file.
141793139Sru
141893139Sru@item Info-fontify
141993139SruWhen set to a non-@code{nil} value, enables highlighting of Info
142093139Srufiles.  The default is @code{t}.  You can change how the highlighting
1421114472Srulooks by customizing the faces @code{info-node}, @code{info-xref},
1422114472Sru@code{info-header-xref}, @code{info-header-node}, @code{info-menu-5},
1423114472Sru@code{info-menu-header}, and @code{info-title-@var{n}-face} (where
1424114472Sru@var{n} is the level of the section, a number between 1 and 4).  To
142593139Srucustomize a face, type @kbd{M-x customize-face @key{RET} @var{face}
142693139Sru@key{RET}}, where @var{face} is one of the face names listed here.
142793139Sru
142893139Sru@item Info-use-header-line
142993139SruIf non-@code{nil}, Emacs puts in the Info buffer a header line showing
143093139Sruthe @samp{Next}, @samp{Prev}, and @samp{Up} links.  A header line does
143193139Srunot scroll with the rest of the buffer, making these links always
143293139Sruvisible.
143393139Sru
1434146515Sru@item Info-hide-note-references
1435146515SruAs explained in earlier nodes, the Emacs version of Info normally
1436146515Sruhides some text in menus and cross-references.  You can completely
1437146515Srudisable this feature, by setting this option to @code{nil}.  Setting
1438146515Sruit to a value that is neither @code{nil} nor @code{t} produces an
1439146515Sruintermediate behavior, hiding a limited amount of text, but showing
1440146515Sruall text that could potentially be useful.
1441146515Sru
144293139Sru@item Info-scroll-prefer-subnodes
144393139SruIf set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or
144493139Sru@key{DEL}) keys in a menu visit subnodes of the current node before
144593139Sruscrolling to its end or beginning, respectively.  For example, if the
144693139Srunode's menu appears on the screen, the next @key{SPC} moves to a
144793139Srusubnode indicated by the following menu item.  Setting this option to
144893139Sru@code{nil} results in behavior similar to the stand-alone Info reader
144993139Sruprogram, which visits the first subnode from the menu only when you
1450146515Sruhit the end of the current node.  The default is @code{nil}.
145193139Sru
145242660Smarkm@item Info-enable-active-nodes
145342660SmarkmWhen set to a non-@code{nil} value, allows Info to execute Lisp code
145442660Smarkmassociated with nodes.  The Lisp code is executed when the node is
145593139Sruselected.  The Lisp code to be executed should follow the node
145693139Srudelimiter (the @samp{DEL} character) and an @samp{execute: } tag, like
145793139Sruthis:
145842660Smarkm
145993139Sru@example
146093139Sru^_execute: (message "This is an active node!")
146193139Sru@end example
146242660Smarkm
146393139Sru@item Info-enable-edit
146493139SruSet to @code{nil}, disables the @samp{e} (@code{Info-edit}) command.  A
146593139Srunon-@code{nil} value enables it.  @xref{Add, Edit}.
146642660Smarkm@end vtable
146742660Smarkm
146842660Smarkm
146956160Sru@node Creating an Info File
147093139Sru@chapter Creating an Info File from a Texinfo File
147142660Smarkm
147293139Sru@code{makeinfo} is a utility that converts a Texinfo file into an Info
147393139Srufile; @code{texinfo-format-region} and @code{texinfo-format-buffer} are
147493139SruGNU Emacs functions that do the same.
147542660Smarkm
147693139Sru@xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU
147793139SruDocumentation Format}, to learn how to write a Texinfo file.
147842660Smarkm
147993139Sru@xref{Creating an Info File,,, texinfo, Texinfo: The GNU Documentation
148093139SruFormat}, to learn how to create an Info file from a Texinfo file.
148156160Sru
148293139Sru@xref{Installing an Info File,,, texinfo, Texinfo: The GNU
148393139SruDocumentation Format}, to learn how to install an Info file after you
148493139Sruhave created one.
148593139Sru
148693139Sru@node Index
148793139Sru@unnumbered Index
148893139Sru
148993139SruThis is an alphabetical listing of all the commands, variables, and
149093139Srutopics discussed in this document.
149193139Sru
149293139Sru@printindex cp
149393139Sru
149442660Smarkm@bye
1495146515Sru
1496146515Sru@ignore
1497146515Sru   arch-tag: 965c1638-01d6-4156-9227-b10418b9d8e8
1498146515Sru@end ignore
1499