From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kAONB1cVR2KRbwAAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 17:08:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2J0wBFcVR2JWXwEAauVa8A (envelope-from ) for ; Fri, 01 Apr 2022 17:08:07 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A56BF3993F for ; Fri, 1 Apr 2022 17:08:06 +0200 (CEST) Received: from localhost ([::1]:58378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naIsf-0000TG-R6 for larch@yhetil.org; Fri, 01 Apr 2022 11:08:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naInm-0000kV-O7 for guix-patches@gnu.org; Fri, 01 Apr 2022 11:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naInm-00063K-FS for guix-patches@gnu.org; Fri, 01 Apr 2022 11:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naInm-0002rW-D8 for guix-patches@gnu.org; Fri, 01 Apr 2022 11:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54668] [PATCH 3/3] diagnostics: Turn diagnostic locations into hyperlinks. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Apr 2022 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54668 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54668@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 54668-submit@debbugs.gnu.org id=B54668.164882532410898 (code B ref 54668); Fri, 01 Apr 2022 15:03:02 +0000 Received: (at 54668) by debbugs.gnu.org; 1 Apr 2022 15:02:04 +0000 Received: from localhost ([127.0.0.1]:43057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naImq-0002pd-GT for submit@debbugs.gnu.org; Fri, 01 Apr 2022 11:02:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naImo-0002od-Ky for 54668@debbugs.gnu.org; Fri, 01 Apr 2022 11:02:02 -0400 Received: from [2001:470:142:3::e] (port=54948 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naImj-0005uM-C9; Fri, 01 Apr 2022 11:01:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=t2nOHOuCrjPcN/1u0JP7Nhz51Y+XNnAyLNAScfRluvE=; b=FunJ22EqKb2zb6a07TdV dyY9vFbL8S1w+lI9R5GI6dLEJYDcclvxp2mB+ckTOffmf1ewqWGVUJ8B7lSCuj1FCpxj4TgxJ0JT+ pKcIoLhKdSBiJjD1M3GN6B5561ogxNCZYhFOnQRr5kUnJm23jlTfNunmYDuXB7NheJgolRvJvFumI WBYGsr8XPnUd1tCMlc/AXALJV3EiY6h3AnuYS8Suri+XuSFmM0qNmy8h6iejrdfXLqzAsBwac7W8H Fg5F1xfGlNxZ9siJcNDcg3oshSPQv7C2GRti3Pt8FZx7a9WJZLF58N66BtGlY8Hh3Iakvf1rKKqr1 CtnHgjV2yD/dJg==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=38740 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naImi-0005LG-VW; Fri, 01 Apr 2022 11:01:57 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 1 Apr 2022 17:01:46 +0200 Message-Id: <20220401150146.32529-3-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220401150146.32529-1-ludo@gnu.org> References: <20220401150146.32529-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648825686; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=t2nOHOuCrjPcN/1u0JP7Nhz51Y+XNnAyLNAScfRluvE=; b=KN4Uv7I5sPIbZ4uQWLlCziiyP65YH2J5nq6hbGGYaNIDAtPLo7wVMdWvME1dwhTae/deHs JMH5vbM5mrR15wHv3/geTexk1yQL5u+hniHkQ/ysF43zC9y5/Yz3kBX16QeT8mmrJKoUZN r+gnJW2Ic1EjZkDt7GCv1PiY9QxPaL6q3AE+X24o0dG+C1lkXu25Oenk+8+F6oUlSJUftE 8pbRRFfG2Nk0CyhFroOlN1ejxhXA6ZHs6Q7RFaY5sEdjnVup6dV+uBc9M7IjhnlL0QF8CZ Kb3FOLaPVVCCUpjLxFGO21gxUrhdqwG7GMlNmraXOFFJv/v3cbkByOoFpwmghw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648825686; a=rsa-sha256; cv=none; b=gmd38nboj0ezP0Pnqwa0zfgd53cz2ahnGYPkkZICnlslp5Ll8+hHPKwttayLxJrJW8hpCU 7H2NyaOGXe/6SYuzEuTDP+y4iVEC8Uj6FWRPW8ilMS8WR5krTqJlWBM8qcEmX4DYnDmJ7f 5UPjGe8WDZ5WckX45Pq5HEWJv6I9iG9ZbcHVyqz/X/PoR+N0U9YmTmbrqe4zRLiLTEOic5 PloI+MLyD03uTqBdn4Mb3JFWhAG2PckSnMlkIDzgi82TkIXDTp+zqUphU0y5+o1v8TDNmX jxYPpFInGB5HbYtHvCTOEtieJuI6MnNc4M2bGyiU9R6DhWQSMQZYaw7+H6fXLQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=FunJ22Eq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=FunJ22Eq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A56BF3993F X-Spam-Score: -2.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: eH3ZhWKq6R3J * guix/diagnostics.scm (print-diagnostic-prefix): Use 'location->hyperlink' when 'supports-hyperlinks?' returns true. --- guix/diagnostics.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm index 2b8cee1ccb..bf1ced8140 100644 --- a/guix/diagnostics.scm +++ b/guix/diagnostics.scm @@ -204,7 +204,10 @@ (define prefix-color (gettext prefix %gettext-domain)))) (if location (format (guix-warning-port) "~a: ~a" - (location-color (location->string location)) + (location-color + (if (supports-hyperlinks? (guix-warning-port)) + (location->hyperlink location) + (location->string location))) (prefix-color prefix)) (format (guix-warning-port) "~:[~*~;guix ~a: ~]~a" (program-name) (program-name) -- 2.34.0