Re: Bug in dumpdef's documentation

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.bugs,gmane.comp.tex.texinfo.general
Message-ID <[email protected]>
On Tue, Oct 26, 2021 at 02:30:26AM +0200, 4dr14n31t0r Th3 G4m3r wrote:
> The output documented is not what you get from executing the m4 commands as
> documented. See https://www.gnu.org/software/m4/manual/m4.html#Dumpdef

Thanks for the report.  More details would have been nice (what you
think was wrong, and what you were expecting), but I can reproduce
that where the manual says:

dumpdef(`foo')
error→foo: ⇒

in practice (given the earlier definition of foo in the example), it should be:

dumpdef(`foo')
error→foo:	`Hello world.'
⇒

Looking at the source, in doc/m4.texi, there is:

@example
$ @kbd{m4 -d}
define(`foo', `Hello world.')
@result{}
dumpdef(`foo')
@error{}foo:@tabchar{}`Hello world.'
@result{}
dumpdef(`define')
@error{}define:@tabchar{}<define>
@result{}
@end example

My initial guess is that there is a bug in the texi -> html conversion
where @tabchar{} gets eaten incorrectly, resulting in the html output
omitting the rest of the intended line.  But checking just now, I see
the same problem in 'info m4' on the corresponding page, so it is not
a bug in the conversion, but in the m4.texi source itself.  Earlier in
the m4.texi, there is:

@c @tabchar{}
@c ----------
@c The testsuite expects literal tab output in some examples, but
@c literal tabs in texinfo lead to formatting issues.
@macro tabchar
@       @c
@end macro

So maybe the problem is that the macro expansion is leaving a bare @c
which then eats the rest of the line when using the macro within
@example.

I'm cc'ing the texinfo list to see if someone can figure out the
correct magic to use faster than I can.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.