From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH] ui: Launch $PAGER through the shell. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Nov 2020 18:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44663@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16054660818555 (code B ref -1); Sun, 15 Nov 2020 18:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Nov 2020 18:48:01 +0000 Received: from localhost ([127.0.0.1]:54170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keN4C-0002Du-PA for submit@debbugs.gnu.org; Sun, 15 Nov 2020 13:48:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:60792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keN4B-0002Dn-L7 for submit@debbugs.gnu.org; Sun, 15 Nov 2020 13:48:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keN4B-0007Ci-3A for guix-patches@gnu.org; Sun, 15 Nov 2020 13:47:59 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]:50574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keN49-0004Lj-1f for guix-patches@gnu.org; Sun, 15 Nov 2020 13:47:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=YUddEm8O4bylBw5ksrbUUacby2UF4HbvGP148ggcGzw=; h=date:subject:to: from; b=E2jvIAN8n8JHo+1RF6w0Flw6sPcZRC8KiTxsGBxCTIXntLiSmoUaTsYIPtiu/0 YTHKCbSAWzJIiEx1LRDBvp7PmQFTKjfAlkG0A4hsQ46jMhw3bFd1c9w01OjSMGzOx7vcW7 0GZycXstlPmsDJSK7EKdTeX1a3uneQqy0rHiqqQjCOXBMy5+qeVbpf2Wocsv/ujuaGUYPX YxZWf3UUrK8sijbj1oikj6GBkPKD6pmL3qKq38seUkrVg2+LsYFGu8LVYut1hFPpOGoc+k zO/ntunz2tnahxElbXhrZFHRQCo6urMZb2oPtX1+O0lfaHiXpjBiUgz40g0hAUkvkllN0A == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 1a1e3318 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Sun, 15 Nov 2020 18:47:57 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Sun, 15 Nov 2020 19:47:26 +0100 Message-Id: <20201115184726.29944-1-me@tobias.gr> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) This is the convention elsewhere and sounds like the right thing to do. * guix/ui.scm (call-with-paginated-output-port): Substitute OPEN-PIPE for OPEN-PIPE*. Reported by Daniel Brooks . --- guix/ui.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 4e686297e8..2b7d9dd64b 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -72,7 +72,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (ice-9 regex) - #:autoload (ice-9 popen) (open-pipe* close-pipe) + #:autoload (ice-9 popen) (open-pipe close-pipe) #:autoload (system base compile) (compile-file) #:autoload (system repl repl) (start-repl) #:autoload (system repl debug) (make-debug stack->vector) @@ -1673,9 +1673,9 @@ zero means that PACKAGE does not match any of REGEXPS." ;; instead of 'r': this strips hyperlinks but allows 'less' to make a ;; good estimate of the line length. (let ((pager (with-environment-variables `(("LESS" ,less-options)) - (open-pipe* OPEN_WRITE - (or (getenv "GUIX_PAGER") (getenv "PAGER") - "less"))))) + (open-pipe (or (getenv "GUIX_PAGER") (getenv "PAGER") + "less") + OPEN_WRITE)))) (dynamic-wind (const #t) (lambda () (proc pager)) -- 2.29.2 From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH] ui: Launch $PAGER through the shell. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Nov 2020 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44663@debbugs.gnu.org Received: via spool by 44663-submit@debbugs.gnu.org id=B44663.160546961614371 (code B ref 44663); Sun, 15 Nov 2020 19:47:02 +0000 Received: (at 44663) by debbugs.gnu.org; 15 Nov 2020 19:46:56 +0000 Received: from localhost ([127.0.0.1]:54221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keNzD-0003jj-P9 for submit@debbugs.gnu.org; Sun, 15 Nov 2020 14:46:56 -0500 Received: from tobias.gr ([80.241.217.52]:40924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keNz9-0003jY-9G for 44663@debbugs.gnu.org; Sun, 15 Nov 2020 14:46:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=88OgwbgYRUfP8pFekmlImPhJleIDKzC3RRAFGTEUkF8=; h=date:in-reply-to: references:subject:to:from; b=g0nI1OvRh+kz8w7ARKL2YOAQlE+Zkm35dhtrLGHX 30D8vA9h6Gv1shHN7d2/Y1NEJz8eiPJFQLm0+G6022dyav0h7zuyZ4beiiozno+Y9w5xzB gLD3Xmn6Bh2EaEzy3v0LeqIst4S8xVqLlOJvXKjYAhqcqLBUsC45yiqrcAytD6Tb7M3OQ6 S8miZ2ySsgGwi6g6qHjqtRijJxgx0cVZx6CLz7GB237SoyBH6WZxVT2MUN28OblSvZd5cc RBvRc3c9p6PyVHGRcfRyuvNt2o1GJJgW5+JOkuSuQXxMN3GoJRcefSc6Uo9ophi4cNj3BM Dia5/Gdbtr6jhK3QrqDjbA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 97815745 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for <44663@debbugs.gnu.org>; Sun, 15 Nov 2020 19:46:54 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice References: <20201115184726.29944-1-me@tobias.gr> In-reply-to: <20201115184726.29944-1-me@tobias.gr> Date: Sun, 15 Nov 2020 20:46:47 +0100 Message-ID: <878sb2xv14.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Guix, Tobias Geerinckx-Rice via Guix-patches via =E5=86=99=E9=81=93=EF=BC=9A > This is the convention elsewhere and sounds like the right thing=20 > to do. Before this patch, using PAGER=3D failed: $ PAGER=3D guix search e In execvp of : No such file or directory $ With it, it fails in a slightly worse way: $ PAGER=3D guix search e $ # nothing, because we spawn the shell that swallows all Attached are two possible solutions. One falls back to =E2=80=98less=E2=80= =99,=20 the other to no paging. I think I prefer the former (=E2=80=98Ignore empty $PAGER variables=E2=80= =99)=20 because the concept of =E2=80=98unset but empty=E2=80=99 could confuse =E2= =80=98users=E2=80=99.=20 Is that too patronising? Do tell. Kind regards, T G-R --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ui-Ignore-empty-PAGER-variables.patch Content-Transfer-Encoding: quoted-printable From=20dc64aadd9b124df37fcdf2f6dc057b61cf05a473 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 15 Nov 2020 20:36:32 +0100 Subject: [PATCH] ui: Ignore empty $PAGER variables. * guix/ui.scm (call-with-paginated-output-port): Treat "" as unset. =2D-- guix/ui.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 66614eef7c..584afc65dd 100644 =2D-- a/guix/ui.scm +++ b/guix/ui.scm @@ -1673,8 +1673,11 @@ zero means that PACKAGE does not match any of REGEXP= S." ;; instead of 'r': this strips hyperlinks but allows 'less' to make a ;; good estimate of the line length. (let ((pager (with-environment-variables `(("LESS" ,less-options)) =2D (open-pipe (or (getenv "GUIX_PAGER") (getenv "PAGER= ") =2D "less") + ;; Ignore environment variables set to "" as if unset. + (open-pipe (find (lambda (s) (and s (not (string=3D? = "" s)))) + (list (getenv "GUIX_PAGER") + (getenv "PAGER") + "less")) OPEN_WRITE)))) (dynamic-wind (const #t) =2D-=20 2.29.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-ui-Disable-paging-if-PAGER-is-set-to-the-empty-strin.patch Content-Transfer-Encoding: quoted-printable From=20e1cf7e852c4a4c0cfce8c0de5625d026229dd71b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 15 Nov 2020 20:26:54 +0100 Subject: [PATCH] ui: Disable paging if $PAGER is set to the empty string. * guix/ui.scm (call-with-paginated-output-port): Don't open a pipe if $PAGE= R is "". =2D-- guix/ui.scm | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 66614eef7c..bb03e06759 100644 =2D-- a/guix/ui.scm +++ b/guix/ui.scm @@ -1663,24 +1663,27 @@ zero means that PACKAGE does not match any of REGEX= PS." =20 (define* (call-with-paginated-output-port proc #:key (less-options "FrX")) =2D (if (isatty?* (current-output-port)) =2D ;; Set 'LESS' so that 'less' exits if everything fits on the scree= n (F), =2D ;; lets ANSI escapes through (r), does not send the termcap =2D ;; initialization string (X). Set it unconditionally because some =2D ;; distros set it to something that doesn't work here. =2D ;; =2D ;; For things that produce long lines, such as 'guix processes', u= se 'R' =2D ;; instead of 'r': this strips hyperlinks but allows 'less' to mak= e a =2D ;; good estimate of the line length. =2D (let ((pager (with-environment-variables `(("LESS" ,less-options)) =2D (open-pipe (or (getenv "GUIX_PAGER") (getenv "PAGER= ") =2D "less") =2D OPEN_WRITE)))) =2D (dynamic-wind =2D (const #t) =2D (lambda () (proc pager)) =2D (lambda () (close-pipe pager)))) =2D (proc (current-output-port)))) + (let ((command (or (getenv "GUIX_PAGER") (getenv "PAGER") + "less"))) + ;; If a user types =E2=80=98PAGER=3D guix foo=E2=80=99 their intention= is probably to disable + ;; paging entirely, not to use Guix's default pager. + (if (and (not (string=3D? "" command)) + (isatty?* (current-output-port))) + ;; Set 'LESS' so that 'less' exits if everything fits on the scree= n (F), + ;; lets ANSI escapes through (r), does not send the termcap + ;; initialization string (X). Set it unconditionally because some + ;; distros set it to something that doesn't work here. + ;; + ;; For things that produce long lines, such as 'guix processes', u= se 'R' + ;; instead of 'r': this strips hyperlinks but allows 'less' to mak= e a + ;; good estimate of the line length. + (let ((pager (with-environment-variables `(("LESS" ,less-options)) + (open-pipe command OPEN_WRITE)))) + (dynamic-wind + (const #t) + (lambda () (proc pager)) + (lambda () (close-pipe pager)))) + (proc (current-output-port))))) =20 (define-syntax with-paginated-output-port (syntax-rules () =2D-=20 2.29.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX7GFpw0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15JZgBALaG1REpJTNylqtJt31+NVRwVhOBIXMJp1jmbq4G qgHZAP0fbctqYofXfp5Sg2ctS7kJmuPmRyY90XfHpxXotDY6Dw== =6BJg -----END PGP SIGNATURE----- --==-=-=-- From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH] ui: Launch $PAGER through the shell. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Nov 2020 20:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 44663@debbugs.gnu.org Received: via spool by 44663-submit@debbugs.gnu.org id=B44663.160547320120066 (code B ref 44663); Sun, 15 Nov 2020 20:47:02 +0000 Received: (at 44663) by debbugs.gnu.org; 15 Nov 2020 20:46:41 +0000 Received: from localhost ([127.0.0.1]:54279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keOv3-0005Da-2G for submit@debbugs.gnu.org; Sun, 15 Nov 2020 15:46:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keOv1-0005DL-U6 for 44663@debbugs.gnu.org; Sun, 15 Nov 2020 15:46:40 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47886) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keOuu-0007Ur-NC; Sun, 15 Nov 2020 15:46:32 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45250 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1keOuq-0007Dd-Ff; Sun, 15 Nov 2020 15:46:30 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20201115184726.29944-1-me@tobias.gr> Date: Sun, 15 Nov 2020 21:46:27 +0100 In-Reply-To: <20201115184726.29944-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Sun, 15 Nov 2020 19:47:26 +0100") Message-ID: <875z6673h8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Tobias Geerinckx-Rice skribis: > This is the convention elsewhere and sounds like the right thing to do. > > * guix/ui.scm (call-with-paginated-output-port): Substitute OPEN-PIPE > for OPEN-PIPE*. > > Reported by Daniel Brooks . What=E2=80=99s the rationale though? Are there cases where this makes a practical difference? I=E2=80=99m all for avoiding the shell if there=E2=80=99s no need for it. Thanks, Ludo=E2=80=99. From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH] ui: Launch $PAGER through the shell. Resent-From: Daniel Brooks Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Nov 2020 21:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 44663@debbugs.gnu.org, Tobias Geerinckx-Rice Received: via spool by 44663-submit@debbugs.gnu.org id=B44663.160547632525407 (code B ref 44663); Sun, 15 Nov 2020 21:39:01 +0000 Received: (at 44663) by debbugs.gnu.org; 15 Nov 2020 21:38:45 +0000 Received: from localhost ([127.0.0.1]:54401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kePjQ-0006bi-PY for submit@debbugs.gnu.org; Sun, 15 Nov 2020 16:38:45 -0500 Received: from smtp-out-4.mxes.net ([198.205.123.69]:50838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kePjO-0006bU-GR for 44663@debbugs.gnu.org; Sun, 15 Nov 2020 16:38:43 -0500 Received: from Customer-MUA (mua.mxes.net [10.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 2877675983; Sun, 15 Nov 2020 16:38:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mxes.net; s=mta; t=1605476317; bh=hyNJaWT7hdMsgj9/UBibCbU+1jzbCsE1nZGWb2wPXk0=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=S7HGVdM6xRB/YOmB3KtMfHVXwnLKSbFgCB0l6R9kL2U6oeDaXIkH7Yn8OZ55StHNI cQmGtcdDKVNGhDJ5VdNT2+xsfiFP2M8wmA6cMlttp8DhmQsNjan8rUX0G9mEZ5OqAh N2B9tofp1rXGMPVBvEay33spi7H3i6tyx5pNz2GM= From: Daniel Brooks References: <20201115184726.29944-1-me@tobias.gr> <875z6673h8.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGOfPtRkwAAABJQ TFRFpKfbdou67PD6JjJgAwUWXGSeIcyLHgAAAkZJREFUOI1VU8Fy6yAMxLi+Q13fCZ3cnQL3dqTc 7RD+/1feStDXVnXHDuvVSivZTMba2GPdw3gyCGcMAFxTyrTd9dwGoxHiZX9PmRFUHYAQlGGtXY+F Uk0SJOxgJiUEnH1qkitT9D+pQub7qGAmUbR6bu3CvI96Yv6QqkBBMrsyfZccr1/RDXGDTLf4P7ZY glVxe2V+/ACXWO1gvDO9/gDRpFFVmPluvLcmBjd5H6d8DEte+Pbk4rcY/Fa5tLKLOtCZsuQKYhpa LOkYDT7hESya7/WIET3lfQBqX0pwFtbI832Is0ayMUR9B+12xjgPCQ089cfwkCkX6L5TPmRelJTh zMS0Sz1PyjLAMCUWjcmgQLWQMds+e3aaauZDf9dU9A2/8kPVF2odCUoMKHkfjJR+mbgC+DRiycw5 3XSqGe6HmhN/AWjHypkAXOAFW5EiuA1ge2GiZuMb0s1fSEXcATeLUfbyEY2L8yPOmdSsdghQXx3K pz2eoeXuYvMCINVFDrCdNfVUp4eJ6cSEbjbgFjBEvonGGTrgv9cHjAc8aVgSAPoxaONbzfwhDIhR at7IIS7fAGiDSwIA9alhhTBzfA7YM2FY6eMwayrIGK8FDFmshmUA43WqhFtpvoqG9HHaJ7fqtgTz 8EWVkgZgtsylFliHDgk0MB7KAEC45C/rgnGvanNLXyzOeTzcT2nw/N44gfrtYXRQLoz9Q3TgmJRx 2Mx/Q51qzpm+l3m8z2SWBqC5+PZXAtNYlGFf/gKfHfjFkDT4x7od7R+w3Ls+ZdQBuQAAAABJRU5E rkJggg== Date: Sun, 15 Nov 2020 13:38:35 -0800 In-Reply-To: <875z6673h8.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 15 Nov 2020 21:46:27 +0100") Message-ID: <877dqm47xg.fsf@db48x.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Sent-To: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Ludovic Court=C3=A8s writes: > What=E2=80=99s the rationale though? Are there cases where this makes a > practical difference? The error I hit was effectively running PAGER=3Dless -FXRS guix search foo. Everything else that uses PAGER handles this case just fine. db48x From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH] ui: Launch $PAGER through the shell. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Nov 2020 08:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Daniel Brooks Cc: 44663@debbugs.gnu.org, Tobias Geerinckx-Rice Received: via spool by 44663-submit@debbugs.gnu.org id=B44663.160551462731984 (code B ref 44663); Mon, 16 Nov 2020 08:18:02 +0000 Received: (at 44663) by debbugs.gnu.org; 16 Nov 2020 08:17:07 +0000 Received: from localhost ([127.0.0.1]:54997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keZhC-0008Jn-Rz for submit@debbugs.gnu.org; Mon, 16 Nov 2020 03:17:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keZhA-0008Io-H1 for 44663@debbugs.gnu.org; Mon, 16 Nov 2020 03:17:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58230) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keZh5-0005kq-6G; Mon, 16 Nov 2020 03:16:59 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46964 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1keZh4-00072e-JT; Mon, 16 Nov 2020 03:16:58 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20201115184726.29944-1-me@tobias.gr> <875z6673h8.fsf@gnu.org> <877dqm47xg.fsf@db48x.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Brumaire an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 16 Nov 2020 09:16:57 +0100 In-Reply-To: <877dqm47xg.fsf@db48x.net> (Daniel Brooks's message of "Sun, 15 Nov 2020 13:38:35 -0800") Message-ID: <87h7pp4sxy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Daniel Brooks skribis: > Ludovic Court=C3=A8s writes: > >> What=E2=80=99s the rationale though? Are there cases where this makes a >> practical difference? > > The error I hit was effectively running PAGER=3Dless -FXRS guix search > foo. Everything else that uses PAGER handles this case just fine. Oh, I see, hmm. I feel that going through the shell makes things more brittle, but you describe a valid use case, so maybe we should just go ahead and apply the patch Tobias posted. Ludo=E2=80=99. From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH v2] ui: Handle multiword and empty $PAGER values. References: <20201115184726.29944-1-me@tobias.gr> In-Reply-To: <20201115184726.29944-1-me@tobias.gr> Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Nov 2020 16:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44663@debbugs.gnu.org Received: via spool by 44663-submit@debbugs.gnu.org id=B44663.16066682259344 (code B ref 44663); Sun, 29 Nov 2020 16:44:01 +0000 Received: (at 44663) by debbugs.gnu.org; 29 Nov 2020 16:43:45 +0000 Received: from localhost ([127.0.0.1]:52385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjPnc-0002Qe-IT for submit@debbugs.gnu.org; Sun, 29 Nov 2020 11:43:44 -0500 Received: from tobias.gr ([80.241.217.52]:38036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjPnY-0002QT-Or for 44663@debbugs.gnu.org; Sun, 29 Nov 2020 11:43:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=bY1af1f81MCGv099uR3oGNc5XYQP7kod275b3nb91D8=; h=date:subject:to: from; b=VOwZP40YUaIRrpCoa6lcAdlHB8Q599PCnHr4Myb/7Hm7Sb0XWPZ0RLqHGq5udg 8NGlDMdm67aw3Jfr6LXI6nl4mdBoiz5F4t3ezAQ+71JRbUmV35OkBHheU3VaW7vUmU9+1E assz/By5SUF7woSpRM7vbaa9Y752MPk1ldSp8ZkuwHXHNORRxgUn47KUjMF4q3ydpo45nQ mmDFn3fgkcIegzk8l2B8p2TrSSFDkmFIPyYiOsEbmJaUKSlpmZq637FRGxOQTsvEgzLsm6 5ZbAXhoNJ+s0zTnFYdpT6Lqc4xdWaQWlDo9iRZIDDzhNcuVC0bedMHrrkJeURpN0/r13eg == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id c0256940 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for <44663@debbugs.gnu.org>; Sun, 29 Nov 2020 16:43:50 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Sun, 29 Nov 2020 17:43:28 +0100 Message-Id: <20201129164328.18776-1-me@tobias.gr> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/ui.scm (call-with-paginated-output-port): Empty PAGER values disable paging. Non-empty ones are split into command arguments. Reported by Daniel Brooks . --- guix/ui.scm | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index a59be74ecd..37099eac7b 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2018 Kyle Meyer ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2019 Chris Marusich -;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019 Simon Tournier ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Maxim Cournoyer @@ -1675,24 +1675,33 @@ zero means that PACKAGE does not match any of REGEXPS." (define* (call-with-paginated-output-port proc #:key (less-options "FrX")) - (if (isatty?* (current-output-port)) - ;; Set 'LESS' so that 'less' exits if everything fits on the screen (F), - ;; lets ANSI escapes through (r), does not send the termcap - ;; initialization string (X). Set it unconditionally because some - ;; distros set it to something that doesn't work here. - ;; - ;; For things that produce long lines, such as 'guix processes', use 'R' - ;; instead of 'r': this strips hyperlinks but allows 'less' to make a - ;; good estimate of the line length. - (let ((pager (with-environment-variables `(("LESS" ,less-options)) - (open-pipe* OPEN_WRITE - (or (getenv "GUIX_PAGER") (getenv "PAGER") - "less"))))) - (dynamic-wind - (const #t) - (lambda () (proc pager)) - (lambda () (close-pipe pager)))) - (proc (current-output-port)))) + (let ((pager-command-line (or (getenv "GUIX_PAGER") + (getenv "PAGER") + "less"))) + ;; Setting PAGER to the empty string conventionally disables paging. + (if (and (not (string-null? pager-command-line)) + (isatty?* (current-output-port))) + ;; Set 'LESS' so that 'less' exits if everything fits on the screen + ;; (F), lets ANSI escapes through (r), does not send the termcap + ;; initialization string (X). Set it unconditionally because some + ;; distros set it to something that doesn't work here. + ;; + ;; For things that produce long lines, such as 'guix processes', use + ;; 'R' instead of 'r': this strips hyperlinks but allows 'less' to + ;; make a good estimate of the line length. + (let* ((pager (with-environment-variables `(("LESS" ,less-options)) + (apply open-pipe* OPEN_WRITE + ;; Split into arguments. Treat runs of multiple + ;; whitespace characters as one. libpipeline- + ;; style "cmd one\ arg" escaping is unsupported. + (remove "" + (string-split pager-command-line + char-set:whitespace)))))) + (dynamic-wind + (const #t) + (lambda () (proc pager)) + (lambda () (close-pipe pager)))) + (proc (current-output-port))))) (define-syntax with-paginated-output-port (syntax-rules () -- 2.29.2 From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] ui: Launch $PAGER through the shell. References: <20201115184726.29944-1-me@tobias.gr> In-Reply-To: <20201115184726.29944-1-me@tobias.gr> Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Nov 2020 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44663@debbugs.gnu.org Received: via spool by 44663-submit@debbugs.gnu.org id=B44663.160666872810119 (code B ref 44663); Sun, 29 Nov 2020 16:53:01 +0000 Received: (at 44663) by debbugs.gnu.org; 29 Nov 2020 16:52:08 +0000 Received: from localhost ([127.0.0.1]:52389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjPvk-0002d8-JR for submit@debbugs.gnu.org; Sun, 29 Nov 2020 11:52:08 -0500 Received: from tobias.gr ([80.241.217.52]:38222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjPvj-0002d0-NJ for 44663@debbugs.gnu.org; Sun, 29 Nov 2020 11:52:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=CUKB2D/JNYDWLPpe59K5YtRn8vgCuILyAOD99OX+FvM=; h=date:subject:to: from; b=gYkDGNVZtEny8y/osLSm4a6c+qCyEEIN2O0/hBUhja8mwjmGp4niTNM0zbeJYg 9Z7PcHmULjFllKZAGypCkkfctbK3JMG2Kh0wx4iGCdsGd+qDQoJ1WiscUnSD11t4YMigRc ZJb+Vsahbwm1FBQVgbNq0tbzGcad8qyurBFs3nlKjE9TFzifB/weECWuIPaSvH21zIGs1b StkxcParXZqykVpOyUWLL68HQUgTILq64hJ6NPDxKmFDzkdS3dOOp21jPcohSkKqLIpIpv de2o2bpYrM5b2jr/ziGsOpbOeU/FGqJxhffb+klIiAYtS6nvALnP1NndMxsyCSuZ/dGeUw == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id fea4dc4a (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for <44663@debbugs.gnu.org>; Sun, 29 Nov 2020 16:52:18 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice Date: Sun, 29 Nov 2020 17:52:05 +0100 Message-ID: <87blfgyukq.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; format=flowed > I feel that going through the shell makes things more brittle I don't think it's brittle but it's icky. Using OPEN-PIPE is just the easiest way to get the shell to do free parsing for us. It also allows using pipes and for-loops in PAGER so I agree it's not ideal. Here's a v2 that does more work for less result, but feels less dirty :-) Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX8PRtQ0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15SecBAKRIDfX3so6MXkoMVFoR+3sodq0sQIYnCzeMkRpK H6kXAQDyvNmSSyqd/irgHIL9fpvr7hJtJ3Fc7uwnQOGz3J4lBQ== =YkI8 -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 13 11:11:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#44663] [PATCH v2] ui: Handle multiword and empty $PAGER values. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Nov 2020 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44663@debbugs.gnu.org X-Debbugs-Original-To: Tobias Geerinckx-Rice via Guix-patches X-Debbugs-Original-Cc: 44663@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160666902710617 (code B ref -1); Sun, 29 Nov 2020 16:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2020 16:57:07 +0000 Received: from localhost ([127.0.0.1]:52396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjQ0Z-0002lB-Cp for submit@debbugs.gnu.org; Sun, 29 Nov 2020 11:57:07 -0500 Received: from lists.gnu.org ([209.51.188.17]:52044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjQ0Y-0002l4-A3 for submit@debbugs.gnu.org; Sun, 29 Nov 2020 11:57:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjQ0X-0005Ng-I1 for guix-patches@gnu.org; Sun, 29 Nov 2020 11:57:05 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]:48354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjQ0V-00026X-LZ for guix-patches@gnu.org; Sun, 29 Nov 2020 11:57:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=lCk5WI83tN9lcI934btxg7wlp/CxMphJJgLT+auFGBk=; h=date:in-reply-to: references:subject:cc:to:from; b=JEWcL2FBA+0SUkdqwixc0aStcgVBIWL3EXx9c JT8C/yQX3QdGizisZC+AvLtZbWr5v6ewX4gIiHCsR9BeareiWG9BQuzBR8M2dOgclP0wQ0 rkVW9rpdXL14Y3osBM70iSEuw1U7emAtu5OcgnfUn0xOvjImqnRuP4K4pgTiq4zDg2j3S2 xkO+ucAvwT1K1sNbKOAHLYKfnNg2ZSOVV5HQIZhL7VHPXc1PlTDPtpy1vqpA5jyC6spD1Q KZ58aaWBIDZseWs1nb6D+RHC/xymO2MyesNKa85b2KlVcBE4seYwMEReVFFspIZAp7pU+W nn1TfpHktgZRRFBuHZYURoF+w== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 35c374af (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sun, 29 Nov 2020 16:57:12 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice References: <20201115184726.29944-1-me@tobias.gr> <20201129164328.18776-1-me@tobias.gr> In-reply-to: <20201129164328.18776-1-me@tobias.gr> Date: Sun, 29 Nov 2020 17:56:59 +0100 Message-ID: <878sakyuck.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; format=flowed ...it's also missing a #:use-module ((rnrs lists) #:select (remove)) that got dropped on the floor. This module already imports SRFI-1, so that's some bonus ick for you. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX8PS2w0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15LFoA/2J7gPLgeGRyD59SdWG2mgXjMg5XWcUBVSl6Yswr ssQuAQDvw9+bXFV7YuezZF//T2eQOrmDj1H1UrRxz7Ew2BcKAQ== =D6H4 -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 13 11:11:47 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tobias Geerinckx-Rice Subject: bug#44663: closed (Re: bug#44663: [PATCH] ui: Launch $PAGER through the shell.) Message-ID: References: <87lf5i8ff3.fsf_-_@gmail.com> <20201115184726.29944-1-me@tobias.gr> X-Gnu-PR-Message: they-closed 44663 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 44663@debbugs.gnu.org Date: Tue, 03 Aug 2021 20:04:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1628021042-17763-1" This is a multi-part message in MIME format... ------------=_1628021042-17763-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #44663: [PATCH] ui: Launch $PAGER through the shell. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 44663@debbugs.gnu.org. --=20 44663: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D44663 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1628021042-17763-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 44663-done) by debbugs.gnu.org; 3 Aug 2021 20:03:05 +0000 Received: from localhost ([127.0.0.1]:41596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mB0cz-0004bJ-KF for submit@debbugs.gnu.org; Tue, 03 Aug 2021 16:03:05 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:33580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mB0cx-0004ao-6P for 44663-done@debbugs.gnu.org; Tue, 03 Aug 2021 16:03:04 -0400 Received: by mail-qk1-f175.google.com with SMTP id t66so629331qkb.0 for <44663-done@debbugs.gnu.org>; Tue, 03 Aug 2021 13:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+dXUxITqzf3KVGJG+ScD2Eh2Cx6lv5SJlmzpRw14QGk=; b=MrFLYC8MEaIi9Bau9WoLqY65u2QJ9cybBjh8iSZzuvy/1xP7h+KDTaD7SPJ/uAbi08 WTdpKsqlRiFaaFhOh9Geib/fxOxvcOP6K8gcWQjZ79VFkY1Ohi6fhqV6WxJs8BtRAMmv lc6YJarz5z2cvUaBvg5KPlwEh75FXOkltGeZsjs4wYxHA7RudqGqL4VglO2PI4F7OJ1F KHghIYkipaHfypsvXq8ZiuXdeuggumvs5mbcP1yQgeFF125ByaED3NMkbOLRJNWtIkQc VesEEFKfwL7YhWa9+pLFZtbHvaL8v2MMvfFjMrj9wWmE3oSQ7Q/tqfiD+DdHEH/J6ckS 1Kag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+dXUxITqzf3KVGJG+ScD2Eh2Cx6lv5SJlmzpRw14QGk=; b=pnQVk5H+dg4PUbnWbg/Jrey8yxgyVxjzzJ+g3PnDUNjeE861B+1vcRzJ9tGlopNxos Z6gfuPtb45Apa2WLCVkXcOKhCMzjLYgqrt0/+JKZD8LQ7xTlMR5t24vzGtctjogP9kWD kXq3I6eFvivWMu/jRPI0CGsdARImwEJG8IQweD0xEGU9Ud7V6HjD1kq3qUXllQ61xcI6 5V9zYclHuBddUJ5shh3abuwkOIl4X01JSpy3P528bZYDiTs54lDMXGE5RR1pGelvUYC6 oP8s7K7/sqzQm5LiL7ZV58GIaNANzvSY8fEmjoUkO6Zfm0zJmaTduQ850zVsTrbC2XAC dz9A== X-Gm-Message-State: AOAM533YtuBtGCUoAZWjE9qAQJCY+kjbgXh3WtoHIGvnp2iNVyqnnzLj yZfLYQfMZwuANlew98JV0xBdWnZtyjHBC/62 X-Google-Smtp-Source: ABdhPJycj8YYajyLhtt50n6DODtgMF5rh0g34w/R9Sz/WcxQR6CG7X8bIuUIhmsH+LoCnASQyWIpbw== X-Received: by 2002:a37:a40d:: with SMTP id n13mr20159529qke.14.1628020977665; Tue, 03 Aug 2021 13:02:57 -0700 (PDT) Received: from hurd (dsl-10-129-132.b2b2c.ca. [72.10.129.132]) by smtp.gmail.com with ESMTPSA id x10sm4873794qkl.82.2021.08.03.13.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 13:02:57 -0700 (PDT) From: Maxim Cournoyer To: Tobias Geerinckx-Rice Subject: Re: bug#44663: [PATCH] ui: Launch $PAGER through the shell. References: <20201115184726.29944-1-me@tobias.gr> <20201129164328.18776-1-me@tobias.gr> Date: Tue, 03 Aug 2021 16:02:56 -0400 In-Reply-To: <20201129164328.18776-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Sun, 29 Nov 2020 17:43:28 +0100") Message-ID: <87lf5i8ff3.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44663-done Cc: 44663-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hey, Tobias Geerinckx-Rice writes: > * guix/ui.scm (call-with-paginated-output-port): Empty PAGER values > disable paging. Non-empty ones are split into command arguments. > > Reported by Daniel Brooks . > --- > guix/ui.scm | 47 ++++++++++++++++++++++++++++------------------- > 1 file changed, 28 insertions(+), 19 deletions(-) I see this got pushed with a81258c12415b9cee52c951b8b53cbe46f27654f about a year ago. Closing! Maxim ------------=_1628021042-17763-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Nov 2020 18:48:01 +0000 Received: from localhost ([127.0.0.1]:54170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keN4C-0002Du-PA for submit@debbugs.gnu.org; Sun, 15 Nov 2020 13:48:01 -0500 Received: from lists.gnu.org ([209.51.188.17]:60792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keN4B-0002Dn-L7 for submit@debbugs.gnu.org; Sun, 15 Nov 2020 13:48:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keN4B-0007Ci-3A for guix-patches@gnu.org; Sun, 15 Nov 2020 13:47:59 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]:50574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keN49-0004Lj-1f for guix-patches@gnu.org; Sun, 15 Nov 2020 13:47:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=YUddEm8O4bylBw5ksrbUUacby2UF4HbvGP148ggcGzw=; h=date:subject:to: from; b=E2jvIAN8n8JHo+1RF6w0Flw6sPcZRC8KiTxsGBxCTIXntLiSmoUaTsYIPtiu/0 YTHKCbSAWzJIiEx1LRDBvp7PmQFTKjfAlkG0A4hsQ46jMhw3bFd1c9w01OjSMGzOx7vcW7 0GZycXstlPmsDJSK7EKdTeX1a3uneQqy0rHiqqQjCOXBMy5+qeVbpf2Wocsv/ujuaGUYPX YxZWf3UUrK8sijbj1oikj6GBkPKD6pmL3qKq38seUkrVg2+LsYFGu8LVYut1hFPpOGoc+k zO/ntunz2tnahxElbXhrZFHRQCo6urMZb2oPtX1+O0lfaHiXpjBiUgz40g0hAUkvkllN0A == Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 1a1e3318 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Sun, 15 Nov 2020 18:47:57 +0000 (UTC) From: Tobias Geerinckx-Rice To: guix-patches@gnu.org Subject: [PATCH] ui: Launch $PAGER through the shell. Date: Sun, 15 Nov 2020 19:47:26 +0100 Message-Id: <20201115184726.29944-1-me@tobias.gr> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) This is the convention elsewhere and sounds like the right thing to do. * guix/ui.scm (call-with-paginated-output-port): Substitute OPEN-PIPE for OPEN-PIPE*. Reported by Daniel Brooks . --- guix/ui.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 4e686297e8..2b7d9dd64b 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -72,7 +72,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (ice-9 regex) - #:autoload (ice-9 popen) (open-pipe* close-pipe) + #:autoload (ice-9 popen) (open-pipe close-pipe) #:autoload (system base compile) (compile-file) #:autoload (system repl repl) (start-repl) #:autoload (system repl debug) (make-debug stack->vector) @@ -1673,9 +1673,9 @@ zero means that PACKAGE does not match any of REGEXPS." ;; instead of 'r': this strips hyperlinks but allows 'less' to make a ;; good estimate of the line length. (let ((pager (with-environment-variables `(("LESS" ,less-options)) - (open-pipe* OPEN_WRITE - (or (getenv "GUIX_PAGER") (getenv "PAGER") - "less"))))) + (open-pipe (or (getenv "GUIX_PAGER") (getenv "PAGER") + "less") + OPEN_WRITE)))) (dynamic-wind (const #t) (lambda () (proc pager)) -- 2.29.2 ------------=_1628021042-17763-1--