From 08c7e7df156e3e61d20fba8a76bea65e1c698ef5 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sun, 5 Sep 2021 16:05:36 +0200 Subject: scripts: import: Increase column width for pretty-printer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the max column width for the pretty-printer was 50, which caused generated package definitions to include unnecessary newlines, e.g., (home-page "https://gitlab.com/ttyperacer/terminal-typeracer") instead of (home-page "https://gitlab.com/ttyperacer/terminal-typeracer") * guix/scripts/import.scm (guix-import): Set max expression width to 80 when pretty-printing. Signed-off-by: Ludovic Courtès --- guix/scripts/import.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 11e94769bb..40fa6759ae 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018 Kyle Meyer ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -118,7 +119,8 @@ Run IMPORTER with ARGS.\n")) (if (member importer importers) (let ((print (lambda (expr) (pretty-print expr (newline-rewriting-port - (current-output-port)))))) + (current-output-port)) + #:max-expr-width 80)))) (match (apply (resolve-importer importer) args) ((and expr (or ('package _ ...) ('let _ ...) -- cgit v1.2.3