From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WONDEke2oGLzdwEAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 16:46:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yDY6Eke2oGKUzgAA9RJhRA (envelope-from ) for ; Wed, 08 Jun 2022 16:46:31 +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 D2CE09334 for ; Wed, 8 Jun 2022 16:46:30 +0200 (CEST) Received: from localhost ([::1]:37434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nywx3-00022k-H3 for larch@yhetil.org; Wed, 08 Jun 2022 10:46:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nywqp-0002md-3y for guix-patches@gnu.org; Wed, 08 Jun 2022 10:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nywqo-0003LV-Rc for guix-patches@gnu.org; Wed, 08 Jun 2022 10:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nywqo-0005ek-No for guix-patches@gnu.org; Wed, 08 Jun 2022 10:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55845] [PATCH 0/1] Improve pager selection logic when less is not installed Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Jun 2022 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Taiju HIGASHI Cc: 55845@debbugs.gnu.org X-Debbugs-Original-Cc: 55845@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 55845-submit@debbugs.gnu.org id=B55845.165469918221692 (code B ref 55845); Wed, 08 Jun 2022 14:40:02 +0000 Received: (at 55845) by debbugs.gnu.org; 8 Jun 2022 14:39:42 +0000 Received: from localhost ([127.0.0.1]:43959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nywqT-0005do-WB for submit@debbugs.gnu.org; Wed, 08 Jun 2022 10:39:42 -0400 Received: from tobias.gr ([80.241.217.52]:40066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nywqP-0005dX-6x for 55845@debbugs.gnu.org; Wed, 08 Jun 2022 10:39:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=Uf1NGtv4J5uwI Wpkj6RJlBsu4OZEaRh2KPDkoPEVvUI=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=eqD4IpsxHKzCdTuU0kSV+3vcBgA/qYzz2koRVU P0MzepZUYRd2S7fekLOOQIqMwsveVkjz4dCeKjqq5FjrJWhI5EDVs0t3h/9ezArTivPVc8 GmrxJfLAqOJgsXqKf6ECOH8vNmep5ETs50e8wckJaK+lyWyBe8G+NlSIS5SeBRyw1KDlJG 5yzEFzPkFfbaBnnRNjF/RNbGcmLZjqKTYXxzw/yKAJS2kOxe1ruDyi0rktWgbkkw0uTuTH FjZ6yhxLAM8lQHI0uTG1aWMOTBd6mE9BY9M+tDL2ECktuRwUe5W0+gHvvnoGvguk/miQ8x WK179fh+fsSo3lfVfDoQGeiQ== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 272f922d (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 8 Jun 2022 14:39:34 +0000 (UTC) References: <20220608102124.14865-1-higashi@taiju.info> <87wndrwc5m@nckx> <8735gf47ul.fsf@taiju.info> Date: Wed, 08 Jun 2022 16:22:08 +0200 In-reply-to: <8735gf47ul.fsf@taiju.info> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87k09rw74q@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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" Reply-to: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via 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=1654699590; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=Uf1NGtv4J5uwIWpkj6RJlBsu4OZEaRh2KPDkoPEVvUI=; b=sa1cIg8YuejMmVKBUdS/XUMXsSlxzpUX/EfcmW6k82pJWDA9Ow0roS8QcyeLEMRkrpxBDv yciad0Mi9YOGjxQ4RmDIXlkheR+aMsvhB/vXi5U47ummYt6spj/cqAAhLiPA/oENfqtw48 +C90wlFd5wN0iqhiU/AW+QFhblC5uyyfSwCaCWo8qfpWFPbvFGbCOhPyRLQ1wH1PWz8Qyq tICyXZe9uJwRBRVT7dT5p4MiPjxqLGtKqNhC6TKpdrvQSZLfqxDJbX7mTTkpxqkv0JOcXS nk4wueimisNKz56JTZJcuNHXbbEsWAZ9RkZRPQKPSxOTY1PO4cMAvSHNk934bQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654699590; a=rsa-sha256; cv=none; b=hErjkwxvTZeeLTr/25PP68AH4l1JFjQxqd0VX8HvjfC2uD46IohbvMhqAJX3qjvJy40x9p JqQQHWrzpX/+OpSjmcuudXLGWMOyZ0H9sbDDT0BhyWuNckaLMgCnsxWY6m8DwvwsTOQ3Ko ELjIlXtx8er+w32tH7q8xN1gzuvL9SJkELpRQ2NbmPfZoiR6T4t1b0oQxf/n0BwBnpvGXA XS41DWxzw6Geu+7rj22TSEN6zgdFLbN3QU6gwa+EFFU83DX43w9Hd144ayTz/lHHpfuJAm l2wuRxO8WpWNFn/CRg/V+QuORbjSX8L17ZFs+C0EEBF9/pMtKF9eY714XgA08A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=eqD4Ipsx; 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: -6.50 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=eqD4Ipsx; 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: D2CE09334 X-Spam-Score: -6.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: Q2dQa13skn4u --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi again, Taiju HIGASHI =E5=86=99=E9=81=93=EF=BC=9A > I understand that I can delay the evaluation timing if I make it=20 > a > procedure, but is my understanding correct that the number of=20 > calls will > remain the same because it will be evaluated each time the > `call-with-paginated-output-port` procedure is called? Previously, it would have been evaluated even if=20 call-with-paginated-output-port was never called at all. As for the >0 calls case: yes=E2=80=A6 but when do we expect=20 call-with-paginated-output-port to be called more than once per=20 run? The use case for this code is to do something, then display it in=20 a pager and exit. I think calling it multiple times in one run=20 would imply bad UX. Do I misunderstand? > I agree with your point that it would be better to make it a=20 > procedure, > as it would be more eco-friendly to not have to evaluate when=20 > GUIX_PAGER > or PAGER is specified. I wish the rest of Guix were so efficient that it mattered :-) [/me is waiting for =E2=80=98guix pull=E2=80=99 as I reply to multiple mail= s, on=20 battery=E2=80=A6] Regardless, not calling a procedure at all is even more efficient=20 and IMO more readable here. > You mean that the $PATH lookup in open-pipe can be suppressed? Yes. OPEN-PIPE* won't need to stat $PATH at all if we give it=20 "/run/current-system/profile/bin/less" instead of "less". (It's not relevant to the above, but my previously reply=20 mistakenly mentioned a shell =E2=80=94 there is no shell involved with=20 OPEN-PIPE*, only with OPEN-PIPE. Sorry.) > I will just write what you have told me, but may I continue to=20 > modify > the patch? Of course! Curious how, though. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYqC05Q0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15P/AA/2cbBXHSGYEW1IztN5Vc8xA55LVoIwAiV8dY9xJn jT2cAP4t32jz4Yh88FxgEfjYw77tgG05sqB971XkBni38fR+Bw== =qZKk -----END PGP SIGNATURE----- --=-=-=--