> From: Gavin Smith <[email protected]>
> Date: Tue, 21 Apr 2026 21:33:15 +0100
> Cc: [email protected]
> 
> >   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

Thanks, but that is an instrument that's too blunt.  It disables too
many other valid checks.  Any chance for a flag that only disables
this warning if nodes are repeated in a menu?  We have
CHECK_MISSING_MENU_ENTRY, why not CHECK_REPEATED_MENU_ENTRIES or
somesuch?

Btw, can these variables be set inside the Texinfo file using @set?
It is not clear from the manual whether that is possible.

> 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:

Indeed, the text contradicts that in this case.  But maybe that's the
best we can practically do...

> 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).

Can the warning text be at least clarified?  "Unexpected node in menu"
is a far cry from "unexpected repeated node in menu" or from something
like "node `Help-]' is its own Next according to menu".  IOW,
"unexpected" is poor on information about why is it unexpected.

Thanks.

Reply via email to