From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPa7u-0005XD-Ig for guix-patches@gnu.org; Wed, 21 Nov 2018 16:33:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPa6M-0004RF-0q for guix-patches@gnu.org; Wed, 21 Nov 2018 16:32:04 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPa6L-0004RB-UC for guix-patches@gnu.org; Wed, 21 Nov 2018 16:32:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gPa6L-0002xL-Qz for guix-patches@gnu.org; Wed, 21 Nov 2018 16:32:01 -0500 Subject: [bug#33448] [PATCH 1/3] describe: Use a procedure to format output. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20181120222616.3941-1-go.wigust@gmail.com> <20181121141715.16417-1-go.wigust@gmail.com> Date: Wed, 21 Nov 2018 22:31:29 +0100 In-Reply-To: <20181121141715.16417-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Wed, 21 Nov 2018 17:17:13 +0300") Message-ID: <87lg5mruby.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Oleg Pykhalov Cc: 33448@debbugs.gnu.org Hi, Oleg Pykhalov skribis: > * guix/channels.scm (channel->sexp): New procedure. > * guix/scripts/describe.scm (display-checkout-info, display-profile-info)= : Use > this. [...] > + (define (channels) s/define (channels)/define channels/ :-) > + (map (lambda (entry) > + (match (assq 'source (manifest-entry-properties entry)) > + (('source ('repository ('version 0) > + ('url url) > + ('branch branch) > + ('commit commit) > + _ ...)) > + (channel (name (string->symbol (manifest-entry-name entry)= )) > + (url url) > + (commit commit))) > + > + ;; Pre-0.15.0 Guix does not provide that information, > + ;; so there's not much we can do in that case. > + (_ '???))) Maybe return, say: (channel (name 'guix)(url "?")(commit "?")). This would avoid weird type errors. > + (pretty-print (map channel->sexp (channels))))) I think it should be: (pretty-print `(list ,@(map channel->sexp channels))) right? OK with these changes, thanks! Ludo=E2=80=99.