[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texinfo in descriptions?

From: Andy Wingo
Subject: Re: Texinfo in descriptions?
Date: Wed, 26 Aug 2015 09:57:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Wed 26 Aug 2015 00:09, Mathieu Lirzin <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:
>> Mathieu Lirzin <address@hidden> skribis:
>>> Andreas Enge <address@hidden> writes:
>>>> On Wed, Jul 22, 2015 at 11:24:10PM +0200, Ludovic Courtès wrote:
>>>>> With Benno being OK, we should start looking at implementing the change.
>>> Good news! I'm interested in implementing this change.  I can't dedicate
>>> my time to do this right now, but I can do it within a period of one
>>> month.  If someone is willing to do the work sooner, I have no problem
>>> with that.
>> FWIW I won’t be working (at all ;-)) in the coming weeks, so I’m happy
>> if you (or someone else) works on this sometime while I’m away.  :-)
> I'm sending this email to notify that even if the estimated period of
> work has ended.  I am still working on it.

Will all docstrings be parsed as texinfo?  To me this is the proper
solution, since plain text is mostly a subset of texinfo.  It could be
that all descriptions are already texinfo.  You just have to be careful
about @ { and } when used literally -- they need replacing with @@ @{
and @}.

In Guile I've had a hack that tries to render docstrings as texinfo,
falling back to a @verbatim block otherwise, but I don't recommend it:

  (use-modules (texinfo) (texinfo plain-text) (ice-9 regexp))

  (define many-space? (make-regexp "[[:space:]][[:space:]][[:space:]]"))
  (define initial-space? (make-regexp "^[[:space:]]"))
  (define (string->stexi str)
    (or (and (or (not str) (string-null? str))
        (and (or (string-index str #\@)
                 (and (not (regexp-exec many-space? str))
                      (not (regexp-exec initial-space? str))))
              (texi-fragment->stexi str)))
        `(*fragment* (verbatim ,str))))
  (define (string-format str)
    (stexi->plain-text (string->stexi str)))

Better to just adopt texinfo and fix up any descriptions that need it.
Probably you could use guix package -s and recutils to grep for
descriptions that need patching.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]