On Tue, Oct 27, 2026 at 08:25:34PM +0000, Gavin Smith wrote:
> I thought that the @nodedescription may have been considered to be part
> of the previous node ("Second Section"), and so it should appear after the
> @unnumbered command that starts a new node:
>
> So @nodedescription looks like it nearly works correctly, if it is placed
> after
> the sectioning command, but the warning is wrong. It appears for the
> sake of the @nodedescription warning, only explicit @node lines are
> considered.
When nodes are added, there is a call to _reassociate_to_node going
through the tree element just after the node that was added to
reassociate to the new node instead of to the preceding node. I think
this is why it works more or less ok (though bugs in this area could be
possible).
> I'm attaching the file I used to test this.
>
> Could texi2any associate the @nodedescription line with a preceding
> lone sectioning command so that this warning isn't emitted? I'm guessing
> that internally, @node commands are added to the Texinfo tree after these
> warnings are generated (with AUTO_SECTION_NODE=1), which is too late to
> prevent the warning.
The code is probably incorrect on two accounts, the warnings need to be
done after adding the new nodes, and all the nodedescriptions should be
associated to the previous node. I do not think that associating to the
sectioning commands is needed, however. But maybe there is a need to
check what happens if there is no explicit node at all. And also to
verify that a nodedescription associated to a sectioning command
further away is also associated to the correct node.
--
Pat