GNU bug report logs - #58660
[PATCH 0/4] Minor tweaks of etc/teams.scm

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Thu, 20 Oct 2022 13:23:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 58660 <at> debbugs.gnu.org
Subject: [bug#58660] [PATCH v2 1/3] etc: teams: Add 'show' subcommand.
Date: Fri, 18 Nov 2022 18:29:50 +0100
Hello,

>    "Print all teams, their scope and their members."
>    (define port* (current-output-port))
>    (define width* (%text-width))
> @@ -564,11 +565,13 @@ (define width* (%text-width))
>                 (scope (format #f "scope: ~{~s ~}~%" scope))))
>       (list-members team port* "+ ")
>       (newline))

This procedure is starting to get a little complex. We could put the
above is a sub-procedure called "print-team".

> +       (sort
> +        (hash-map->list (lambda (key value) value) %teams)
> +        (lambda (team1 team2)
> +          (string<? (symbol->string (team-id team1))
> +                    (symbol->string (team-id team2))))))))

That could be in a variable called %sorted-teams.

Thanks,

Mathieu




This bug report was last modified 1 year and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.