guix-commits
[Top][All Lists]
Advanced

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

01/05: Revert "ui: Use package-description-string."


From: guix-commits
Subject: 01/05: Revert "ui: Use package-description-string."
Date: Thu, 2 Jul 2020 17:54:47 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 31522dfa1951c655898afb37eda58c048d1c2338
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jul 2 11:07:08 2020 +0200

    Revert "ui: Use package-description-string."
    
    This reverts commit bd03e99f66be1a038e3a8aeb502f5153fd05cc67.
    
    Reported by Ekaitz Zarraga <ekaitz@elenq.tech> at
    <https://lists.gnu.org/archive/html/guix-devel/2020-06/msg00338.html>.
    
    That commit broke would prevent "description: " from being taken into
    account by the 'texi->plain-text' paragraph filling code.
---
 guix/ui.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index d64bb68..88a046a 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1471,8 +1471,12 @@ HYPERLINKS? is true, emit hyperlink escape sequences 
when appropriate."
           (string->recutils
            (string-trim-right
             (parameterize ((%text-width width*))
-              (string-append "description: "
-                             (or (package-description-string p) "")))
+              ;; Call 'texi->plain-text' on the concatenated string to account
+              ;; for the width of "description:" in paragraph filling.
+              (texi->plain-text
+               (string-append "description: "
+                              (or (and=> (package-description p) P_)
+                                  ""))))
             #\newline)))
   (for-each (match-lambda
               ((field . value)



reply via email to

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