ludo@gnu.org (Ludovic Courtès) writes: > Mathieu Lirzin skribis: > >> From e691c2080929dd1390184ab4669de8b2695a237f Mon Sep 17 00:00:00 2001 >> From: Mathieu Lirzin >> Date: Fri, 7 Aug 2015 00:10:43 +0200 >> Subject: [PATCH] ui: Add package-description-string. >> >> Provide support for Texinfo's markup in package description. >> >> * guix/ui.scm (%text-width, %initial-indent): New parameters. >> (package-description-string): New variable. >> (package->recutils): Use them. >> * emacs/guix-main.scm (%package-param-alist): Use it. >> * gnu/packages/databases.scm (perl-dbd-pg): Adapt to Texinfo's markup. >> * gnu/packages/perl.scm (perl-devel-globaldestruction) >> (perl-devel-lexalias, perl-exporter-lite): Likewise. >> * gnu/packages/python.scm (python2-empy): Likewise. > > [...] > >> +++ b/gnu/packages/databases.scm >> @@ -578,7 +578,7 @@ columns, primary keys, unique constraints and relationships.") >> ("postgresql" ,postgresql))) >> (home-page "http://search.cpan.org/dist/DBD-Pg") >> (synopsis "DBI PostgreSQL interface") >> - (description "") >> + (description #f) > > Weird, and doesn’t really match the commit log. Maybe this hunk can be > removed? I get an error with "guix package -s perl-dbd-pg" without this change --8<---------------cut here---------------start------------->8--- Backtrace: In unknown file: ?: 19 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 18 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 17 [eval # #] In ice-9/boot-9.scm: 2401: 16 [save-module-excursion #] 4050: 15 [#] 1724: 14 [%start-stack load-stack ...] 1729: 13 [#] In unknown file: ?: 12 [primitive-load "/home/mthl/src/gnu/guix/scripts/guix"] In guix/ui.scm: 1058: 11 [run-guix-command package "-s" "perl-dbd-pg"] In ice-9/boot-9.scm: 157: 10 [catch srfi-34 # ...] 157: 9 [catch system-error ...] In guix/scripts/package.scm: 995: 8 [#] 967: 7 [process-query (# # # # ...)] In ice-9/boot-9.scm: 157: 6 [catch system-error ...] In srfi/srfi-1.scm: 619: 5 [for-each # ...] In guix/ui.scm: 859: 4 [package->recutils # # 80] 790: 3 [texi->plain-text "description: Project-Id-Version: guix-packages 0.8\nReport-Msgid-Bugs-To: ludo@gnu.org\nPOT-Creation-Date: 2015-07-21 21:35+0200\nPO-Revision-Date: 2014-12-20 22:00+0100\nLast-Translator: Rémy Chevalier \nLanguage-Team: French \nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"] In unknown file: ?: 2 [call-with-input-string "description: Project-Id-Version: guix-packages 0.8\nReport-Msgid-Bugs-To: ludo@gnu.org\nPOT-Creation-Date: 2015-07-21 21:35+0200\nPO-Revision-Date: 2014-12-20 22:00+0100\nLast-Translator: Rémy Chevalier \nLanguage-Team: French \nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n" ...] In texinfo.scm: 1131: 1 [parse #] 965: 0 [loop # (*fragment*) ...] texinfo.scm:965:23: In procedure loop: texinfo.scm:965:23: Throw to key `parser-error' with args `(#f "Unknown command" gnu)'. --8<---------------cut here---------------end--------------->8--- It's not directly related to texinfo description since (package-description-string perl-dbd-pg) => "" but caused by the fact there is this in "po/packages/fr.po"... --8<---------------cut here---------------start------------->8--- msgid "" msgstr "" "Project-Id-Version: guix-packages 0.8\n" "Report-Msgid-Bugs-To: ludo@gnu.org\n" "POT-Creation-Date: 2014-11-10 15:37+0100\n" "PO-Revision-Date: 2014-12-20 22:00+0100\n" "Last-Translator: Rémy Chevalier \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" --8<---------------cut here---------------end--------------->8--- which fails to be parsed by texinfo. What is your recommandation about this? > >> +(set! (@@ (texinfo plain-text) wrap*) >> + ;; Monkey patch this private procedure to let 'package->recutils' > ^ > Please prepend “XXX” here to make the kludge more visible. (Eventually > we should fix it in Guile.) Done. > I tried adding an @itemize list in a description and noticed that the > initial indent is not working the way I thought: > [...] I should have test such case before proposing a patch sorry about that. > I wonder if using ‘fill-paragraph’ instead of ‘fill-string’ would solve > this. I don't remember exactly the result I got with that but it wasn't convincing. > Could you look into it? Here is "something" that seems to work. The idea is to append "description: " to package description before 'stexi->plain-text' fills the text.