Re: Rewriting Plaintext/Info converter in C?

Eli Zaretskii <[email protected]> Wed, 24 Jun 2026 19:26:31 +0300
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
> From: Gavin Smith <[email protected]>
> Date: Wed, 24 Jun 2026 16:25:35 +0100
> Cc: [email protected]
> 
> On Wed, Jun 24, 2026 at 03:41:18PM +0300, Eli Zaretskii wrote:
> > > From: Gavin Smith <[email protected]>
> > > Date: Tue, 23 Jun 2026 22:00:16 +0100
> > > 
> > > I thought I would try to make a start on rewriting the Plaintext converter
> > > in C.  I thought it should be simple when compared with the HTML converter
> > > that already exists.  For one thing, there should be no customization API
> > > for the Plaintext converter.  All the conversion is done with straight
> > > function calls rather than via hooks that can be overridden.
> > 
> > Plain text is almost the same as Info, with a few minor differences.
> > So maybe you should just tweak the Info generator a bit?
> 
> The point is that neither of them is written as a C converter - they are
> only written in Perl.
> 
> The aim is to switch from texi2any as a Perl program with optional extensions
> written in C to a C program with optional extensions written in Perl.
> 
> We can only make this switch once there is enough of the program in C as
> we don't want to rely on embedding a Perl interpreter.

What I meant: assuming that there is a C converted to Info (I think it
already exists, no?), tweaking it in small ways might be all that's
needed to produce plain text.  Does this make sense?