unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: guix-devel@gnu.org, zimoun <zimon.toutoune@gmail.com>
Subject: Re: 01/03: ui: Only display link in capable terminals.
Date: Mon, 24 Feb 2020 16:35:01 +0100	[thread overview]
Message-ID: <8736b0m21m.fsf@gnu.org> (raw)
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)")

Hi!

guix-commits@gnu.org skribis:

> commit d7545a6b538813e88195d084f75a3e87065c999e
> Author: zimoun <zimon.toutoune@gmail.com>
> AuthorDate: Mon Feb 17 14:16:53 2020 +0100
>
>     ui: Only display link in capable terminals.
>     
>     * guix/ui.scm (display-generation): Display generation path on new line.
>     * guix/scripts/describe.scm (channel-commit-hyperlink): Add TRANSFORMER argument.
>     (display-profile-content): Use TRANSFORMER argument to display URL explicitly
>     when terminal does not support hyperlinks.

[...]

> +                   (when (not (supports-hyperlinks?))

“unless”.

> +                     (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’t tell whether the terminal really supports
hyperlinks: we don’t 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’s a matter of taste, but I’m not a fan of the extra
line here.

Ludo’.

  parent reply	other threads:[~2020-02-24 15:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200224101817.20439.52918@vcs0.savannah.gnu.org>
2020-02-24 15:31 ` branch master updated (0aa0e1f -> 9b7f9e6) Ludovic Courtès
2020-02-24 15:40   ` Pierre Neidhardt
2020-02-24 16:36   ` zimoun
2020-02-24 20:34     ` Ludovic Courtès
2020-02-24 21:22       ` Pierre Neidhardt
2020-02-24 23:00       ` zimoun
2020-02-24 23:45       ` Jelle Licht
     [not found] ` <20200224101818.9A1FC206ED@vcs0.savannah.gnu.org>
2020-02-24 15:35   ` Ludovic Courtès [this message]
2020-02-24 16:15     ` 01/03: ui: Only display link in capable terminals Pierre Neidhardt
2020-02-24 20:38       ` Ludovic Courtès
2020-02-24 21:23         ` Pierre Neidhardt
2020-02-27 23:16           ` Ludovic Courtès
2020-02-28  7:10             ` Pierre Neidhardt
2020-02-28 14:29             ` zimoun

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=8736b0m21m.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).