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 MBoGBbcWo2J2OAEAbAwnHQ (envelope-from ) for ; Fri, 10 Jun 2022 12:02: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 wEzQBLcWo2KDUQEA9RJhRA (envelope-from ) for ; Fri, 10 Jun 2022 12:02: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 848B2A995 for ; Fri, 10 Jun 2022 12:02:30 +0200 (CEST) Received: from localhost ([::1]:48866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzbTI-0006UN-VI for larch@yhetil.org; Fri, 10 Jun 2022 06:02:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzaCU-0004WZ-LY for guix-patches@gnu.org; Fri, 10 Jun 2022 04:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzaCU-00048v-Ah for guix-patches@gnu.org; Fri, 10 Jun 2022 04:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzaCU-0003RP-5w for guix-patches@gnu.org; Fri, 10 Jun 2022 04:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55845] [PATCH 1/1] ui: Improve pager selection logic when less is not installed. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Jun 2022 08:41: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: Maxime Devos Cc: 55845@debbugs.gnu.org, me@tobias.gr Received: via spool by 55845-submit@debbugs.gnu.org id=B55845.165485043713186 (code B ref 55845); Fri, 10 Jun 2022 08:41:02 +0000 Received: (at 55845) by debbugs.gnu.org; 10 Jun 2022 08:40:37 +0000 Received: from localhost ([127.0.0.1]:48644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzaC5-0003Qc-2k for submit@debbugs.gnu.org; Fri, 10 Jun 2022 04:40:37 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:45811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzaC2-0003QP-9z for 55845@debbugs.gnu.org; Fri, 10 Jun 2022 04:40:35 -0400 Received: by mail-pf1-f178.google.com with SMTP id x138so1474899pfc.12 for <55845@debbugs.gnu.org>; Fri, 10 Jun 2022 01:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=SXkxZCJd4aBq41uITQgN6YFAp+MPbvhsnJjH7tQXLtM=; b=Fp35JjgwoiNTipGjvrW6lKzGoIElezlQhT24zxmuofYAXUjWe5o35S+5ssnAjhPUin IAE56oQHWkw4lCK1wKqMcZrujxHBS3fGSL1tfLDYxL9AUnpmk5j/LX+XaPP+JxA8tZcO /C+6QKggqXdJPQFZ41rYi+eOnCrThsIokf3GNUrl0+WJMmjzCKBSZgHZIXkxWmDtBKRI J2zu8rNMRPMqOYivUHqLA7r6VYO2+ohJCcIxYyh6d/ajBQk2Er+6t2gIG5QXipvIR1hk Y9K76Uq/sYqptgQdVUiqNun7w167ywgdO0e9bfQR/E+iGEhC9m4qOKi0XJ4cOVZUy1V6 gaBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=SXkxZCJd4aBq41uITQgN6YFAp+MPbvhsnJjH7tQXLtM=; b=rg9E9pZ0yTWoLS9N8g2odcFRzUBQqNX4Yy46MXuwd1stxv0Hvg6/461owGKi7uF+pN RsWFHRgpHNawrMBfwD0L6l0rZhC5HGbbvwTKGPGE5V1BthLUzUVYicUmTnbrkp2sgUx6 Pa1ZM51NbmoKJAK3kXQ0Waeuwv2JZ1alsIMVhbvSlQXJMnW3olEfY+zanA/2wa8el8b6 K0ZEsyGPN6ugUoY4lw9BqSteaQhGAxxKUt0DG1S3rQpi5n9MeX4+qm4UjPVdhsKHIEAj MI0wXuzZ7DKOrupDNthnnJSGhH3+jZVGqaF9IvDVDMOkE2cDTzhoypqsQAGTi5VYhlKy llRg== X-Gm-Message-State: AOAM530dQuVpUHsUBU5FHLqvno1oLW8NjSdQ5pR98nsmHPRBGUkMFm99 6laPC10yaxGRf+c80G2PTGIud5/2RUu5k2w9 X-Google-Smtp-Source: ABdhPJx3TKqH0yckv/iRNXLMIfadsEIZ+Jxs315H0FeLjz/WZEal9WmrWi0fSXIhLpWektjxm5fCOA== X-Received: by 2002:aa7:888c:0:b0:505:7832:98fc with SMTP id z12-20020aa7888c000000b00505783298fcmr44408342pfe.0.1654850427969; Fri, 10 Jun 2022 01:40:27 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id e14-20020a170902784e00b001679a4711e5sm6841819pln.108.2022.06.10.01.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 01:40:27 -0700 (PDT) From: Taiju HIGASHI References: <20220608102124.14865-1-higashi@taiju.info> <20220608102257.15042-1-higashi@taiju.info> <87leu72sbo.fsf@taiju.info> <55fe6cdbed891707aca419ff4eedd7c37ef3eb03.camel@telenet.be> <87fskexiyc.fsf@taiju.info> <874k0uxhif.fsf@taiju.info> <5ccb68a4dc80a02baaf6d19fd782145b6b62e7b5.camel@telenet.be> <87a6alwdvn.fsf@taiju.info> Date: Fri, 10 Jun 2022 17:40:24 +0900 In-Reply-To: (Maxime Devos's message of "Fri, 10 Jun 2022 09:47:30 +0200") Message-ID: <87r13wvrlz.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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=1654855350; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=SXkxZCJd4aBq41uITQgN6YFAp+MPbvhsnJjH7tQXLtM=; b=TZPxpCRzpbEsacAsBHLGHvjc1qfVpvFGslcq1TUctsfpTExkxNYcjpJKrsHt1TS8SC9U5j PhqTIrD7JtLHzzX3XpozLB308FoTPKnV8uIfA99rtMVTle3o/Sd0Tkbe5zSerNUYztxtmA U0TtNb0TLfefVKsdonXcDP11DRkbOsdES+I79GX/nYKuWfqRsI7AxO/2/QmigqfWJ8VzRC yZdzSpTU/Xir7z8/UquXZ4V6h1Vev/cTKzcRMZP6CbKh1aRzLKH7HZHYfMsWyOhnVp6aV/ DjbLqUkSh3ayE67Hs4k6EPTCMsSpAeMLp6euKYbbA2PEkifvsoKuWbaHAtwR8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654855350; a=rsa-sha256; cv=none; b=KgXCeikb0P6RkBoySC36QNRKLnJXYb5xsmBywsdMKGQu0i+m7ZvJV1HxOfMmi3POBtAGqB ixKHAfLKOGqeix+3Y9Cz2lOqQ3eWD9z0QpBX+4XVuDXf8jfkC5F4rHLglwEtO6QC+wvu8b a5XGuflfiwJdihTfiEIurKjoecYkHieSJwmAZoMg0omzj7EWn+LH/B6JhRKtTo7H48CvhH hU4sVNqMhBu3XtKocwrjnK7uYPy2/1qrEQs5tIa3xax/wm1LwnEYUJCsihuWjzqYiWhBr4 faWvBh0Xrr1u/uq0ajLgPyIFBsSbqinnSZfBup0CBWT3o6W4ifgdORr++5zhVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=Fp35Jjgw; dmarc=none; 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: 1.22 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=Fp35Jjgw; dmarc=none; 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: 848B2A995 X-Spam-Score: 1.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: EQyjXw7dEy0T Maxime Devos writes: > Taiju HIGASHI schreef op vr 10-06-2022 om 09:39 [+0900]: >> +=A0=A0=A0=A0 (with-environment-variables >> +=A0=A0=A0=A0=A0=A0=A0=A0 `(("PATH" ,dir)) > > Wait, looking at the definition of with-environment-variables, if PAGER > was set when running "make check" (try "GUIX_PAGER=3Dless make check > TESTS=3Dtests/ui.scm"), it will still be set when the test is run > (unverified). Maybe it should be unset? Proposal: > > Change > > (match-lambda > ((variable value) > (setenv variable value) > > to > > (match-lambda > ((variable #false) > (unsetenv variable)) > ((variable value) > (setenv variable value) > > > and change the with-environment-variables to > > (with-environment-variables > `(("PATH ,dir) > ("PAGER" #false) > ("GUIX_PAGER" #false)) > [...]). > > and likewise for the other tests? Sorry, I easily used with-environment-variable*s* because the interface looked convenient, but perhaps I should have used with-environment-variable defined in guix/tests.scm. However, using this one does not seem to solve the problem. Should I modify with-environment-variable*s*? > (string=3D? ((@@ (guix ui) find-available-pager)) "guix-pager"))))) > > Nitpick: find-available-pager is not an exported procedure, so due to > optimisations, it can dissappear (be inlined into call-with-paginated- > output-port). So to be 100% robust, it needs to be exported, or a line > > (set! find-avaible-pager find-available-pager) ; used in tests/ui.scm > > needs to be added in guix/ui.scm, or the tests needs to be adjusted > to always use with-paginated-output-port instead of > find-available-pager. Thank you. I will modify it in one of the ways you suggested. I did not understand the optimization behavior. Thank you very much. Thanks, --=20 Taiju