On Sun, Jan 26, 2025 at 12:29:38AM +0000, Pip Cet via Bug reports for the GNU Texinfo documentation system wrote: > This isn't as helpful a bug report as I would have liked. I tried > understanding this problem, but for reasons I cannot quite grasp yet it > was too hard for me. > > My understanding is that old versions of texinfo produce the warning > > `.' or `,' must follow \@xref, not %s > > when an @xref is followed, after its argument, by a space and then an > alphabetic character. > > It appears this behavior was changed to permit ordinary text to follow > an @xref directly, without punctuation.
Yes, the reason was for processing with texinfo.tex, in order to provide punctuation in the output that looked like: See [node], page XX, or See [node], page XX. The , or . should occur after the page number. We changed texinfo.tex to look ahead in the input and add a comma if one was missing, so input like @xref{node} to learn more. would output as See [node], page XX, to learn more. rather than See [node], page XX to learn more. This is stated in the NEWS entry for Texinfo 6.1: 6.1 (06 February 2016) * Language: ... . For processing with TeX, a comma is automatically provided following a cross-reference command (such as @xref) when needed to separate the page number from following text, so you don't need to add one yourself. See the `Parts of a Cross Reference' node in the manual for details. Behavior when followed by punctuation, as always recommended previously, is unchanged. As far as I remember, the warnings didn't stop the Info file from being output. > I'm open to other suggestions for how to avoid this problem. There was > some confusion about whether this was a warning or an error, and whether > it was "build-breaking", but that's possibly not relevant. It is relevant, because if it is not "build-breaking", it is less important to add warnings to newer versions of Texinfo. It is not a "bug" as you label it, as there is nothing wrong with the input for newer versions of Texinfo and no need to warn about this input. It could be called a "feature request" for backwards compatibility. As far as I know texi2any has never tried to check if input files don't work with older versions of Texinfo. It is not just . and , following @xref. For example, from the same 6.1 release, the @setfilename command became optional, as well as @menu. A much older change was to determine node directions automatically, rather than giving them as extra arguments to @node. And of course, every new Texinfo command that is added does not work with older versions. I've never heard the suggestion that we should have optional warnings for any of these. > I understand the decision to drop the warning was deliberate, but > wouldn't it be possible to make it an optional warning, disabled by > default? The warning could indicate which version of texinfo stopped > warning about this by default and when it was released, so there would > be an incentive to disable the option at a future point. It seems like a lot of work and complexity for little benefit.