From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 17:12:55 2022 Received: (at submit) by debbugs.gnu.org; 9 Feb 2022 22:12:55 +0000 Received: from localhost ([127.0.0.1]:53026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvCp-0006Wx-40 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 17:12:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:45506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvCm-0006Wo-HR for submit@debbugs.gnu.org; Wed, 09 Feb 2022 17:12:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHvCm-0000T7-Bj for guix-patches@gnu.org; Wed, 09 Feb 2022 17:12:52 -0500 Received: from [2001:470:142:3::e] (port=40126 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 1nHvCk-0007Bj-S1; Wed, 09 Feb 2022 17:12:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=dt3b1XQIhrLHlWc+XtrQ5jzQV4KIhfjtQwJ0+Foeu/Q=; b=mgDsVpcCpJXvkc fElxRGnxwgjn5FbiL5vRKPGfkYvIRkOSUjD/C03/4ayoibQQY4tL+osFhADUEUdBzCPsivwwz64u1 zbsq0fEHFqNyUoaU4Y3zfzZlJLnUQyxXo5nBT+4Frq+yj1oZDOWd+CKT5Glakqw6Sbq7MyQFN9E6C EHD2w4jgXcMPY0tw0mteD5JCWMwtuYsHFzsTppTmfXTlTklNIDBlV3hKe7OQrFd+ys1RA4osBnFk1 GG+u7rDae5iNErXmXwIqvPRDc11T+2MT2pJlaEua+xU00h/jFQvik++wI46t3nkYg5eLoOqL4jiKw fIMkCpzJ6vuDeZj2cwvQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56740 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 1nHvCh-0008Fd-OH; Wed, 09 Feb 2022 17:12:50 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default Date: Wed, 9 Feb 2022 23:12:37 +0100 Message-Id: <20220209221237.8549-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 X-Debbugs-Cc: zimoun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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! The other day on IRC zimoun noted that ‘guix pull -l’ doesn’t work for them because it prints those long package lists, which incidentally makes it slower. This series changes ‘guix pull -l’ so that by default it only prints channel info and news: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix pull -l Generation 192 Oct 25 2021 00:12:47 guix b5f45a2 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: b5f45a21c27b80210753e184e52708bb75a347bb Generation 193 Oct 25 2021 21:29:18 guix b0735c7 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: b0735c79b0d1d34117ec36d5dc5f14a3f9392bc1 News for channel 'guix' New `guix shell' command supersedes `guix environment' commit 746584e0ca200e7bf51b139ceb36c19ea81d6ef1 A new `guix shell' command is now available. It is similar to `guix environment', but with a more convenient interface (`guix environment' is deprecated but will remain available until May, 1st 2023). The main difference compared to `guix environment' is that the "ad hoc" mode is the default. Thus, to create an interactive environment containing Python, NumPy, and SciPy, you would run: guix shell python python-numpy python-scipy To get a development environment for, say, Inkscape, pass the `-D' flag: guix shell -D inkscape Another difference is that running `guix shell' without arguments loads `manifest.scm' or `guix.scm' for the current directory or an ancestor, provided you allowed it. The command maintains a cache to speed up access to such environments. Run `info "(guix) Invoking guix shell"' for more information. Generation 194 Nov 07 2021 23:40:30 guix bd41e59 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: bd41e590dd24e54797fb8b6854c244efd4d12df5 --8<---------------cut here---------------end--------------->8--- One can pass ‘--details’ to get view new/upgraded packages: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix pull --detail -l Generation 192 Oct 25 2021 00:12:47 guix b5f45a2 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: b5f45a21c27b80210753e184e52708bb75a347bb Generation 193 Oct 25 2021 21:29:18 guix b0735c7 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: b0735c79b0d1d34117ec36d5dc5f14a3f9392bc1 3 new packages: lttng-tools, vim-gitgutter, vim-mucomplete 7 packages upgraded: flatpak@1.12.1, libportal@0.4, mspdebug@0.25-0.4c4d94e, p11-kit@0.24.0, reprotest@0.7.18, xdg-desktop-portal-gtk@1.10.0, xdg-desktop-portal@1.10.1 News for channel 'guix' New `guix shell' command supersedes `guix environment' --8<---------------cut here---------------end--------------->8--- Last, ‘guix pull -l’ pipes its output to $PAGER by default. Thoughts? Ludo’. Ludovic Courtès (4): pull: '--list-generations' doesn't list package changes by default. ui: 'with-paginated-output-port' gives access to the wrapped port. ui: 'display-generation' uses color when talking to a pager. pull: '--list-generations' pipes its output to the pager. doc/guix.texi | 15 +++++++++------ guix/scripts/pull.scm | 35 +++++++++++++++++++++++++++-------- guix/ui.scm | 24 ++++++++++++++++++++++-- 3 files changed, 58 insertions(+), 16 deletions(-) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 17:17:29 2022 Received: (at 53909) by debbugs.gnu.org; 9 Feb 2022 22:17:29 +0000 Received: from localhost ([127.0.0.1]:53034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHE-0006fp-PX for submit@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHD-0006fW-9u for 53909@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:28 -0500 Received: from [2001:470:142:3::e] (port=40174 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 1nHvH8-0007vL-3a; Wed, 09 Feb 2022 17:17:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=MF/HiabR09+GoXLAMtT94CBWTz2bKXNtJSuyfRqWdkk=; b=eBRgLRJg70OEJa O393hJam+i99Ck0JH9hDZ/qUKYz+EqU7algFiKWOq2rIK9ohlFOlOshZK0JulPE9a7Mch8AN9G/Bf R0+uIT+cqbrlSwiiEjGuMmClkYIeUutw3mbxeeivO9cdLM0+zBcGg8Z7/0qnB6EkKN9+FQR6zZ3or 1HnAbjsJ7S+QOC095ypnyET1K3EfGxWeM8NY4/I66Zh9dsxdG12X7LQSO00fwvt3UmMoLPSZpmPrQ OlIkfDyMIxCEIF0a9aHxdYlJ2Kkp1url7+acs78peLXfiOt0dFVFyKBTsG+JE6hKcQ+kUAZgmI0Qw FeuWOYUpn0zMcLH7/EUw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56742 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 1nHvH7-0000In-KP; Wed, 09 Feb 2022 17:17:21 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 53909@debbugs.gnu.org Subject: [PATCH 1/4] pull: '--list-generations' doesn't list package changes by default. Date: Wed, 9 Feb 2022 23:17:09 +0100 Message-Id: <20220209221712.8724-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53909 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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/scripts/pull.scm (show-help, %options): Add "--details". (process-query): Honor it. * doc/guix.texi (Invoking guix pull): Document it. --- doc/guix.texi | 15 +++++++++------ guix/scripts/pull.scm | 19 +++++++++++++++---- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 583ba1c61d..5ef750786f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4426,18 +4426,12 @@ Generation 2 Jun 11 2018 11:02:49 repository URL: https://git.savannah.gnu.org/git/guix.git branch: origin/master commit: e0cc7f669bec22c37481dd03a7941c7d11a64f1d - 2 new packages: keepalived, libnfnetlink - 6 packages upgraded: emacs-nix-mode@@2.0.4, - guile2.0-guix@@0.14.0-12.77a1aac, guix@@0.14.0-12.77a1aac, - heimdal@@7.5.0, milkytracker@@1.02.00, nix@@2.0.4 Generation 3 Jun 13 2018 23:31:07 (current) guix 844cc1c repository URL: https://git.savannah.gnu.org/git/guix.git branch: origin/master commit: 844cc1c8f394f03b404c5bb3aee086922373490c - 28 new packages: emacs-helm-ls-git, emacs-helm-mu, @dots{} - 69 packages upgraded: borg@@1.1.6, cheese@@3.28.0, @dots{} @end example @xref{Invoking guix describe, @command{guix describe}}, for other ways to @@ -4507,6 +4501,15 @@ is provided, the subset of generations that match @var{pattern}. The syntax of @var{pattern} is the same as with @code{guix package --list-generations} (@pxref{Invoking guix package}). +By default, this prints information about the channels used in each +revision as well as the corresponding news entries. If you pass +@option{--details}, it will also print the list of packages added and +upgraded in each generation compared to the previous one. + +@item --details +Instruct @option{--list-generations} to display more information about +the differences between subsequent generations---see above. + @item --roll-back @cindex rolling back @cindex undoing transactions diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index fb8ce50fa7..707f1f0929 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2013-2015, 2017-2022 Ludovic Courtès ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice ;;; @@ -104,6 +104,8 @@ (define (show-help) (display (G_ " -l, --list-generations[=PATTERN] list generations matching PATTERN")) + (display (G_ " + --details show details when listing generations")) (display (G_ " --roll-back roll back to the previous generation")) (display (G_ " @@ -138,6 +140,9 @@ (define %options (lambda (opt name arg result) (cons `(query list-generations ,arg) result))) + (option '("details") #f #f + (lambda (opt name arg result) + (alist-cons 'details? #t result))) (option '("roll-back") #f #f (lambda (opt name arg result) (cons '(generation roll-back) @@ -640,17 +645,23 @@ (define (package-alist generation) (define (process-query opts profile) "Process any query on PROFILE specified by OPTS." + (define details? + (assoc-ref opts 'details?)) + (match (assoc-ref opts 'query) (('list-generations pattern) (define (list-generations profile numbers) (match numbers ((first rest ...) (display-profile-content profile first) + (let loop ((numbers numbers)) (match numbers ((first second rest ...) - (display-profile-content-diff profile - first second) + (if details? + (display-profile-content-diff profile + first second) + (display-profile-content profile second)) (display-channel-news (generation-file-name profile second) (generation-file-name profile first)) (loop (cons second rest))) @@ -754,7 +765,7 @@ (define (environment-variable) (define-command (guix-pull . args) (synopsis "pull the latest revision of Guix") - (define (no-arguments arg _‌) + (define (no-arguments arg _) (leave (G_ "~A: extraneous argument~%") arg)) (with-error-handling -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 17:17:33 2022 Received: (at 53909) by debbugs.gnu.org; 9 Feb 2022 22:17:33 +0000 Received: from localhost ([127.0.0.1]:53040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHJ-0006gE-6v for submit@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHH-0006fg-Hv for 53909@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:31 -0500 Received: from [2001:470:142:3::e] (port=40176 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 1nHvHC-0007vg-Af; Wed, 09 Feb 2022 17:17:26 -0500 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=7mZfvdYFtUAa52+j8mx2Wy/qVs7EUoWYXZVKHW4L/d4=; b=o35N3Dy1Ya0cjwNHa46L DfVluHvuHPY/iHA+PIOZJFlbvB21H1fXG/l0dj3BVAm+TXVBgM3xs7WzHnzJoyu7UF9/sf6CQDR4n +Tnkg6g2nQ4dtAV5KDjJ/QKx+WLbXx5VkxdKR6WceilM4cSxLmMqLrRzg2Kv7lvVO4BmgJtP8WrhC +VgPynrKJg3i9CyZwKHJlBxokQBu27R4kO1KiE+8guZn4ovCPg4iSpoj6K3Ug/49s4SEn9RvXnY4e BF0516FaRgJJPJk97pjhTLCeZ5nSrh/upxp74Amtox/zpBWuK/AnPxnLSDUt9PSAd2q8SqKqmyrrM 4VXJf1CedW5QFQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56742 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 1nHvH8-0000In-8e; Wed, 09 Feb 2022 17:17:26 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 53909@debbugs.gnu.org Subject: [PATCH 2/4] ui: 'with-paginated-output-port' gives access to the wrapped port. Date: Wed, 9 Feb 2022 23:17:10 +0100 Message-Id: <20220209221712.8724-2-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220209221712.8724-1-ludo@gnu.org> References: <20220209221712.8724-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53909 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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 (pager-port-mapping): New variable. (pager-wrapped-port): New procedure. (call-with-paginated-output-port): Parameterize 'pager-port-mapping'. --- guix/ui.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/guix/ui.scm b/guix/ui.scm index 093de1b4ab..d1f92ce7be 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -124,6 +124,7 @@ (define-module (guix ui) file-hyperlink location->hyperlink + pager-wrapped-port with-paginated-output-port relevance package-relevance @@ -1665,6 +1666,20 @@ (define (package-relevance package regexps) zero means that PACKAGE does not match any of REGEXPS." (relevance package regexps %package-metrics)) +(define pager-port-mapping + ;; If a pager is being used, via 'with-paginated-output-port', this maps the + ;; pager port (pipe) to the underlying output port. + (make-parameter #f)) + +(define* (pager-wrapped-port #:optional (port (current-output-port))) + "If PORT is a pipe to a pager created by 'with-paginated-output-port', +return the underlying port. Otherwise return #f." + (match (pager-port-mapping) + ((pager . wrapped) + (and (eq? pager port) wrapped)) + (_ + #f))) + (define* (call-with-paginated-output-port proc #:key (less-options "FrX")) (let ((pager-command-line (or (getenv "GUIX_PAGER") @@ -1691,7 +1706,10 @@ (define* (call-with-paginated-output-port proc char-set:whitespace)))))) (dynamic-wind (const #t) - (lambda () (proc pager)) + (lambda () + (parameterize ((pager-port-mapping + (cons pager (current-output-port)))) + (proc pager))) (lambda () (close-pipe pager)))) (proc (current-output-port))))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 17:17:34 2022 Received: (at 53909) by debbugs.gnu.org; 9 Feb 2022 22:17:34 +0000 Received: from localhost ([127.0.0.1]:53042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHJ-0006gH-Ns for submit@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHI-0006fi-4l for 53909@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:32 -0500 Received: from [2001:470:142:3::e] (port=40178 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 1nHvHC-0007vr-U2; Wed, 09 Feb 2022 17:17:26 -0500 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=ODz3vm1xqoGajyW7xf64Z3/5TVhCbIlzk1eyeOc8RVw=; b=Fo1uzSt6bCkwcC3KWmoc S2AItsgoCWfWpwRev+z0nhN7bvf3gRCxMVXfZQ+Tm7ALstB58zpGaTFWKiBQpscrx+ht6mIjWHROp WqZBmksHvvM1MYzLE+12dG1aiWCP/1LuQ4YMBlfEZ54OEMrVnPluUyB4ydurzNEF33tpS4WK/gS3W ZNM6QpP3bbzHQw2PJXwmCJwClEZaNIYCgJSa6/gFlv6N+/hGEIp8zumYk5Uc0uzwbALzj6jQLsN1d MfE0qtSk8SxbmG7Og9b3kowAel2HmMJiA+ZVHO2Pc31IsqIfAvJ7+U7TKSUoQmSCkXfFdoG2KLQBl cUwpoZITrSWXhQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56742 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 1nHvHC-0000In-Hh; Wed, 09 Feb 2022 17:17:26 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 53909@debbugs.gnu.org Subject: [PATCH 3/4] ui: 'display-generation' uses color when talking to a pager. Date: Wed, 9 Feb 2022 23:17:11 +0100 Message-Id: <20220209221712.8724-3-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220209221712.8724-1-ludo@gnu.org> References: <20220209221712.8724-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53909 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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 (---) This makes sure that, say, 'guix pull -l' benefits from colors when its output is piped to a pager, as long as the underlying terminal supports it. * guix/ui.scm (display-generation): Add second argument to 'highlight'. --- guix/ui.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/ui.scm b/guix/ui.scm index d1f92ce7be..238952723e 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1900,7 +1900,9 @@ (define (display-generation profile number) (link (if (supports-hyperlinks?) (cut file-hyperlink file <>) identity)) - (header (format #f (link (highlight (G_ "Generation ~a\t~a"))) + (header (format #f (link (highlight (G_ "Generation ~a\t~a") + (or (pager-wrapped-port) + (current-output-port)))) number (date->string (time-utc->date -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 09 17:17:38 2022 Received: (at 53909) by debbugs.gnu.org; 9 Feb 2022 22:17:38 +0000 Received: from localhost ([127.0.0.1]:53046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHO-0006gc-03 for submit@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHvHK-0006fx-9t for 53909@debbugs.gnu.org; Wed, 09 Feb 2022 17:17:34 -0500 Received: from [2001:470:142:3::e] (port=40182 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 1nHvHE-0007w7-FI; Wed, 09 Feb 2022 17:17:29 -0500 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=+Sw8ifkbZzf1pA4fy3pvvDsB1wDDj9/qPTbxggOUH0g=; b=Ssnr/XsWpKoYGUO8fgxZ M4G5QCUZjHxGykqF88Z27SUOCaxX8lX9lOgtKRlhS9+DhyEufZlZ/S/ESATeqeNs0exkARyKt7lBy QjRTl+IJnvHSBU+24Y0Q1LNTok2bJBXpSxC1EZQ7Ky6cfRUFR/M570PowhdYiCKTTJ+yfYuFLS4DU 8HkOQyecxKKdOXk0xDbVtfPPKnB7cUuAxfAhna5FVROL+fQet7l19DreqOZT+ez98g/wbG4uGO4ER xier+uAggzsPFv8pP8H4RoCzVyWD8ZAibF0HrO71lyiY6APpOFt9RStI+sHARCLhKfINKZ5IctnT7 tk71ODd55nh9Ww==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56742 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 1nHvHD-0000In-5R; Wed, 09 Feb 2022 17:17:28 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 53909@debbugs.gnu.org Subject: [PATCH 4/4] pull: '--list-generations' pipes its output to the pager. Date: Wed, 9 Feb 2022 23:17:12 +0100 Message-Id: <20220209221712.8724-4-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220209221712.8724-1-ludo@gnu.org> References: <20220209221712.8724-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53909 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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/scripts/pull.scm (process-query): For 'list-generations queries, use 'with-paginated-output-port'. (display-news-entry-title): Pass second argument to 'highlight'. (display-news-entry): Pass second argument to 'dim'. --- guix/scripts/pull.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 707f1f0929..7fe738229b 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -279,7 +279,8 @@ (define title (texi->plain-text title)) ;; When Texinfo markup is invalid, display it as-is. - (const title))))))) + (const title))) + (or (pager-wrapped-port port) port))))) (define (display-news-entry entry channel language port) "Display ENTRY, a from CHANNEL, in LANGUAGE, a language @@ -291,7 +292,8 @@ (define commit (channel-news-entry-commit entry)) (display-news-entry-title entry language port) - (format port (dim (G_ " commit ~a~%")) + (format port (dim (G_ " commit ~a~%") + (or (pager-wrapped-port port) port)) (if (supports-hyperlinks?) (channel-commit-hyperlink channel commit) commit)) @@ -673,14 +675,20 @@ (define (list-generations profile numbers) (raise (condition (&profile-not-found-error (profile profile))))) ((not pattern) - (list-generations profile (profile-generations profile))) + (with-paginated-output-port port + (with-output-to-port port + (lambda () + (list-generations profile (profile-generations profile)))))) ((matching-generations pattern profile) => (match-lambda (() (exit 1)) ((numbers ...) - (list-generations profile numbers))))))) + (with-paginated-output-port port + (with-output-to-port port + (lambda () + (list-generations profile numbers)))))))))) (('display-news) (display-news profile)))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 12:51:22 2022 Received: (at 53909) by debbugs.gnu.org; 10 Feb 2022 17:51:22 +0000 Received: from localhost ([127.0.0.1]:57008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIDbG-0004Ih-Gt for submit@debbugs.gnu.org; Thu, 10 Feb 2022 12:51:22 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:33664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIDbE-0004IM-18 for 53909@debbugs.gnu.org; Thu, 10 Feb 2022 12:51:20 -0500 Received: by mail-wm1-f44.google.com with SMTP id y6-20020a7bc186000000b0037bdc5a531eso1575181wmi.0 for <53909@debbugs.gnu.org>; Thu, 10 Feb 2022 09:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=qQlNjrRPei38GSCfNeK7p9EUZaf0mRtB0H4sUC2Tugk=; b=fw4yhPCQkCJG30UX8gkdY5pyRgFWtqgHj9v1y5J2H4VxTRVJpXMDmeq5QfpE1Vpjhm SbyE+wN1u7tlZ+ftzMxOkG7hwomtI+k2MYU8EQ9U9JJeO87PaDeVwDezsZECm+ewSXjd U+9X9hDRFj22VKHD144t0ZOfZwi7+YJzO+cuBftAYY3hIBNqNeI7FS+A//Csq3z/FgIx dt0GS8gGrTPxsahjuJ3stLlskVog67AB3wOig695e1Ab8svrhWGXyAbyjM+DvIyH/DFi e3bC+hL3A1AMOl+MC4LIv5knk56YTDNVCSFHQcTYXCLxo1wSiDu2oVDfUWVQpOYMhmAH FSNQ== 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; bh=qQlNjrRPei38GSCfNeK7p9EUZaf0mRtB0H4sUC2Tugk=; b=Kgfsha6xf+zeRpc9PFz93Vf379xtXv652gKU5mzBv2Uob2tB35s/5YqxgGXS4UZiVy FUoeWOQug6+XSSyk3OjLv/UlCyFxi84uQfZ1Tpr8D4LjnpIoNsDbrLDLoZIWcpvhS1EN vv8sLZGptxfReXnH1blwlxRjlb4tjmcdqj5GOYXT5MdCXzM9tXOXgyBVSOgTlGxwCgBG MlJFKP+j1sYmaA6NLpMKn841Wr/Zez+VXV+Bh1KODU0A8rkCMXiWBZaxAYFlRcKNC2qo 8KQZlXyRajJC3y5XjlLnYy+4kWEp/yTGF++le4ZM7L4NSTCPrvPdvq8TcYvnJf4/4Qfx zRzg== X-Gm-Message-State: AOAM533SvMLeYj1x/d1uOPfBdesRP2Ebj9lAac5O2xChcolNLigxLQzI UVBrQpUeAg4RAf+l5MMmfsHXV7Jvr1I= X-Google-Smtp-Source: ABdhPJyGYhR0YwMD0e55qbio1yPTBonty4s/xcRO9ljUUqQ3X+gHkovUVpqKtJjnZBQTo3ODUil8pQ== X-Received: by 2002:a7b:cbd7:: with SMTP id n23mr3153049wmi.76.1644515473822; Thu, 10 Feb 2022 09:51:13 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id c5sm12620147wrq.102.2022.02.10.09.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 09:51:13 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default References: <20220209221237.8549-1-ludo@gnu.org> <20220209221712.8724-1-ludo@gnu.org> Date: Thu, 10 Feb 2022 18:21:49 +0100 In-Reply-To: <20220209221712.8724-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s=22's?= message of "Wed, 9 Feb 2022 23:17:09 +0100") Message-ID: <87mtiy8wnm.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53909 Cc: 53909@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 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Cool! Thanks. On Wed, 09 Feb 2022 at 23:17, Ludovic Court=C3=A8s wrote: > * guix/scripts/pull.scm (show-help, %options): Add "--details". IMHO, the commit online header should reflect that. > diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm [...] > (define (process-query opts profile) > "Process any query on PROFILE specified by OPTS." > + (define details? > + (assoc-ref opts 'details?)) > + > (match (assoc-ref opts 'query) > (('list-generations pattern) > (define (list-generations profile numbers) > (match numbers > ((first rest ...) > (display-profile-content profile first) > + > (let loop ((numbers numbers)) > (match numbers > ((first second rest ...) > - (display-profile-content-diff profile > - first second) > + (if details? > + (display-profile-content-diff profile > + first second) > + (display-profile-content profile second)) > (display-channel-news (generation-file-name profile secon= d) > (generation-file-name profile first= )) > (loop (cons second rest))) Well, "guix pull --details" pulls; which I find annoying. Instead, I propose to silently runs "guix pull --details -l", see this diff: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=foo.patch Content-Description: foo diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 707f1f0929..fb1dd6c82c 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -142,7 +142,9 @@ (define %options result))) (option '("details") #f #f (lambda (opt name arg result) - (alist-cons 'details? #t result))) + (alist-cons 'details? #t + (cons '(query list-generations #f) + result)))) (option '("roll-back") #f #f (lambda (opt name arg result) (cons '(generation roll-back) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Because warn people that "guix pull --details" alone is not what they want adds some complexity, and when '--details' only works in tandem with the option '--list-generations', that=E2=80=99s why I propose this behaviour. Last, about this change=E2=80=A6 > - (define (no-arguments arg _=E2=80=8C) > + (define (no-arguments arg _) =E2=80=A6it a Git twist? I miss what changed=E2=80=93=E2=80=93my whitespac= e mode is badly configured? Cheers, simon --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 12:51:23 2022 Received: (at 53909) by debbugs.gnu.org; 10 Feb 2022 17:51:23 +0000 Received: from localhost ([127.0.0.1]:57010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIDbG-0004Ik-Qz for submit@debbugs.gnu.org; Thu, 10 Feb 2022 12:51:23 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:45846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIDbE-0004IN-I0 for 53909@debbugs.gnu.org; Thu, 10 Feb 2022 12:51:20 -0500 Received: by mail-wm1-f49.google.com with SMTP id az26-20020a05600c601a00b0037c078db59cso53655wmb.4 for <53909@debbugs.gnu.org>; Thu, 10 Feb 2022 09:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=ByJqJW2o50nKkHlLenUR6AeeyRu+UVj9zBDoSGJqH2M=; b=ah0TjCbrr6yF52KGPQJY5nzUrtFrk+ABPALNwCK4jXb/xzirMNakql945SH+yx2uw1 D+ak60VlIqiKG82unPUzvUL6b71Zducgwabufr9sZFnXXNUhlvKmfVTpPpD9q3f5KPmh 6zjdMYsP2scEvCa16YPm9zKHSr2wlTTOLGf5ajFUdpkr4HeXRcAgB5wwTPlF9iOt7+jy GVJGX++0x943lx5gjPmnrJN7upK2wOKQ7zBqS+BTBRct5kKCLjk2t0X0hWgJ3QQdocC7 x6q+qHyHScBKsYR4LBwR7cZNJzDPb0RM4lJbGx26UG4Q2D91VPJ+NFRZrWPapt0w+dCv hcZQ== 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=ByJqJW2o50nKkHlLenUR6AeeyRu+UVj9zBDoSGJqH2M=; b=33oaDTHFm484368H8za8b0+089xa0OTpqzy7c6ipiSwiQKpk4uxohy0ntKnQsykcWR R1YloBegHgvzwv3fQVNymMea/f8yWgs13BZIWurO7LoE+ZHNj+C+c8um28cHUa1s9Qd/ RAAqCI+ThQJC2UfbVeBKC5h5/3at/Xnwn9zuX9uy1O9Boe8b2cP8lozqiRYUiniCq+bF l+anV0ZHi6XZD/e4ClFLs9tbLgrBPCvnQJumP+eZk6HcZ65/XlRzCf6MyHCBvnqYE9k8 9wn0teXArsVhVPUJPvKIwSnr3fOF1McaMJ/lAIJbSTSrH9+2kLwK8jlHioWNRKQtcCYJ aiRw== X-Gm-Message-State: AOAM531MCMd1TIeKJuzn46vMl/ht5xClk508xLg7G6oGxaUB/ChJyvY6 /3b/mwDeMo0apJX2vf91YO86jZ/8OoI= X-Google-Smtp-Source: ABdhPJz37p/CtVAKcbJH7hE7osybKUzkZFHnGnFdHzKLbkNg3tN69uH4XKzW+Z9o6ohQZyx/Qk6/vw== X-Received: by 2002:a7b:c350:: with SMTP id l16mr3014040wmj.146.1644515474900; Thu, 10 Feb 2022 09:51:14 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id u14sm2752229wmq.41.2022.02.10.09.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 09:51:14 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default References: <20220209221237.8549-1-ludo@gnu.org> Date: Thu, 10 Feb 2022 18:51:08 +0100 In-Reply-To: <20220209221237.8549-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s=22's?= message of "Wed, 9 Feb 2022 23:12:37 +0100") Message-ID: <87k0e28var.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53909 Cc: 53909@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 (-) Hi Ludo, On Wed, 09 Feb 2022 at 23:12, Ludovic Court=C3=A8s wrote: > The other day on IRC zimoun noted that =E2=80=98guix pull -l=E2=80=99 doe= sn=E2=80=99t work for > them because it prints those long package lists, which incidentally > makes it slower. My remark is based on the rate of changes. Let assume that regular users "pull" once a week =E2=80=93 I even guess it is less frequent than th= at. Here the number of additions this user would see for the last 10 weeks: --8<---------------cut here---------------start------------->8--- $ for i in $(seq 10); do git log --after=3D"$(($i + 1)) week ago" --before= =3D"$i week ago" --oneline | grep Add | wc -l; done 108 59 84 149 76 212 48 83 46 63 --8<---------------cut here---------------end--------------->8--- And for Update, it reads: --8<---------------cut here---------------start------------->8--- 106 115 103 247 261 134 167 99 100 145 --8<---------------cut here---------------end--------------->8--- Therefore, the current display of =E2=80=9Cguix pull -l=E2=80=9D is not hum= an readable. > $ ./pre-inst-env guix pull --details -l Note it hits bug#50472 [1]. Other said, guix pull -l --details does not work as expected. 1: Ludovic Court=C3=A8s (4): > pull: '--list-generations' doesn't list package changes by default. > ui: 'with-paginated-output-port' gives access to the wrapped port. > ui: 'display-generation' uses color when talking to a pager. > pull: '--list-generations' pipes its output to the pager. Well, I am mainly running CLI with Emacs =E2=80=99M-x shell=E2=80=99, so Em= acs is my pager. :-) However, I have tried with xterm and PAGER=3Dless, nothing is different. Do I miss something? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 07:56:30 2022 Received: (at 53909) by debbugs.gnu.org; 14 Feb 2022 12:56:30 +0000 Received: from localhost ([127.0.0.1]:40132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJau6-0006df-B8 for submit@debbugs.gnu.org; Mon, 14 Feb 2022 07:56:30 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJau5-0006dP-AQ for 53909@debbugs.gnu.org; Mon, 14 Feb 2022 07:56:29 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 5936F5D3; Mon, 14 Feb 2022 13:56:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T7XNg8gjYx7J; Mon, 14 Feb 2022 13:56:20 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 621A228B; Mon, 14 Feb 2022 13:56:20 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default References: <20220209221237.8549-1-ludo@gnu.org> <87k0e28var.fsf@gmail.com> Date: Mon, 14 Feb 2022 13:56:19 +0100 In-Reply-To: <87k0e28var.fsf@gmail.com> (zimoun's message of "Thu, 10 Feb 2022 18:51:08 +0100") Message-ID: <87fsoly5cc.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 5936F5D3 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53909 Cc: 53909@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: -0.0 (/) Hi! zimoun skribis: > On Wed, 09 Feb 2022 at 23:12, Ludovic Court=C3=A8s wrote: > >> The other day on IRC zimoun noted that =E2=80=98guix pull -l=E2=80=99 do= esn=E2=80=99t work for >> them because it prints those long package lists, which incidentally >> makes it slower. > > My remark is based on the rate of changes. Let assume that regular > users "pull" once a week =E2=80=93 I even guess it is less frequent than = that. > > Here the number of additions this user would see for the last 10 weeks: [...] > Therefore, the current display of =E2=80=9Cguix pull -l=E2=80=9D is not h= uman readable. Yeah, though it=E2=80=99s searchable in $PAGER. >> $ ./pre-inst-env guix pull --details -l > > Note it hits bug#50472 [1]. Other said, > > guix pull -l --details > > does not work as expected. > > 1:> Ludovic Court=C3=A8s (4): >> pull: '--list-generations' doesn't list package changes by default. >> ui: 'with-paginated-output-port' gives access to the wrapped port. >> ui: 'display-generation' uses color when talking to a pager. >> pull: '--list-generations' pipes its output to the pager. > > Well, I am mainly running CLI with Emacs =E2=80=99M-x shell=E2=80=99, so = Emacs is my > pager. :-) However, I have tried with xterm and PAGER=3Dless, nothing is > different. Do I miss something? The output gets piped to the pager now, which wasn=E2=80=99t the case befor= e (I tested in xterm FWIW). Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 09:57:17 2022 Received: (at 53909-done) by debbugs.gnu.org; 14 Feb 2022 14:57:17 +0000 Received: from localhost ([127.0.0.1]:41874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJcmy-0002i1-HS for submit@debbugs.gnu.org; Mon, 14 Feb 2022 09:57:17 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:42250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJcmj-0002dA-6l for 53909-done@debbugs.gnu.org; Mon, 14 Feb 2022 09:57:15 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9C2E7566; Mon, 14 Feb 2022 15:56:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sW2WA9HNeKiq; Mon, 14 Feb 2022 15:56:53 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 54FB52D0; Mon, 14 Feb 2022 15:56:53 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default References: <20220209221237.8549-1-ludo@gnu.org> <20220209221712.8724-1-ludo@gnu.org> <87mtiy8wnm.fsf_-_@gmail.com> Date: Mon, 14 Feb 2022 15:56:52 +0100 In-Reply-To: <87mtiy8wnm.fsf_-_@gmail.com> (zimoun's message of "Thu, 10 Feb 2022 18:21:49 +0100") Message-ID: <87ilthwl6z.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 9C2E7566 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53909-done Cc: 53909-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: -0.0 (/) Hi, zimoun skribis: > On Wed, 09 Feb 2022 at 23:17, Ludovic Court=C3=A8s wrote: > >> * guix/scripts/pull.scm (show-help, %options): Add "--details". > > IMHO, the commit online header should reflect that. Right, fixed. > Well, "guix pull --details" pulls; which I find annoying. Instead, I > propose to silently runs "guix pull --details -l", see this diff: > > diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm > index 707f1f0929..fb1dd6c82c 100644 > --- a/guix/scripts/pull.scm > +++ b/guix/scripts/pull.scm > @@ -142,7 +142,9 @@ (define %options > result))) > (option '("details") #f #f > (lambda (opt name arg result) > - (alist-cons 'details? #t result))) > + (alist-cons 'details? #t > + (cons '(query list-generations #f) > + result)))) It=E2=80=99s a bit more complicated since you don=E2=80=99t want to overrid= e previous =E2=80=98-l=E2=80=99 arguments, but I did that. > Last, about this change=E2=80=A6 > >> - (define (no-arguments arg _=E2=80=8C) >> + (define (no-arguments arg _) > > =E2=80=A6it a Git twist? I miss what changed=E2=80=93=E2=80=93my whitesp= ace mode is badly > configured? There=E2=80=99s a ZERO WIDTH NON-JOINER above; you can see it with a trick I recently learned: (set-face-background 'glyphless-char "red"). :-) Anyway, pushed: 054ec2e242 pull: '--list-generations' pipes its output to the pager. 5b6e31b020 ui: 'display-generation' uses color when talking to a pager. 7ffcee1937 ui: 'with-paginated-output-port' gives access to the wrapped p= ort. b9df2e2b4d pull: '--list-generations' lists packages only with '--details= '. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 12:28:43 2022 Received: (at 53909-done) by debbugs.gnu.org; 14 Feb 2022 17:28:43 +0000 Received: from localhost ([127.0.0.1]:42476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJf9X-0000ta-7Z for submit@debbugs.gnu.org; Mon, 14 Feb 2022 12:28:43 -0500 Received: from mail-io1-f48.google.com ([209.85.166.48]:42886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJf9S-0000tK-6E for 53909-done@debbugs.gnu.org; Mon, 14 Feb 2022 12:28:42 -0500 Received: by mail-io1-f48.google.com with SMTP id r144so20704410iod.9 for <53909-done@debbugs.gnu.org>; Mon, 14 Feb 2022 09:28:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=b+pM91vihcwbCG3ZxrKuGed5o30UsriW7Fe53/dyInU=; b=h8W1yHI4RLZ2VJi6ZfH6ZVfeLO2bizX4HbVBvmEkwZminRoU27krglp55WhxbLhx5u zQlxB+yyUUkjMy3zS4YxkdoxeOXOM5z7tVW+Qv9ib9AKChsZyKq75KgWWaNt5fu8c45i icrbSOP38iY59nmwDIORCJhu3bKzkxXKU7nZLOrlI0L/lWETZ2Q0JxJPFDJq+0AOvIU/ OrJ8+6W6W1xffVmrjrE0MBxY+QkAzhImKK5QFc3ElBsero6mUD7EU6fPzwH1+2AFmM+B f8Lt1OQ7vGUxP0du//KwsBiFwTTS1qwRjLyyJKt044OcV7hoe+LJwGZhgRyBScgO9zj8 WmLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=b+pM91vihcwbCG3ZxrKuGed5o30UsriW7Fe53/dyInU=; b=rfkRNW7X+TErxbZkr+ms8h0YXiCx4hDf3IybBy+qbAGvkF3bG3xa0vwwWx96dQxO/9 FJ8HDuGu3coMZ2+4ALOj50NcCv50TSy4typWuCeB2N99v2KzL2I9iHDILsDdZ1LqP0Ue ePf+tM+Nr9PwIF895/d4UvdshHwFyFCi4xOBSI0JDr5hbt6bMujFpR8CCv7mrkUrvvn7 +FoOp2hXAEFN1cbG2EEREvQJNQ3Qo/dIpOwJ6zTlVAPGcKjoJ4HQVhTh/XzhvyZsLEkr ZIRofDl4WFEfoTIMXC9MZvfv3FSPrqVs7Uzkg2szqw/zlXik5cHUbDMTaV4eERDcDSKp sEeQ== X-Gm-Message-State: AOAM530GxXi3/cXQHld0ZzjjnKjdUEpfbsSZn6tvucjG+vOmTI+ZygvH mPLNqrWCtc6qUmOFHqlR6GXOBKTFuWicH6O455RZfRI+ X-Google-Smtp-Source: ABdhPJwQojjP65RYe56gC52+uARKDJdiJikb85vPLHIUSTjUWKq6JCmeWPpYtzbNlweH5Sg8iVKKDvu9RdSOEKuae1A= X-Received: by 2002:a02:6a44:: with SMTP id m4mr426357jaf.293.1644859712049; Mon, 14 Feb 2022 09:28:32 -0800 (PST) MIME-Version: 1.0 References: <20220209221237.8549-1-ludo@gnu.org> <20220209221712.8724-1-ludo@gnu.org> <87mtiy8wnm.fsf_-_@gmail.com> <87ilthwl6z.fsf_-_@gnu.org> In-Reply-To: <87ilthwl6z.fsf_-_@gnu.org> From: zimoun Date: Mon, 14 Feb 2022 18:28:21 +0100 Message-ID: Subject: Re: bug#53909: [PATCH 0/4] 'guix pull -l' no longer displays package lists by default To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53909-done Cc: 53909-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 (-) Hi Ludo, On Mon, 14 Feb 2022 at 15:56, Ludovic Court=C3=A8s wrote: > > (option '("details") #f #f > > (lambda (opt name arg result) > > - (alist-cons 'details? #t result))) > > + (alist-cons 'details? #t > > + (cons '(query list-generations #f) > > + result)))) > > It=E2=80=99s a bit more complicated since you don=E2=80=99t want to overr= ide previous > =E2=80=98-l=E2=80=99 arguments, but I did that. Ah yes, indeed. Keep the pattern. :-) > There=E2=80=99s a ZERO WIDTH NON-JOINER above; you can see it with a tric= k I > recently learned: (set-face-background 'glyphless-char "red"). Oh, cool. Thanks! > Anyway, pushed: Thanks for the quick fix and I hope more people will read now the news. :-) Cheers, simon From unknown Mon Aug 18 11:11:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 15 Mar 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator