[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Usefulness of menu directions
From: |
Patrice Dumas |
Subject: |
Re: Usefulness of menu directions |
Date: |
Tue, 3 Jun 2025 22:44:47 +0200 |
On Fri, May 30, 2025 at 06:16:29PM +0100, Gavin Smith wrote:
> > I would be more cautious about not using "menu directions". To me menu
> > directions are a useful abstraction, which is not internal to texi2any,
> > it is a representation of the tree obtained with menus, it is a property
> > of the Texinfo manual. The checks can probably be done without the menu
> > directions, but my feeling is that it is easier with menu directions.
>
> Well, node directions are not uniquely determined from menus, as a node can be
> referred to in more than one menu.
Indeed, they may not be uniquely determined but still they are a
property of the Texinfo code. It could even be possible to keep the
information on all the menu directions for a node. Not sure that it is a
good idea, but it is possible.
> I think it's fine and good to deduce such node pointers from the menus,
> but I think this should be confined to the structuring code. I don't
> think that "menu directions" are useful beyond that. As far as I can
> tell they are not used in any output converter.
I agree that having the menu directions confined to the structuring code
is good.
> Another issue with reporting on errors with "menu directions" is that
> the error message does not refer to the location of the menu, but on
> the node the directions are set for. For example:
>
> $ cat test2.texi
> \input texinfo
>
> @node Top
> @chapter Top
>
> @menu
> * One::
> * Three::
> @end menu
>
> @node One
> @chapter One
>
> @node Two
> @chapter Two
>
> @node Three
> @chapter Three
>
>
>
> @bye
> $ ../tta/perl/texi2any.pl test2.texi
> test2.texi:11: warning: node `Top' is up for `One' in menu but not in
> sectioning
> test2.texi:11: warning: node next pointer for `One' is `Two' but next is
> `Three' in menu
> test2.texi:17: warning: node `Top' is up for `Three' in menu but not in
> sectioning
> test2.texi:17: warning: node prev pointer for `Three' is `Two' but prev is
> `One' in menu
>
> Here line 11 is "@node One" and line 17 is "@node Three", but the true
> location of the error is the @menu block starting at line 6 and the
> defect is located at lines 7 and 8.
>
> It would be better to report an error on the menu directly rather
> indirectly through the menu directions.
On the whole menu, or on the menu entry? It should not be too difficult
to do on the menu entry or menu entry node, but on menu entry would need
to add location information.
--
Pat
- Re: Usefulness of menu directions,
Patrice Dumas <=