unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Bruno Victal <mirai@makinata.eu>
Cc: 60582@debbugs.gnu.org
Subject: [bug#60582] [PATCH] Properly format list of packages & sync lightdm documentation.
Date: Fri, 13 Jan 2023 15:29:30 -0500	[thread overview]
Message-ID: <87cz7ifaad.fsf_-_@gmail.com> (raw)
In-Reply-To: <11414ae2650cde429b82aa168041e3989cf7d84c.1672951913.git.mirai@makinata.eu> (Bruno Victal's message of "Thu, 5 Jan 2023 21:06:10 +0000")

Hi,

Bruno Victal <mirai@makinata.eu> writes:

> * gnu/services/configuration.scm
> (generate-documentation): Format a list of packages by their names.
> ---
>  gnu/services/configuration.scm | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
> index 6b0291dc00..16e2380709 100644
> --- a/gnu/services/configuration.scm
> +++ b/gnu/services/configuration.scm
> @@ -370,6 +370,9 @@ (define (show-default val)
>                       (cond
>                        ((package? val)
>                         (symbol->string (package->symbol val)))
> +                      ((and ((list-of package?) val) (not (null? val)))
> +                       (format #f "(~{~a~^ ~})"
> +                        (map package->symbol val)))

The 'and' and (not (null? val)) don't seem to be necessary as in the
empty list of packages, it'd produce the same as the else clause below:

--8<---------------cut here---------------start------------->8---
scheme@(gnu services configuration)> (format #f "(~{~a~^ ~})" '())
$1 = "()"
scheme@(gnu services configuration)> (str '())
$2 = "()"
--8<---------------cut here---------------end--------------->8---

>                        (else (str val))))
>  
>                     `(entry (% (heading

-- 
Thanks,
Maxim




  reply	other threads:[~2023-01-13 20:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 21:01 [bug#60582] [PATCH] Properly format list of packages & sync lightdm documentation Bruno Victal
2023-01-05 21:06 ` [bug#60582] [PATCH 1/2] services: configuration: Format a list of packages by their names Bruno Victal
2023-01-13 20:29   ` Maxim Cournoyer [this message]
2023-01-13 20:34     ` [bug#60582] [PATCH] Properly format list of packages & sync lightdm documentation Bruno Victal
2023-01-05 21:06 ` [bug#60582] [PATCH 2/2] services: lightdm: Sync documentation with source Bruno Victal
2023-01-06 14:10 ` [bug#60582] [PATCH v2 1/2] services: configuration: Format a list of packages by their names Bruno Victal
2023-01-06 14:10   ` [bug#60582] [PATCH v2 2/2] services: lightdm: Sync documentation with source Bruno Victal
2023-01-13 21:34 ` [bug#60582] [PATCH v3 1/2] services: configuration: Format a list of packages by their names Bruno Victal
2023-01-13 21:34   ` [bug#60582] [PATCH v3 2/2] services: lightdm: Sync documentation with source Bruno Victal
2023-02-09  3:39     ` [bug#60582] [PATCH] Properly format list of packages & sync lightdm documentation Maxim Cournoyer
2023-02-09 16:17       ` Bruno Victal
2023-02-09 16:42         ` Maxim Cournoyer
2023-02-09  4:00     ` bug#60582: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz7ifaad.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=60582@debbugs.gnu.org \
    --cc=mirai@makinata.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).