On Tue, Apr 21, 2026 at 03:19:17PM +0300, Eli Zaretskii wrote:
> This was reported by an Emacs user (see
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=80736): when generating
> info.info from info.texi using the latest makeinfo 7.3, one gets the
> following warnings:
> 
>   info.texi:462: warning: unexpected node `Help-]' in menu
>   info.texi:624: warning: unexpected node `Help-FOO' in menu
> 
> I see nothing problematic in these two menus, the only aspect that
> could be considered "unusual" is that both menus have several entries
> that point to the same node.  But that is completely legit, AFAIK, so
> why does makeinfo emit a warning?  And if this warning is inevitable,
> is there any way to avoid it?
> 
> Thanks.
> 

The warning can be turned off by setting CHECK_NORMAL_MENU_STRUCTURE to 0,
running texi2any like:

$ texi2any -c CHECK_NORMAL_MENU_STRUCTURE=0 info.texi

You can also eliminate the warning by making the nodes in question their
own Next nodes, but this is inappropriate for the text in Help-], which
says that the node doesn't have a Next node at all:

$ diff -u info.texi info-B.texi
--- info.texi   2026-04-21 21:16:05.781777437 +0100
+++ info-B.texi 2026-04-21 21:23:45.382890583 +0100
@@ -463,7 +463,7 @@
 * Help-]::                         Yet again, same node.
 @end menu
 
-@node Help-], , , Help-Inv
+@node Help-], Help-], , Help-Inv
 @subsection The @kbd{]} and @kbd{[} commands
 
 If you type @kbd{n} now, you get an error message saying that this
@@ -708,7 +708,7 @@
 >> Type @kbd{n} to see more commands.
 @end format
 
-@node Help-FOO,  ,  , Help-M
+@node Help-FOO,  Help-FOO,  , Help-M
 @subsection The @kbd{u} command
 
   Congratulations!  This is the node @samp{Help-FOO}.  It has an @samp{Up}

In the 7.2 release, CHECK_NORMAL_MENU_STRUCTURE was turned on by default,
after having been off by default since 6.8.  Users had complained that
malformed menus were not being detected by texi2any.

For the 7.3 release, I significantly changed the warning messages for
menus under CHECK_NORMAL_MENU_STRUCTURE in attempt to make them less
verbose and easier to understand.  It's possible that some constructs,
as in info.texi, are warned about that weren't warned about before.

The new code loops through a menu checking to see if each menu entry
is what is expected based on the previous menu entry.  Both the next
node at the same sectioning level (e.g. the next section within a chapter),
and a node referenced as the Next pointer, are accepted.

(This check is done in check_node_tree_menu_structure in
tta/perl/Texinfo/StructuringNonXS.pm - and corresponding C code).



Reply via email to