\input texinfo @c -*-texinfo-*-@comment %**start of header@setfilename info.info@settitle Info@syncodeindex fn cp@syncodeindex vr cp@syncodeindex ky cp@comment %**end of header@comment $Id: info.texi,v 1.16 2001/09/19 20:21:02 rms Exp $@dircategory Texinfo documentation system@direntry* Info: (info). Documentation browsing system.@end direntry@ifinfoThis file describes how to use Info, the on-line, menu-driven GNUdocumentation system.Copyright (C) 1989, 92, 96, 97, 98, 99, 2000, 2001Free Software Foundation, Inc.Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.1 orany later version published by the Free Software Foundation; with noInvariant Sections, with the Front-Cover texts being ``A GNUManual'', and with the Back-Cover Texts as in (a) below. A copy of thelicense is included in the section entitled ``GNU Free DocumentationLicense'' in the Emacs manual.(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modifythis GNU Manual, like GNU software. Copies published by the FreeSoftware Foundation raise funds for GNU development.''This document is part of a collection distributed under the GNU FreeDocumentation License. If you want to distribute this documentseparately from the collection, you can do so by adding a copy of thelicense to the document, as described in section 6 of the license.@end ifinfo@titlepage@title Info@subtitle The online, hyper-text GNU documentation system@author Brian Fox@author and the GNU Texinfo community@page@vskip 0pt plus 1filllCopyright @copyright{} 1989, 92, 93, 96, 97, 98, 99, 2000, 2001Free Software Foundation, Inc.@sp 2Published by the Free Software Foundation @*59 Temple Place - Suite 330 @*Boston, MA 02111-1307, USA.Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.1 orany later version published by the Free Software Foundation; with noInvariant Sections, with the Front-Cover texts being ``A GNUManual'', and with the Back-Cover Texts as in (a) below. A copy of thelicense is included in the section entitled ``GNU Free DocumentationLicense'' in the Emacs manual.(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modifythis GNU Manual, like GNU software. Copies published by the FreeSoftware Foundation raise funds for GNU development.''This document is part of a collection distributed under the GNU FreeDocumentation License. If you want to distribute this documentseparately from the collection, you can do so by adding a copy of thelicense to the document, as described in section 6 of the license.@end titlepage@ifnottex@node Top@top Info: An IntroductionInfo is a program, which you are using now, for reading documentation ofcomputer programs. The GNU Project distributes most of its on-linemanuals in the Info format, so you need a program called @dfn{Inforeader} to read the manuals. One of such programs you are using now.@ifinfoIf you are new to Info and want to learn how to use it, type thecommand @kbd{h} now. It brings you to a programmed instructionsequence.To learn advanced Info commands, type @kbd{n} twice. This brings you to@cite{Info for Experts}, skipping over the `Getting Started' chapter.@end ifinfo@end ifnottex@menu* Getting Started:: Getting started using an Info reader.* Advanced Info:: Advanced commands within Info.* Creating an Info File:: How to make your own Info file.* Index:: An index of topics, commands, and variables.@end menu@node Getting Started, Advanced Info, Top, Top@comment node-name, next, previous, up@chapter Getting StartedThis first part of the Info manual describes how to get around insideof Info. The second part of the manual describes various advancedInfo commands, and how to write an Info as distinct from a Texinfofile. The third part briefly explains how to generate Info files fromTexinfo files.@ifnotinfoThis manual is primarily designed for browsing with an Info readerprogram on a computer, so that you can try Info commands while readingabout them. Reading it on paper or with an HTML browser is lesseffective, since you must take it on faith that the commands describedreally do what the manual says. By all means go through this manualnow that you have it; but please try going through the on-line versionas well.@cindex Info reader, how to invoke@cindex entering InfoThere are two ways of looking at the online version of this manual:@enumerate@itemType @code{info} at your shell's command line. This approach uses astand-alone program designed just to read Info files.@itemType @code{emacs} at the command line; then type @kbd{C-h i}(@kbd{Control-h}, followed by @kbd{i}). This approach uses the Infomode of the Emacs program, an editor with many other capabilities.@end enumerateIn either case, then type @kbd{mInfo} (just the letters), followed by@key{RET}---the ``Return'' or ``Enter'' key. At this point, you shouldbe ready to follow the instructions in this manual as you read them onthe screen.@c FIXME! (pesch@cygnus.com, 14 dec 1992)@c Is it worth worrying about what-if the beginner goes to somebody@c else's Emacs session, which already has an Info running in the middle@c of something---in which case these simple instructions won't work?@end ifnotinfo@menu* Help-Small-Screen:: Starting Info on a Small Screen* Help:: How to use Info* Help-P:: Returning to the Previous node* Help-^L:: The Space, DEL, B and ^L commands.* Help-M:: Menus* Help-Xref:: Following cross-references* Help-Int:: Some intermediate Info commands* Help-Q:: Quitting Info@end menu@node Help-Small-Screen@section Starting Info on a Small Screen@ifnotinfo(In Info, you only see this section if your terminal has a smallnumber of lines; most readers pass by it without seeing it.)@end ifnotinfo@cindex small screen, moving aroundSince your terminal has a relatively small number of lines on itsscreen, it is necessary to give you special advice at the beginning.If you see the text @samp{--All----} near the bottom right cornerof the screen, it means the entire text you are looking at fits on thescreen. If you see @samp{--Top----} instead, it means that there ismore text below that does not fit. To move forward through the textand see another screen full, press @key{SPC}, the Space bar. To moveback up, press the key labeled @samp{Backspace} or @samp{DEL} (on somekeyboards, this key might be labeled @samp{Delete}).@ifinfoHere are 40 lines of junk, so you can try @key{SPC} and @key{DEL} andsee what they do. At the end are instructions of what you should donext.@formatThis is line 20This is line 21This is line 22This is line 23This is line 24This is line 25This is line 26This is line 27This is line 28This is line 29This is line 30This is line 31This is line 32This is line 33This is line 34This is line 35This is line 36This is line 37This is line 38This is line 39This is line 40This is line 41This is line 42This is line 43This is line 44This is line 45This is line 46This is line 47This is line 48This is line 49This is line 50This is line 51This is line 52This is line 53This is line 54This is line 55This is line 56This is line 57This is line 58This is line 59@end formatIf you have managed to get here, go back to the beginning with@kbd{DEL} (or @key{BACKSPACE}), and come back here again, then youunderstand the about the @samp{Space} and @samp{Backspace} keys. Sonow type an @kbd{n} ---just one character; don't type the quotes anddon't type the Return key afterward--- to get to the normal start ofthe course.@end ifinfo@node Help, Help-P, Help-Small-Screen, Getting Started@comment node-name, next, previous, up@section How to use InfoYou are talking to the program Info, for reading documentation.@cindex node, in Info documents Right now you are looking at one @dfn{Node} of Information.A node contains text describing a specific topic at a specificlevel of detail. This node's topic is ``how to use Info''. The modeline says that this is node @samp{Help} in the file @file{info}.@cindex header of Info node The top line of a node is its @dfn{header}. This node's header (look atit now) says that the @samp{Next} node after this one is the nodecalled @samp{Help-P}. An advanced Info command lets you go to any nodewhose name you know. In the stand-alone Info reader program, theheader line shows the names of this node and the info file as well.In Emacs, the header line is displayed in a special typeface, and itdoesn't scroll off the screen when you scroll the display. The namesof this node and of its Info file are omitted by Emacs from the headerline. Besides a @samp{Next}, a node can have a @samp{Previous} or an@samp{Up} links, or both. As you can see, this node has all of theselinks.@kindex n @r{(Info mode)} Now it is time to move on to the @samp{Next} node, named @samp{Help-P}.@format>> Type @kbd{n} to move there. Type just one character; do not type the quotes and do not type a @key{RET} afterward.@end format@noindent@samp{>>} in the margin means it is really time to try a command.@format>> If you have a mouse, and if you already practiced typing @kbd{n} to get to the next node, click now with the right mouse button on the @samp{Next} link to do the same ``the mouse way''.@end format@node Help-P, Help-^L, Help, Getting Started@comment node-name, next, previous, up@section Returning to the Previous node@kindex p @r{(Info mode)}This node is called @samp{Help-P}. The @samp{Previous} node, as you see,is @samp{Help}, which is the one you just came from using the @kbd{n}command. Another @kbd{n} command now would take you to the nextnode, @samp{Help-^L}. In Emacs, @kbd{n} runs the Emacs command@code{Info-next}, and @kbd{p} runs @code{Info-prev}.@format>> But do not type @kbd{n} yet. First, try the @kbd{p} command, or click the mouse on the @samp{Prev} link, which takes you to the @samp{Previous} node. When you get there, you can do an @kbd{n} again to return here.@end format If you read this in Emacs, you will see an @samp{Info} item in themenu bar, close to its right edge. Clicking your mouse on the@samp{Info} menu-bar item opens a menu of commands which include@samp{Next} and @samp{Prev} (and also some others which you didn't yetlearn about). This all probably seems insultingly simple so far, but @emph{do not} beled into skimming. Things will get more complicated soon. Also,do not try a new command until you are told it is time to. Otherwise,you may make Info skip past an important warning that was coming up.@format>> Now do an @kbd{n}, or click the mouse on the @samp{Next} link, to get to the node @samp{Help-^L} and learn more.@end format@node Help-^L, Help-M, Help-P, Getting Started@comment node-name, next, previous, up@section The Space, DEL, B and ^L commands. This node's mode line tells you that you are now at node @samp{Help-^L},and the header line tells you that @kbd{p} would get you back to@samp{Help-P}. The node's title is underlined; it says what the nodeis about (most nodes have titles). This is a big node and it does not all fit on your display screen.You can tell that there is more that is not visible because youcan see the string @samp{--Top-----} rather than @samp{--All----} nearthe bottom right corner of the screen.@kindex SPC @r{(Info mode)}@kindex DEL @r{(Info mode)}@kindex BACKSPACE @r{(Info mode)}@findex Info-scroll-up@findex Info-scroll-down The @key{SPC}, @key{BACKSPACE} (or @key{DEL})@footnote{The key whichwe call ``Backspace or DEL'' in this manual is labeled differently ondifferent keyboards. Look for a key which is a little ways above the@key{ENTER} or @key{RET} key and which you normally use outside Emacsto erase the character before the cursor, i.e.@: the character youtyped last. It might be labeled @samp{Backspace} or @samp{<-} or@samp{DEL}, or sometimes @samp{Delete}.} and @kbd{b} commands exist toallow you to ``move around'' in a node that does not all fit on thescreen at once. @key{SPC} moves forward, to show what was below thebottom of the screen. @key{DEL} or @key{BACKSPACE} moves backward, toshow what was above the top of the screen (there is not anything abovethe top until you have typed some spaces). In Emacs, @key{SPC} runsthe command @code{Info-scroll-up}, while @key{BACKSPACE} runs@code{Info-scroll-down}.@format>> Now try typing a @key{SPC} (afterward, type a @key{BACKSPACE} to return here).@end format When you type the @key{SPC}, the two lines that were at the bottom ofthe screen appear at the top, followed by more lines. @key{DEL} or@key{BACKSPACE} takes the two lines from the top and moves them to thebottom, @emph{usually}, but if there are not a full screen's worth oflines above them they may not make it all the way to the bottom. If you are reading this in Emacs, note that the header line isalways visible, never scrolling off the display. That way, you canalways see the @samp{Next}, @samp{Prev}, and @samp{Up} links, and youcan conveniently go to one of these links from anywhere in the node byclicking the mouse on one of these links.@cindex reading Info documents top to bottom@cindex Info documents as tutorials @key{SPC} and @key{DEL} not only move forward and backward throughthe current node. When these keys hit the beginning or the end of thecurrent node, they move to preceding or subsequent nodes.Specifically, they scroll through all the nodes in an Info file as asingle logical sequence. In this sequence, a node's subnodes appearfollowing their parent. If a node has a menu, @key{SPC} takes youinto the subnodes listed in the menu, one by one. Once you reach theend of a node, and have seen all of its subnodes, @key{SPC} takes youto the next node or to the parent's next node. This is so you couldread the entire manual top to bottom by just typing @key{SPC}.@kindex PAGEUP @r{(Info mode)}@kindex PAGEDOWN @r{(Info mode)} Many keyboards nowadays have two scroll keys labeled @samp{PageUp}and @samp{PageDown} (or maybe @samp{Prior} and @samp{Next}). If yourkeyboard has these keys, you can use them to move forward and backwardthrough the text, like with @key{SPC} and @key{BACKSPACE}. However,unlike @key{SPC} and @key{BACKSPACE}, @key{PAGEUP} and @key{PAGEDOWN}keys will never scroll beyond the beginning or the end of the currentnode.@kindex C-l @r{(Info mode)} If your screen is ever garbaged, you can tell Info to display itagain by typing @kbd{C-l} (@kbd{Control-L}, that is---hold down@key{CTRL} and type @kbd{L} or @kbd{l}).@format>> Type @kbd{C-l} now.@end format@kindex b @r{(Info mode)} To move back to the beginning of the node you are on, you can typea lot of @key{BACKSPACE} keys. You can also type simply @kbd{b} forbeginning.@format>> Try that now. (We have put in enough verbiage to push this past the first screenful, but screens are so big nowadays that perhaps it isn't enough. You may need to shrink your Emacs or Info window.) Then come back, with @key{SPS}s.@end format If your screen is very tall, all of this node might fit at once.In that case, @kbd{b} won't do anything. Sorry; what can we do?@kindex ? @r{(Info mode)}@findex Info-summary You have just learned a considerable number of commands. If youwant to use one but have trouble remembering which, you should typea @kbd{?} (in Emacs it runs the @code{Info-summary} command) whichdisplays a brief list of commands. When you are finished looking atthe list, make it go away by typing a @key{SPC} repeatedly.@format>> Type a @key{?} now. Press @key{SPC} to see consecutive screenfuls of the list until finished. Then type @key{SPC} several times, until it goes away.@end format (If you are using the stand-alone Info reader, type @kbd{C-x 0} toreturn here, that is---press and hold @key{CTRL}, type an @kbd{x},then release @key{CTRL} and @kbd{x}, and press @kbd{0}---a zero, notthe letter ``o''.) From now on, you will encounter large nodes without warning, andwill be expected to know how to use @key{SPC} and @key{BACKSPACE} tomove around in them without being told. Since not all terminals havethe same size screen, it would be impossible to warn you anyway.@format>> Now type @kbd{n}, or click the mouse on the @samp{Next} link, to see the description of the @kbd{m} command.@end format@node Help-M, Help-Xref, Help-^L, Getting Started@comment node-name, next, previous, up@section Menus and the @kbd{m} command@cindex menus in an Info document@cindex Info menus With only the @kbd{n} (next) and @kbd{p} (previous) commands formoving between nodes, nodes are restricted to a linear sequence.Menus allow a branching structure. A menu is a list of other nodesyou can move to. It is actually just part of the text of the nodeformatted specially so that Info can interpret it. The beginning of amenu is always identified by a line which starts with @samp{* Menu:}.A node contains a menu if and only if it has a line in it which startsthat way. The only menu you can use at any moment is the one in thenode you are in. To use a menu in any other node, you must move tothat node first. After the start of the menu, each line that starts with a @samp{*}identifies one subtopic. The line usually contains a brief namefor the subtopic (followed by a @samp{:}), the name of the node that talksabout that subtopic, and optionally some further description of thesubtopic. Lines in the menu that do not start with a @samp{*} have nospecial meaning---they are only for the human reader's benefit and donot define additional subtopics. Here is an example:@example* Foo: Node about FOO This tells about FOO@end exampleThe subtopic name is Foo, and the node describing it is @samp{Nodeabout FOO}. The rest of the line is just for the reader'sInformation. [[ But this line is not a real menu item, simply becausethere is no line above it which starts with @samp{* Menu:}.]] When you use a menu to go to another node (in a way that will bedescribed soon), what you specify is the subtopic name, the firstthing in the menu line. Info uses it to find the menu line, extractsthe node name from it, and goes to that node. The reason that thereis both a subtopic name and a node name is that the node name must bemeaningful to the computer and may therefore have to be ugly looking.The subtopic name can be chosen just to be convenient for the user tospecify. Often the node name is convenient for the user to specifyand so both it and the subtopic name are the same. There is anabbreviation for this:@example* Foo:: This tells about FOO@end example@noindentThis means that the subtopic name and node name are the same; they areboth @samp{Foo}.@format>> Now use @key{SPC} to find the menu in this node, then come back to the front with a @kbd{b} and some @key{SPC}s. As you see, a menu is actually visible in its node. If you cannot find a menu in a node by looking at it, then the node does not have a menu and the @kbd{m} command is not available.@end format@kindex m @r{(Info mode)} The command to go to one of the subnodes is @kbd{m}---but @emph{donot do it yet!} Before you use @kbd{m}, you need to learn aboutcommands which prompt you for more input. So far, you have learnedseveral commands that do not need additional input; when you typedone, Info processed it and was instantly ready for another command.The @kbd{m} command is different: it is incomplete without the@dfn{name of the subtopic}. Once you have typed @kbd{m}, Info triesto read the subtopic name. Now look for the line containing many dashes near the bottom of thescreen. There is one more line beneath that one, but usually it isblank. If it is empty, Info is ready for a command, such as @kbd{n}or @kbd{b} or @key{SPC} or @kbd{m}. If that line contains text endingin a colon, it means Info is trying to read more input for the lastcommand. At such times, commands do not work, because Info tries touse them as the input it needs. You must either type your response andfinish the command you started, or type @kbd{Control-g} to cancel thecommand. When you have done one of those things, the line becomesblank again.@findex Info-menu The command to go to a subnode via a menu is @kbd{m}. After you typethe @kbd{m}, the line at the bottom of the screen says @samp{Menu item: }.You must then type the name of the subtopic you want, and end it witha @key{RET}. In Emacs, @kbd{m} runs the command @code{Info-menu}.@cindex abbreviating Info subnodes You can abbreviate the subtopic name. If the abbreviation is notunique, the first matching subtopic is chosen. Some menus putthe shortest possible abbreviation for each subtopic name in capitalletters, so you can see how much you need to type. It does notmatter whether you use upper case or lower case when you type thesubtopic. You should not put any spaces at the end, or inside of theitem name, except for one space where a space appears in the item inthe menu.@cindex completion of Info node names You can also use the @dfn{completion} feature to help enter the subtopicname. If you type the @key{TAB} key after entering part of a name, it willmagically fill in more of the name---as much as follows uniquely fromwhat you have entered. If you move the cursor to one of the menu subtopic lines, then you donot need to type the argument: you just type a @key{RET}, and itstands for the subtopic of the line you are on.Here is a menu to give you a chance to practice. This menu gives youthree ways of going to one place, Help-FOO:@menu* Foo: Help-FOO. A node you can visit for fun.* Bar: Help-FOO. Strange! two ways to get to the same place.* Help-FOO:: And yet another!@end menu@format>> Now type just an @kbd{m} and see what happens:@end format Now you are ``inside'' an @kbd{m} command. Commands cannot be usednow; the next thing you will type must be the name of a subtopic. You can change your mind about doing the @kbd{m} by typing@kbd{Control-g}.@format>> Try that now; notice the bottom line clear.@end format@format>> Then type another @kbd{m}.@end format@format>> Now type @kbd{BAR}, the item name. Do not type @key{RET} yet.@end format While you are typing the item name, you can use the @key{DEL} (or@key{BACKSPACE}) key to cancel one character at a time if you make amistake.@format>> Press @key{DEL} to cancel the @samp{R}. You could type another @kbd{R} to replace it. But you do not have to, since @samp{BA} is a valid abbreviation.@end format@format>> Now you are ready to go. Type a @key{RET}.@end format After visiting @samp{Help-FOO}, you should return here. Another way to move to the menu subtopic lines and between them isto type @key{TAB}. Each time you type a @key{TAB}, you move to thenext subtopic line. To move to a previous subtopic line, type@kbd{M-@key{TAB}}---that is, press and hold the @key{META} key and thenpress @key{TAB}. (On some keyboards, the @key{META} key might be labeled@samp{Alt}.) Once you move cursor to a subtopic line, press @key{RET} to go tothat subtopic's node.@cindex mouse support in Info mode@kindex Mouse-2 @r{(Info mode)} If your terminal supports a mouse, you have yet another way of goingto a subtopic. Move your mouse pointer to the subtopic line,somewhere between the beginning @samp{*} and the colon @samp{:} whichends the subtopic's brief name. You will see the subtopic's namechange its appearance (usually, its background color will change), andthe shape of the mouse pointer will change if your platform supportsthat. After a while, if you leave the mouse on that spot, a tooltipwill pop up saying ``Mouse-2: go to that node''. (If the tooltips areturned off or unavailable, this message is displayed in the @dfn{echoarea}, the bottom screen line where you typed the menu subtopics inresponse to the prompt.) @kbd{Mouse-2} is the second button of yourmouse counting from the left---the rightmost button for two-buttonmice, the middle button for 3-button mice. So pressing @kbd{Mouse-2}while the mouse pointer is on a menu subtopic goes to that subtopic.@findex Info-mouse-follow-nearest-node More generally, @kbd{Mouse-2} in an Info buffer runs the Emacscommand @code{Info-mouse-follow-nearest-node}, which finds the nearestlink to another node and goes there. For example, near a crossreference it acts like @kbd{f}, in a menu it acts like @kbd{m}, on thenode's header line it acts like @kbd{n}, @kbd{p}, or @kbd{u}, etc. Atend of the node's text @kbd{Mouse-2} moves to the next node, or up ifthere's no next node. Here is another way to get to Help-FOO, a menu. You can ignore thisif you want, or else try it by typing @key{TAB} and then @key{RET}, orclicking @kbd{Mouse-2} on it (but then please come back to here).@menu* Help-FOO::@end menu@format>> Type @kbd{n} to see more commands.@end format@node Help-FOO, , , Help-M@subsection The @kbd{u} command Congratulations! This is the node @samp{Help-FOO}. It has an @samp{Up}pointer @samp{Help-M}, the node you just came from via the @kbd{m}command. This is the usual convention---the nodes you reach from a menuhave @samp{Up} nodes that lead back to the menu. Menus move Down in thetree, and @samp{Up} moves Up. @samp{Previous}, on the other hand, isusually used to ``stay on the same level but go backwards''.@kindex u @r{(Info mode)}@findex Info-up You can go back to the node @samp{Help-M} by typing the command@kbd{u} for ``Up'' (the Emacs command run by @kbd{u} is@code{Info-up}). That puts you at the @emph{front} of the node---toget back to where you were reading you have to type some @key{SPC}s.(Some Info readers, such as the one built into Emacs, put you at thesame place where you were reading in @samp{Help-M}.) Another way to go Up is to click on the @samp{Up} pointer shown inthe header line (provided that you have a mouse).@format>> Now type @kbd{u} to move back up to @samp{Help-M}.@end format@node Help-Xref, Help-Int, Help-M, Getting Started@comment node-name, next, previous, up@section Following Cross-References@cindex cross references in Info documents In Info documentation, you will see many @dfn{cross references}.Cross references look like this: @xref{Help-Cross, Cross}. That textis a real, live cross reference, whose name is @samp{Cross} and whichpoints to the node named @samp{Help-Cross}.@kindex f @r{(Info mode)}@findex Info-follow-reference There are two ways to follow a cross reference. You can move thecursor to it and press @key{RET}, just as in a menu. @key{RET}follows the cross reference that the cursor is on. Or you can type@kbd{f} and then specify the name of the cross reference (in thiscase, @samp{Cross}) as an argument. In Emacs Info, @kbd{f} runs@code{Info-follow-reference}, In the @kbd{f} command, you select the cross reference with itsname, so it does not matter where the cursor was. If the cursor is onor near a cross reference, @kbd{f} suggests that reference name inparentheses as the default; typing @key{RET} will follow thatreference. However, if you type a different reference name, @kbd{f}will follow the other reference which has that name.@format>> Type @kbd{f}, followed by @kbd{Cross}, and then @key{RET}.@end format As you enter the reference name, you can use the @key{DEL} (or@key{BACKSPACE}) key to edit your input. If you change your mindabout following any reference, you can use @kbd{Control-g} to cancelthe command. Completion is available in the @kbd{f} command; you cancomplete among all the cross reference names in the current node bytyping a @key{TAB}. To get a list of all the cross references in the current node, youcan type @kbd{?} after an @kbd{f}. The @kbd{f} continues to await across reference name even after displaying the list, so if you don'tactually want to follow a reference, you should type a @kbd{Control-g}to cancel the @kbd{f}.@format>> Type @kbd{f?} to get a list of the cross references in this node. Then type a @kbd{Control-g} and see how the @samp{f} gives up.@end format The @key{TAB} and @kbd{M-@key{TAB}} key, which move between menuitems in a menu, also move between cross references outside of menus.@node Help-Int, Help-Q, Help-Xref, Getting Started@comment node-name, next, previous, up@section Some intermediate Info commands The introductory course is almost over; please continuea little longer to learn some intermediate-level commands. Most Info files have an index, which is actually a large node thatcontains nothing but a menu. The menu has one menu item for eachtopic listed in the index. You can find the index node from the mainmenu of the file, with the @kbd{m} command; then you can use the@kbd{m} command again in the index node to go to the node thatdescribes the topic. There is also a short-cut Info command, @kbd{i}, which does all ofthat for you. It searches the index for a given topic (a string) andgoes to the node which is listed in the index for that topic.@xref{Info Search}, for a full explanation.@kindex l @r{(Info mode)}@findex Info-last@cindex going back in Info mode If you have been moving around to different nodes and wish toretrace your steps, the @kbd{l} command (@kbd{l} for @dfn{last}) willdo that, one node-step at a time. As you move from node to node, Inforecords the nodes where you have been in a special history list. The@kbd{l} command revisits nodes in the history list; each successive@kbd{l} command moves one step back through the history. If you have been following directions, ad @kbd{l} command now will getyou back to @samp{Help-M}. Another @kbd{l} command would undo the@kbd{u} and get you back to @samp{Help-FOO}. Another @kbd{l} would undothe @kbd{m} and get you back to @samp{Help-M}. In Emacs, @kbd{l} runs the command @code{Info-last}.@format>> Try typing three @kbd{l}'s, pausing in between to see what each @kbd{l} does. Then follow directions again and you will end up back here.@end format Note the difference between @kbd{l} and @kbd{p}: @kbd{l} moves towhere @emph{you} last were, whereas @kbd{p} always moves to the nodewhich the header says is the @samp{Previous} node (from this node, the@samp{Prev} link leads to @samp{Help-M}).@kindex d @r{(Info mode)}@findex Info-directory@cindex go to Directory node The @kbd{d} command (@code{Info-directory} in Emacs) gets youinstantly to the Directory node. This node, which is the first oneyou saw when you entered Info, has a menu which leads (directly orindirectly, through other menus), to all the nodes that exist. TheDirectory node lists all the manuals and other Info documents thatare, or could be, installed on your system.@format>> Try doing a @kbd{d}, then do an @kbd{l} to return here (yes, @emph{do} return).@end format@kindex t @r{(Info mode)}@findex Info-top-node@cindex go to Top node The @kbd{t} command moves to the @samp{Top} node of the manual.This is useful if you want to browse the manual's main menu, or selectsome specific top-level menu item. The Emacs command run by @kbd{t}is @code{Info-top-node}. Clicking @kbd{Mouse-2} on or near a cross reference also follows thereference. You can see that the cross reference is mouse-sensitive bymoving the mouse pointer to the reference and watching how theunderlying text and the mouse pointer change in response.@format>> Now type @kbd{n} to see the last node of the course.@end format @xref{Advanced Info}, for more advanced Info features.@c If a menu appears at the end of this node, remove it.@c It is an accident of the menu updating command.@node Advanced Info@chapter Info for Experts This chapter describes various advanced Info commands. (If you areusing a stand-alone Info reader, there are additional commandsspecific to it, which are documented in several chapters of @ref{Top,,GNU Info, info-stnd, GNU Info}.) This chapter also explains how to write an Info as distinct from aTexinfo file. (However, in most cases, writing a Texinfo file isbetter, since you can use it @emph{both} to generate an Info file andto make a printed manual. @xref{Top,, Overview of Texinfo, texinfo,Texinfo: The GNU Documentation Format}.)@menu* Expert:: Advanced Info commands: g, s, e, and 1 - 5.* Info Search:: How to search Info documents for specific subjects.* Add:: Describes how to add new nodes to the hierarchy. Also tells what nodes look like.* Menus:: How to add to or create menus in Info nodes.* Cross-refs:: How to add cross-references to Info nodes.* Tags:: How to make tags tables for Info files.* Checking:: Checking an Info File* Emacs Info Variables:: Variables modifying the behavior of Emacs Info.@end menu@node Expert, Info Search, , Advanced Info@comment node-name, next, previous, up@section Advanced Info CommandsHere are some more Info commands that make it easier to move around.@unnumberedsubsec @kbd{g} goes to a node by name@kindex g @r{(Info mode)}@findex Info-goto-node@cindex go to a node by name If you know a node's name, you can go there by typing @kbd{g}, thename, and @key{RET}. Thus, @kbd{gTop@key{RET}} would go to the nodecalled @samp{Top} in this file. (This is equivalent to @kbd{t}, see@ref{Help-Int}.) @kbd{gExpert@key{RET}} would come back here.@kbd{g} in Emacs runs the command @code{Info-goto-node}. Unlike @kbd{m}, @kbd{g} does not allow the use of abbreviations.But it does allow completion, so you can type @key{TAB} to complete apartial node name.@cindex go to another Info file To go to a node in another file, you can include the file name in thenode name by putting it at the front, in parentheses. Thus,@kbd{g(dir)Top@key{RET}} would go to the Info Directory node, which isthe node @samp{Top} in the Info file @file{dir}. Likewise,@kbd{g(emacs)Top@key{RET}} goes to the top node of the Emacs manual. The node name @samp{*} specifies the whole file. So you can look atall of the current file by typing @kbd{g*@key{RET}} or all of anyother file with @kbd{g(@var{filename})@key{RET}}.@unnumberedsubsec @kbd{1} -- @kbd{9} choose a menu subtopic by its number@kindex 1 @r{through} 9 @r{(Info mode)}@findex Info-nth-menu-item@cindex select @var{n}'th menu item If you begrudge each character of type-in which your system requires,you might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4},@dots{}, @kbd{9}. They are short for the @kbd{m} command togetherwith a name of a menu subtopic. @kbd{1} goes through the first itemin the current node's menu; @kbd{2} goes through the second item, etc.In the stand-alone reader, @kbd{0} goes through the last menu item;this is so you need not count how many entries are there. In Emacs,the digit keys run the command @code{Info-nth-menu-item}. If your display supports multiple fonts, and you are using Emacs'Info mode to read Info files, the @samp{*} for the fifth menu itemstands out, either in color or in some other attribute, such asunderline, and so is the @samp{*} for the ninth item; this makes iteasy to see at a glance which number to use for an item. Some terminals don't support colors or underlining. If you need toactually count items, it is better to use @kbd{m} instead, and specifythe name, or use @key{TAB} to quickly move between menu items.@unnumberedsubsec @kbd{e} makes Info document editable@kindex e @r{(Info mode)}@findex Info-edit@cindex edit Info document The Info command @kbd{e} changes from Info mode to an ordinaryEmacs editing mode, so that you can edit the text of the current node.Type @kbd{C-c C-c} to switch back to Info. The @kbd{e} command is allowedonly if the variable @code{Info-enable-edit} is non-@code{nil}. The @kbd{e} command only works in Emacs, where it runs the command@code{Info-edit}. The stand-alone Info reader doesn't allow you toedit the Info file, so typing @kbd{e} there goes to the end of thecurrent node.@node Info Search, Add, Expert, Advanced Info@comment node-name, next, previous, up@section How to search Info documents for specific subjects@cindex searching Info documents@cindex Info document as a reference The commands which move between and inside nodes allow you to readthe entire manual or its large portions. But what if you need to findsome information in the manual as fast as you can, and you don't knowor don't remember in what node to look for it? This need arises whenyou use a manual as a @dfn{reference}, or when it is impractical toread the entire manual before you start using the programs itdescribes. Info has powerful searching facilities that let you find thingsquickly. You can search either the manual indices or its text.@kindex i @r{(Info mode)}@findex Info-index Since most subjects related to what the manual describes should beindexed, you should try the index search first. The @kbd{i} commandprompts you for a subject and then looks up that subject in theindices. If it finds an index entry with the subject you typed, itgoes to the node to which that index entry points. You should browsethrough that node to see whether the issue you are looking for isdescribed there. If it isn't, type @kbd{,} one or more times to gothrough additional index entries which match your subject. The @kbd{i} command finds all index entries which include the stringyou typed @emph{as a substring}. For each match, Info shows in theecho area the full index entry it found. Often, the text of the fullindex entry already gives you enough information to decide whether itis relevant to what you are looking for, so we recommend that you readwhat Emacs shows in the echo are before looking at the node itdisplays. Since @kbd{i} looks for a substring, you can search for subjects evenif you are not sure how they are spelled in the index. For example,suppose you want to find something that is pertinent to commands whichcomplete partial input (e.g., when you type @key{TAB}). If you wantto catch index entries that refer to ``complete'', ``completion'', and``completing'', you could type @kbd{icomplet@key{RET}}. Info documents which describe programs should index the commands,options, and key sequences that the program provides. If you arelooking for a description of a command, an option, or a key, just typetheir names when @kbd{i} prompts you for a topic. For example, if youwant to read the description of what the @kbd{C-f} key does, type@kbd{iC-f@key{RET}}. Here @kbd{C-f} are 3 literal characters@samp{C}, @samp{-}, and @samp{f}, not the ``Control-f'' command keyyou type inside Emacs to run the command bound to @kbd{C-f}. In Emacs, @kbd{i} runs the command @code{Info-index}.@kindex s @r{(Info mode)}@findex Info-search The @kbd{s} command allows you to search a whole file for a string.It switches to the next node if and when that is necessary. Youtype @kbd{s} followed by the string to search for, terminated by@key{RET}. To search for the same string again, just @kbd{s} followedby @key{RET} will do. The file's nodes are scanned in the orderthey are in in the file, which has no necessary relationship to theorder that they may be in the tree structure of menus and @samp{next}pointers. But normally the two orders are not very different. In anycase, you can always do a @kbd{b} to find out what node you havereached, if the header is not visible (this can happen, because @kbd{s}puts your cursor at the occurrence of the string, not at the beginningof the node).@kindex M-s @r{(Info mode)} In Emacs, @kbd{Meta-s} is equivalent to @kbd{s}. That is forcompatibility with other GNU packages that use @kbd{M-s} for a similarkind of search command. Both @kbd{s} and @kbd{M-s} run in Emacs thecommand @code{Info-search}.@node Add, Menus, Info Search, Advanced Info@comment node-name, next, previous, up@section Adding a new node to InfoTo add a new topic to the list in the Info directory, you must:@enumerate@itemCreate some nodes, in some file, to document that topic.@itemPut that topic in the menu in the directory. @xref{Menus, Menu}.@end enumerate Usually, the way to create the nodes is with Texinfo (@pxref{Top,,Overview of Texinfo, texinfo, Texinfo: The GNU Documentation Format});this has the advantage that you can also make a printed manual fromthem. However, if you want to edit an Info file, here is how.@cindex node delimiters The new node can live in an existing documentation file, or in a newone. It must have a @samp{^_} character before it (invisible to theuser; this node has one but you cannot see it), and it ends with eithera @samp{^_}, a @samp{^L} (``formfeed''), or the end of file.@footnote{Ifyou put in a @samp{^L} to end a new node, be sure that there is a@samp{^_} after it to start the next one, since @samp{^L} cannot@emph{start} a node. Also, a nicer way to make a node boundary be apage boundary as well is to put a @samp{^L} @emph{right after} the@samp{^_}.} The @samp{^_} starting a node must be followed by a newline or a@samp{^L} newline, after which comes the node's header line. The headerline must give the node's name (by which Info finds it), and state thenames of the @samp{Next}, @samp{Previous}, and @samp{Up} nodes (if thereare any). As you can see, this node's @samp{Up} node is the node@samp{Top}, which points at all the documentation for Info. The@samp{Next} node is @samp{Menus}.@cindex node header line format@cindex format of node headers The keywords @dfn{Node}, @dfn{Next}, @dfn{Previous}, and @dfn{Up}may appear in any order, anywhere in the header line, but therecommended order is the one in this sentence. Each keyword must befollowed by a colon, spaces and tabs, and then the appropriate name.The name may be terminated with a tab, a comma, or a newline. A spacedoes not end it; node names may contain spaces. The case of lettersin the names is insignificant.@cindex node name format@cindex Directory node A node name has two forms. A node in the current file is named bywhat appears after the @samp{Node: } in that node's first line. Forexample, this node's name is @samp{Add}. A node in another file isnamed by @samp{(@var{filename})@var{node-within-file}}, as in@samp{(info)Add} for this node. If the file name starts with ``./'',then it is relative to the current directory; otherwise, it isrelative starting from the standard directory for Info files of yoursite. The name @samp{(@var{filename})Top} can be abbreviated to just@samp{(@var{filename})}. By convention, the name @samp{Top} is usedfor the ``highest'' node in any single file---the node whose @samp{Up}points out of the file. The @samp{Directory} node is @file{(dir)}, itpoints to a file @file{dir} which holds a large menu listing all theInfo documents installed on your site. The @samp{Top} node of adocument file listed in the @samp{Directory} should have an @samp{Up:(dir)} in it.@cindex unstructured documents The node name @kbd{*} is special: it refers to the entire file.Thus, @kbd{g*} shows you the whole current file. The use of thenode @kbd{*} is to make it possible to make old-fashioned,unstructured files into nodes of the tree. The @samp{Node:} name, in which a node states its own name, must notcontain a file name, since when Info searches for a node, it does notexpect a file name to be there. The @samp{Next}, @samp{Previous} and@samp{Up} names may contain them. In this node, since the @samp{Up}node is in the same file, it was not necessary to use one. Note that the nodes in this file have a file name in the headerline. The file names are ignored by Info, but they serve as commentsto help identify the node for the user.@node Menus, Cross-refs, Add, Advanced Info@comment node-name, next, previous, up@section How to Create Menus Any node in the Info hierarchy may have a @dfn{menu}---a list of subnodes.The @kbd{m} command searches the current node's menu for the topic which itreads from the terminal.@cindex menu and menu entry format A menu begins with a line starting with @samp{* Menu:}. The rest of theline is a comment. After the starting line, every line that beginswith a @samp{* } lists a single topic. The name of the topic--whatthe user must type at the @kbd{m}'s command prompt to select thistopic---comes right after the star and space, and is followed by acolon, spaces and tabs, and the name of the node which discusses thattopic. The node name, like node names following @samp{Next}, @samp{Previous}and @samp{Up}, may be terminated with a tab, comma, or newline; it may alsobe terminated with a period. If the node name and topic name are the same, then rather thangiving the name twice, the abbreviation @samp{* @var{name}::} may beused (and should be used, whenever possible, as it reduces the visualclutter in the menu). It is considerate to choose the topic names so that they differfrom each other very near the beginning---this allows the user to typeshort abbreviations. In a long menu, it is a good idea to capitalizethe beginning of each item name which is the minimum acceptableabbreviation for it (a long menu is more than 5 or so entries). The nodes listed in a node's menu are called its ``subnodes'', and itis their ``superior''. They should each have an @samp{Up:} pointing atthe superior. It is often useful to arrange all or most of the subnodesin a sequence of @samp{Next} and @samp{Previous} pointers so thatsomeone who wants to see them all need not keep revisiting the Menu. The Info Directory is simply the menu of the node @samp{(dir)Top}---thatis, node @samp{Top} in file @file{.../info/dir}. You can put new entriesin that menu just like any other menu. The Info Directory is @emph{not} thesame as the file directory called @file{info}. It happens that many ofInfo's files live in that file directory, but they do not have to; andfiles in that directory are not automatically listed in the InfoDirectory node. Also, although the Info node graph is claimed to be a ``hierarchy'',in fact it can be @emph{any} directed graph. Shared structures andpointer cycles are perfectly possible, and can be used if they areappropriate to the meaning to be expressed. There is no need for allthe nodes in a file to form a connected structure. In fact, this filehas two connected components. You are in one of them, which is underthe node @samp{Top}; the other contains the node @samp{Help} which the@kbd{h} command goes to. In fact, since there is no garbagecollector, nothing terrible happens if a substructure is not pointedto, but such a substructure is rather useless since nobody canever find out that it exists.@node Cross-refs, Tags, Menus, Advanced Info@comment node-name, next, previous, up@section Creating Cross References@cindex cross reference format A cross reference can be placed anywhere in the text, unlike a menuitem which must go at the front of a line. A cross reference lookslike a menu item except that it has @samp{*note} instead of @samp{*}.It @emph{cannot} be terminated by a @samp{)}, because @samp{)}'s areso often part of node names. If you wish to enclose a cross referencein parentheses, terminate it with a period first. Here are twoexamples of cross references pointers:@example*Note details: commands. (See *note 3: Full Proof.)@end example@noindent@emph{These are just examples.} The places they ``lead to'' do notreally exist!@menu* Help-Cross:: Target of a cross-reference.@end menu@node Help-Cross, , , Cross-refs@subsection The node reached by the cross reference in Info This is the node reached by the cross reference named @samp{Cross}. While this node is specifically intended to be reached by a crossreference, most cross references lead to nodes that ``belong''someplace else far away in the structure of an Info document. So youcannot expect this node to have a @samp{Next}, @samp{Previous} or@samp{Up} links pointing back to where you came from. In general, the@kbd{l} (el) command is the only way to get back there.@format>> Type @kbd{l} to return to the node where the cross reference was.@end format@node Help-Q, , Help-Int, Getting Started@comment node-name, next, previous, up@section Quitting Info@kindex q @r{(Info mode)}@findex Info-exit@cindex quitting Info mode To get out of Info, back to what you were doing before, type @kbd{q}for @dfn{Quit}. This runs @code{Info-exit} in Emacs. This is the end of the basic course on using Info. You have learnedhow to move in an Info document, and how to follow menus and crossreferences. This makes you ready for reading manuals top to bottom,as new users should do when they learn a new package. Another set of Info commands is useful when you need to findsomething quickly in a manual---that is, when you need to use a manualas a reference rather than as a tutorial. We urge you to make learnthese search commands as well. If you want to do that now, follow thiscross reference to @ref{Info Search}.Yet another set of commands are meant for experienced users; you canfind them by looking in the Directory node for documentation on Info.Finding them will be a good exercise in using Info in the usualmanner.@format>> Type @kbd{d} to go to the Info directory node; then type @kbd{mInfo} and Return, to get to the node about Info and see what other help is available.@end format@node Tags, Checking, Cross-refs, Advanced Info@comment node-name, next, previous, up@section Tags Tables for Info Files@cindex tags tables in info files You can speed up the access to nodes of a large Info file by givingit a tags table. Unlike the tags table for a program, the tags table foran Info file lives inside the file itself and is usedautomatically whenever Info reads in the file.@findex Info-tagify To make a tags table, go to a node in the file using Emacs Info mode and type@kbd{M-x Info-tagify}. Then you must use @kbd{C-x C-s} to save thefile. Info files produced by the @code{makeinfo} command that is partof the Texinfo package always have tags tables to begin with.@cindex stale tags tables@cindex update Info tags table Once the Info file has a tags table, you must make certain it is upto date. If you edit an Info file directly (as opposed to editing itsTexinfo source), and, as a result of deletion of text, any node moves backmore than a thousand characters in the file from the positionrecorded in the tags table, Info will no longer be able to find thatnode. To update the tags table, use the @code{Info-tagify} commandagain. An Info file tags table appears at the end of the file and looks likethis:@example^_^LTag Table:File: info, Node: Cross-refs^?21419File: info, Node: Tags^?22145^_End Tag Table@end example@noindentNote that it contains one line per node, and this line containsthe beginning of the node's header (ending just after the node name),a @samp{DEL} character, and the character position in the file of thebeginning of the node.@node Checking, Emacs Info Variables, Tags, Advanced Info@section Checking an Info FileWhen creating an Info file, it is easy to forget the name of a node whenyou are making a pointer to it from another node. If you put in thewrong name for a node, this is not detected until someone tries to gothrough the pointer using Info. Verification of the Info file is anautomatic process which checks all pointers to nodes and reports anypointers which are invalid. Every @samp{Next}, @samp{Previous}, and@samp{Up} is checked, as is every menu item and every cross reference. Inaddition, any @samp{Next} which does not have a @samp{Previous} pointingback is reported. Only pointers within the file are checked, becausechecking pointers to other files would be terribly slow. But those areusually few.@findex Info-validateTo check an Info file, do @kbd{M-x Info-validate} while looking at anynode of the file with Emacs Info mode.@node Emacs Info Variables, , Checking, Advanced Info@section Emacs Info-mode VariablesThe following variables may modify the behavior of Info-mode in Emacs;you may wish to set one or several of these variables interactively, orin your @file{~/.emacs} init file. @xref{Examining, Examining and SettingVariables, Examining and Setting Variables, emacs, The GNU EmacsManual}. The stand-alone Info reader program has its own set ofvariables, described in @ref{Variables,, Manipulating Variables,info-stnd, GNU Info}.@vtable @code@item Info-directory-listThe list of directories to search for Info files. Each element is astring (directory name) or @code{nil} (try default directory). If notinitialized Info uses the environment variable @env{INFOPATH} toinitialize it, or @code{Info-default-directory-list} if there is no@env{INFOPATH} variable in the environment.@item Info-additional-directory-listA list of additional directories to search for Info documentation files.These directories are not searched for merging the @file{dir} file.@item Info-fontifyWhen set to a non-@code{nil} value, enables highlighting of Infofiles. The default is @code{t}. You can change how the highlightinglooks by customizing the faces @code{info-node}, @code{info-menu-5},@code{info-xref}, @code{info-header-xref}, @code{info-header-node},@code{info-title-@var{n}-face} (where @var{n} is the level of thesection, a number between 1 and 4), and @code{info-menu-header}. Tocustomize a face, type @kbd{M-x customize-face @key{RET} @var{face}@key{RET}}, where @var{face} is one of the face names listed here.@item Info-use-header-lineIf non-@code{nil}, Emacs puts in the Info buffer a header line showingthe @samp{Next}, @samp{Prev}, and @samp{Up} links. A header line doesnot scroll with the rest of the buffer, making these links alwaysvisible.@item Info-scroll-prefer-subnodesIf set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or@key{DEL}) keys in a menu visit subnodes of the current node beforescrolling to its end or beginning, respectively. For example, if thenode's menu appears on the screen, the next @key{SPC} moves to asubnode indicated by the following menu item. Setting this option to@code{nil} results in behavior similar to the stand-alone Info readerprogram, which visits the first subnode from the menu only when youhit the end of the current node. The default is @code{t}.@item Info-enable-active-nodesWhen set to a non-@code{nil} value, allows Info to execute Lisp codeassociated with nodes. The Lisp code is executed when the node isselected. The Lisp code to be executed should follow the nodedelimiter (the @samp{DEL} character) and an @samp{execute: } tag, likethis:@example^_execute: (message "This is an active node!")@end example@item Info-enable-editSet to @code{nil}, disables the @samp{e} (@code{Info-edit}) command. Anon-@code{nil} value enables it. @xref{Add, Edit}.@end vtable@node Creating an Info File@chapter Creating an Info File from a Texinfo File@code{makeinfo} is a utility that converts a Texinfo file into an Infofile; @code{texinfo-format-region} and @code{texinfo-format-buffer} areGNU Emacs functions that do the same.@xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNUDocumentation Format}, to learn how to write a Texinfo file.@xref{Creating an Info File,,, texinfo, Texinfo: The GNU DocumentationFormat}, to learn how to create an Info file from a Texinfo file.@xref{Installing an Info File,,, texinfo, Texinfo: The GNUDocumentation Format}, to learn how to install an Info file after youhave created one.@node Index@unnumbered IndexThis is an alphabetical listing of all the commands, variables, andtopics discussed in this document.@printindex cp@bye