> From: Gavin Smith <gavinsmith0...@gmail.com>
> Date: Sun, 29 Jun 2025 12:06:46 +0100
> Cc: pertu...@free.fr, bug-texinfo@gnu.org
> 
> On Sun, Jun 29, 2025 at 07:50:47AM +0300, Eli Zaretskii wrote:
> > > From: Gavin Smith <gavinsmith0...@gmail.com>
> > > Date: Sat, 28 Jun 2025 21:45:03 +0100
> > > 
> > > And now I have warnings with this manual (patch at the end of this mail):
> > > 
> > > $ TEXINFO_XS_STRUCTURE=0 ../tta/perl/texi2any.pl info.texi
> > > info.texi:461: warning: unexpected node `Help-]' in menu
> > > info.texi:462: warning: unexpected node `Help-]' in menu
> > > info.texi:623: warning: unexpected node `Help-FOO' in menu
> > > info.texi:624: warning: unexpected node `Help-FOO' in menu
> > > 
> > > The first two warnings are in relation to this menu:
> > > 
> > > @menu
> > > * ]:         Help-].               Node telling about ].
> > > * stuff:     Help-].               Same node.
> > > * Help-]::                         Yet again, same node.
> > > @end menu
> > 
> > Can you explain why is "Help-]" "unexpected" here?
> 
> It's because there are three menu entries for the same node.  The
> first menu entry is expected because that node is subordinate in
> the sectioning structure (a @subsection underneath a @section),
> but the other two are unexpected as there are no more subsections
> to follow.

Then maybe it would be possible to make the warning more explicit,
like:

  warning: two or more menu items leading to the same node

> It's not clear if the explicit node pointers would help here as
> these are given for the child node:
> 
>     @node Help-], , , Help-Inv
>     @subsection The @kbd{]} and @kbd{[} commands
> 
> - but not for the parent node that contains the menu:
> 
>     @node Help-Inv
>     @section Invisible text in Emacs Info

The parent node cannot have an explicit pointer to a child node, can
it?

> If we did allow explicit node pointers to suppress this warning,
> we'd have to consider which of these nodes to check.

Not sure it's justified.  An explicit warning should be good enough.
Bonus points for adding some mechanism for suppressing specific
warnings, if that could be made general enough.

Reply via email to