[texinfo.tex 2025-02-03.17]
> We should document that node names should not contain @macro-defined
> macros, and texi2any could give a warning if a document does this.
Yes, please do.
> One possibility is to expand to the entire @node line instead, as in:
>
> @macro Node {name}
> @node \name\
> @end macro
>
> Then invoking this as
>
> @Node name
>
> should expand safely to:
>
> @node name
I started out with this, however it fails with a parsing error.
Compiling
```
\input texinfo
@node Top
@top Top
Top
@macro A{TEXT}
@node \TEXT\
@end macro
@A X
@chapter X
X
@bye
```
results in
```
Undefined control sequence.
@lastnode ->X@xempty
{}
@writetocentry ...ile {@#1entry{#2}{#3}{@lastnode
}{@noexpand @folio }}}@tem...
@chapmacro ...i @writetocentry {@toctype }{#1}{#3}
@donoderef {#2}@nobreak @v...
@chapterzzz ...acro {#1}{Ynumbered}{@the @chapno }
@global @let @section = @n...
@genhead ... @ifcase @absseclevel @chapterzzz {#3}
@or @seczzz {#3}@or @numbe...
l.13 @chapter X
```
Looks like a bug, since we actually have something similar in
LilyPond, and it works! My guess is that a combination of other
Texinfo commands 'fixes' this...
Werner