From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: 01/03: ui: Only display link in capable terminals. Date: Mon, 24 Feb 2020 16:35:01 +0100 Message-ID: <8736b0m21m.fsf@gnu.org> References: <20200224101817.20439.52918@vcs0.savannah.gnu.org> <20200224101818.9A1FC206ED@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60360) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6FlA-0001Cu-JF for guix-devel@gnu.org; Mon, 24 Feb 2020 10:35:05 -0500 In-Reply-To: <20200224101818.9A1FC206ED@vcs0.savannah.gnu.org> (guix-commits@gnu.org's message of "Mon, 24 Feb 2020 05:18:18 -0500 (EST)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org, zimoun Hi! guix-commits@gnu.org skribis: > commit d7545a6b538813e88195d084f75a3e87065c999e > Author: zimoun > AuthorDate: Mon Feb 17 14:16:53 2020 +0100 > > ui: Only display link in capable terminals. >=20=20=20=20=20 > * guix/ui.scm (display-generation): Display generation path on new li= ne. > * guix/scripts/describe.scm (channel-commit-hyperlink): Add TRANSFORM= ER argument. > (display-profile-content): Use TRANSFORMER argument to display URL ex= plicitly > when terminal does not support hyperlinks. [...] > + (when (not (supports-hyperlinks?)) =E2=80=9Cunless=E2=80=9D. > + (format #t (G_ " URL: ~a~%") > + (channel-commit-hyperlink channel commit > + (lambda (url msg)= url)))))) So people see less information on terminals that support hyperlinks, right? I think there should be as much information displayed whether or not the terminal supports hyperlinks. Otherwise it can be confusing. (Especially since we can=E2=80=99t tell whether the terminal really supports hyperlinks: we don=E2=80=99t know whether it displays clickable links.) Thoughts? > --- a/guix/ui.scm > +++ b/guix/ui.scm > @@ -1637,7 +1637,7 @@ DURATION-RELATION with the current time." > (let* ((file (generation-file-name profile number)) > (link (if (supports-hyperlinks?) > (cut file-hyperlink file <>) > - identity)) > + (cut format #f (G_ "~a~%file: ~a") <> file))) > (header (format #f (link (highlight (G_ "Generation ~a\t~a"))) I understand it=E2=80=99s a matter of taste, but I=E2=80=99m not a fan of t= he extra line here. Ludo=E2=80=99.