JezK
Edit File: Updating-Commands.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- This manual is for GNU Texinfo (version 6.8, 8 June 2021), a documentation system that can produce both online information and a printed manual from a single source using semantic markup. Copyright (C) 1988, 1990-1993, 1995-1999, 2001-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". --> <title>Updating Commands (GNU Texinfo 6.8)</title> <meta name="description" content="Updating Commands (GNU Texinfo 6.8)"> <meta name="keywords" content="Updating Commands (GNU Texinfo 6.8)"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="texi2any"> <meta name="viewport" content="width=device-width,initial-scale=1"> <link href="index.html" rel="start" title="Top"> <link href="Command-and-Variable-Index.html" rel="index" title="Command and Variable Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Updating-Nodes-and-Menus.html" rel="up" title="Updating Nodes and Menus"> <link href="Updating-Requirements.html" rel="next" title="Updating Requirements"> <style type="text/css"> <!-- a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em} a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} kbd {font-style: oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} span.nolinebreak {white-space: nowrap} span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} span:hover a.copiable-anchor {visibility: visible} ul.no-bullet {list-style: none} --> </style> </head> <body lang="en"> <div class="subsection" id="Updating-Commands"> <div class="header"> <p> Next: <a href="Updating-Requirements.html" accesskey="n" rel="next">Updating Requirements</a>, Up: <a href="Updating-Nodes-and-Menus.html" accesskey="u" rel="up">Updating Nodes and Menus</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p> </div> <hr> <span id="The-Updating-Commands"></span><h4 class="subsection">D.5.1 The Updating Commands</h4> <p>You can use the updating commands to: </p> <ul> <li> insert or update the ‘Next’, ‘Previous’, and ‘Up’ pointers of a node, </li><li> insert or update the menu for a section, and </li><li> create a master menu for a Texinfo source file. </li></ul> <p>You can also use the commands to update all the nodes and menus in a region or in a whole Texinfo file. </p> <p>The updating commands work only with conventional Texinfo files, which are structured hierarchically like books. In such files, a structuring command line must follow closely after each <code>@node</code> line, except for the ‘Top’ <code>@node</code> line. (A <em>structuring command line</em> is a line beginning with <code>@chapter</code>, <code>@section</code>, or other similar command.) </p> <p>You can write the structuring command line on the line that follows immediately after an <code>@node</code> line or else on the line that follows after a single <code>@comment</code> line or a single <code>@ifinfo</code> line. You cannot interpose more than one line between the <code>@node</code> line and the structuring command line; and you may interpose only a <code>@comment</code> line or an <code>@ifinfo</code> line. </p> <p>Commands which work on a whole buffer require that the ‘Top’ node be followed by a node with a <code>@chapter</code> or equivalent-level command. The menu updating commands will not create a main or master menu for a Texinfo file that has only <code>@chapter</code>-level nodes! The menu updating commands only create menus <em>within</em> nodes for lower level nodes. To create a menu of chapters, you must provide a ‘Top’ node. </p> <p>The menu updating commands remove menu entries that refer to other Info files since they do not refer to nodes within the current buffer. This is a deficiency. Rather than use menu entries, you can use cross references to refer to other Info files. None of the updating commands affect cross-references. </p> <p>Texinfo mode has five updating commands that are used most often: two are for updating the node pointers or menu of a single node (or a region); two are for updating every node pointer and menu in a file; and one, the <code>texinfo-master-menu</code> command, is for creating a master menu for a complete file, and optionally, for updating every node and menu in the whole Texinfo file. </p> <p>The <code>texinfo-master-menu</code> command is the primary command: </p> <dl compact="compact"> <dt id='index-texinfo_002dmaster_002dmenu'><span><kbd>C-c C-u m</kbd><a href='#index-texinfo_002dmaster_002dmenu' class='copiable-anchor'> ¶</a></span></dt> <dt><span><kbd>M-x texinfo-master-menu</kbd></span></dt> <dd><p>Create or update a master menu that includes all the other menus (incorporating the descriptions from pre-existing menus, if any). </p> <p>With an argument (prefix argument, <kbd>C-u,</kbd> if interactive), first create or update all the nodes and all the regular menus in the buffer before constructing the master menu. (See <a href="The-Top-Node.html">The Top Node and Master Menu</a>, for more about a master menu.) </p> <p>For <code>texinfo-master-menu</code> to work, the Texinfo file must have a ‘Top’ node and at least one subsequent node. </p> <p>After extensively editing a Texinfo file, you can type the following: </p> <div class="example"> <pre class="example">C-u M-x texinfo-master-menu </pre><pre class="example">or </pre><pre class="example">C-u C-c C-u m </pre></div> <p>This updates all the nodes and menus completely and all at once. </p></dd> </dl> <p>The other major updating commands do smaller jobs and are designed for the person who updates nodes and menus as he or she writes a Texinfo file. </p> <p>The commands are: </p> <dl compact="compact"> <dt id='index-texinfo_002dupdate_002dnode'><span><kbd>C-c C-u C-n</kbd><a href='#index-texinfo_002dupdate_002dnode' class='copiable-anchor'> ¶</a></span></dt> <dt><span><kbd>M-x texinfo-update-node</kbd></span></dt> <dd><p>Insert the ‘Next’, ‘Previous’, and ‘Up’ pointers for the node that point is within (i.e., for the <code>@node</code> line preceding point). If the <code>@node</code> line has pre-existing ‘Next’, ‘Previous’, or ‘Up’ pointers in it, the old pointers are removed and new ones inserted. With an argument (prefix argument, <kbd>C-u</kbd>, if interactive), this command updates all <code>@node</code> lines in the region (which is the text between point and mark). </p> </dd> <dt id='index-texinfo_002dmake_002dmenu'><span><kbd>C-c C-u C-m</kbd><a href='#index-texinfo_002dmake_002dmenu' class='copiable-anchor'> ¶</a></span></dt> <dt><span><kbd>M-x texinfo-make-menu</kbd></span></dt> <dd><p>Create or update the menu in the node that point is within. With an argument (<kbd>C-u</kbd> as prefix argument, if interactive), the command makes or updates menus for the nodes which are either within or a part of the region. </p> <p>Whenever <code>texinfo-make-menu</code> updates an existing menu, the descriptions from that menu are incorporated into the new menu. This is done by copying descriptions from the existing menu to the entries in the new menu that have the same node names. If the node names are different, the descriptions are not copied to the new menu. </p> </dd> <dt id='index-texinfo_002devery_002dnode_002dupdate'><span><kbd>C-c C-u C-e</kbd><a href='#index-texinfo_002devery_002dnode_002dupdate' class='copiable-anchor'> ¶</a></span></dt> <dt><span><kbd>M-x texinfo-every-node-update</kbd></span></dt> <dd><p>Insert or update the ‘Next’, ‘Previous’, and ‘Up’ pointers for every node in the buffer. </p> </dd> <dt id='index-texinfo_002dall_002dmenus_002dupdate'><span><kbd>C-c C-u C-a</kbd><a href='#index-texinfo_002dall_002dmenus_002dupdate' class='copiable-anchor'> ¶</a></span></dt> <dt><span><kbd>M-x texinfo-all-menus-update</kbd></span></dt> <dd><p>Create or update all the menus in the buffer. With an argument (<kbd>C-u</kbd> as prefix argument, if interactive), first insert or update all the node pointers before working on the menus. </p> <p>If a master menu exists, the <code>texinfo-all-menus-update</code> command updates it; but the command does not create a new master menu if none already exists. (Use the <code>texinfo-master-menu</code> command for that.) </p> <p>When working on a document that does not merit a master menu, you can type the following: </p> <div class="example"> <pre class="example">C-u C-c C-u C-a </pre><pre class="example">or </pre><pre class="example">C-u M-x texinfo-all-menus-update </pre></div> <p>This updates all the nodes and menus. </p></dd> </dl> <p>The <code>texinfo-column-for-description</code> variable specifies the column to which menu descriptions are indented. By default, the value is 32 although it can be useful to reduce it to as low as 24. You can set the variable via customization (see <a data-manual="emacs" href="../emacs/Customization.html#Customization">Customization</a> in <cite>The GNU Emacs Manual</cite>) or with the <kbd>M-x set-variable</kbd> command (see <a data-manual="emacs" href="../emacs/Examining.html#Examining">Examining and Setting Variables</a> in <cite>The GNU Emacs Manual</cite>). </p> <p>Also, the <code>texinfo-indent-menu-description</code> command may be used to indent existing menu descriptions to a specified column. Finally, if you wish, you can use the <code>texinfo-insert-node-lines</code> command to insert missing <code>@node</code> lines into a file. (See <a href="Other-Updating-Commands.html">Other Updating Commands</a>, for more information.) </p> </div> <hr> <div class="header"> <p> Next: <a href="Updating-Requirements.html">Updating Requirements</a>, Up: <a href="Updating-Nodes-and-Menus.html">Updating Nodes and Menus</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p> </div> </body> </html>