From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52880) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3ivI-0001Yg-5P for guix-patches@gnu.org; Mon, 17 Feb 2020 11:07:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3ivH-0006ul-6a for guix-patches@gnu.org; Mon, 17 Feb 2020 11:07:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3ivH-0006tn-0Q for guix-patches@gnu.org; Mon, 17 Feb 2020 11:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3ivG-0006D5-SL for guix-patches@gnu.org; Mon, 17 Feb 2020 11:07:02 -0500 Subject: [bug#39642] [PATCH 1/3] ui: Only display link in capable terminals. Resent-Message-ID: MIME-Version: 1.0 References: <20200217134027.731-1-mail@ambrevar.xyz> In-Reply-To: <20200217134027.731-1-mail@ambrevar.xyz> From: zimoun Date: Mon, 17 Feb 2020 17:05:45 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" 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: Pierre Neidhardt Cc: 39642@debbugs.gnu.org Hi Pierre, Thank you for looking at. :-) On Mon, 17 Feb 2020 at 14:41, Pierre Neidhardt wrote: > --- > guix/scripts/describe.scm | 16 ++++++++++++---- > guix/ui.scm | 2 +- > 2 files changed, 13 insertions(+), 5 deletions(-) > > diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm > index f13f221da9..9a7bd52163 100644 > --- a/guix/scripts/describe.scm > +++ b/guix/scripts/describe.scm > @@ -201,7 +201,12 @@ way and displaying details about the channel's source code." > (format #t (G_ " commit: ~a~%") > (if (supports-hyperlinks?) > (channel-commit-hyperlink channel commit) > - commit)))) > + commit)) > + (when (not (supports-hyperlinks?) > + ) Issue on the closing parenthesis ')'. Indent? > @@ -233,9 +238,12 @@ way and displaying details about the channel's source code." > > (define* (channel-commit-hyperlink channel > #:optional > - (commit (channel-commit channel))) > + (commit (channel-commit channel)) > + (transformer hyperlink)) > "Return a hyperlink for COMMIT in CHANNEL, using COMMIT as the hyperlink's > -text. The hyperlink links to a web view of COMMIT, when available." > +text. The hyperlink links to a web view of COMMIT, when available. > +TRANSFORMER is a procedure of 2 arguments, a URI and text, and returns a I do not have tried with another 'transformer' than 'hyperlink' or 'identity'. :-) Cheers, simon