From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: Texinfo in descriptions? Date: Wed, 26 Aug 2015 09:57:57 +0200 Message-ID: <87k2si32ii.fsf@igalia.com> References: <87wpy0nygt.fsf@gmail.com> <87y4ige2ux.fsf@openmailbox.org> <87wpy0t83c.fsf@gnu.org> <87r3o7pz3h.fsf@openmailbox.org> <87y4ietrdz.fsf_-_@gnu.org> <874mkx8a5o.fsf@openmailbox.org> <87wpxs9ux0.fsf@gnu.org> <87h9ov51j9.fsf@gnu.org> <20150722220825.GA8182@debian> <87vbdb6w6o.fsf@openmailbox.org> <87mvynyo1z.fsf@gnu.org> <876143rpf2.fsf@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUVbU-00049J-9T for guix-devel@gnu.org; Wed, 26 Aug 2015 03:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUVbR-0003am-In for guix-devel@gnu.org; Wed, 26 Aug 2015 03:58:40 -0400 In-Reply-To: <876143rpf2.fsf@openmailbox.org> (Mathieu Lirzin's message of "Wed, 26 Aug 2015 00:09:21 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mathieu Lirzin Cc: guix-devel@gnu.org On Wed 26 Aug 2015 00:09, Mathieu Lirzin writes: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Mathieu Lirzin skribis: >> >>> Andreas Enge writes: >>> >>>> On Wed, Jul 22, 2015 at 11:24:10PM +0200, Ludovic Court=C3=A8s wrote: >>>>> With Benno being OK, we should start looking at implementing the chan= ge. >>> >>> 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=E2=80=99t be working (at all ;-)) in the coming weeks, so I= =E2=80=99m happy >> if you (or someone else) works on this sometime while I=E2=80=99m 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)) '(*fragment*)) (and (or (string-index str #\@) (and (not (regexp-exec many-space? str)) (not (regexp-exec initial-space? str)))) (false-if-exception (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. Andy