On Wed, Apr 22, 2026 at 09:41:49AM +0300, Eli Zaretskii wrote: > > 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?
I doubt it is worth adding a variable for this one specific case. Repeated nodes in a menu would almost always be a mistake. The structure of this Info file is not typical, so using CHECK_NORMAL_MENU_STRUCTURE appears to be appropriate. The work-around with explicit node pointers allows some use of atypical menu structures in manuals that are otherwise "normally" structured. Another option, in Texinfo 7.3 at least, is to make the node that contains the menu an "unstructured node". You do this by using @heading instead of @section: $ diff -u info.texi info-B.texi --- info.texi 2026-04-23 17:04:20.010676572 +0100 +++ info-B.texi 2026-04-23 20:27:26.539113798 +0100 @@ -426,7 +426,7 @@ @end format @node Help-Inv -@section Invisible text in Emacs Info +@heading Invisible text in Emacs Info Before discussing menus, we need to make some remarks that are only relevant to users reading Info using Emacs. Users of the stand-alone This also has the effect of removing the section number from the heading at the start of the node so may not be desirable. (It may have knock-on effects for other menus too, although it seemed fine when I tested it.) (I don't actually see the relevance of the repeated menu entries for the section of this manual in question, as the fact they are repeated is not discussed at all in the main body of the node "Help-]" where they occur.) The warning is not given for menu entries referencing anchors - these entries are skipped when doing the CHECK_NORMAL_MENU_STRUCTURE check. So if "Help-]" were the name of an anchor rather than a node, the warning would not be issued. > Btw, can these variables be set inside the Texinfo file using @set? > It is not clear from the manual whether that is possible. No, it is not possible. > 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. I think users should be able to easily figure it out when they look at the line number of the error in the input file. They should easily be able to see that the node is repeated. This warning is only given if no more entries are expected in the menu so another option is "unexpected node at end of menu". I'm not sure if that is any clearer or not.
