From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Apr 2023 21:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 62958@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168194146726636 (code B ref -1); Wed, 19 Apr 2023 21:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Apr 2023 21:57:47 +0000 Received: from localhost ([127.0.0.1]:36035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppFoB-0006vY-Ad for submit@debbugs.gnu.org; Wed, 19 Apr 2023 17:57:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:33638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppFo6-0006vN-A9 for submit@debbugs.gnu.org; Wed, 19 Apr 2023 17:57:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppFo6-0004xC-37 for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2023 17:57:42 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppFo4-00006O-4T for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2023 17:57:41 -0400 From: Spencer Baugh Date: Wed, 19 Apr 2023 17:57:38 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 Tags: patch Paging is useless and annoying in comint-derived commands such as async-shell-command and M-x shell. It is a frequent footgun for new Emacs users when they try to run commands which start a pager in such modes. I know a number of users who set PAGER=cat in their Emacs to avoid it. Simply adding (setenv "PAGER" "cat") globally is not correct, since that will break modes like term, which support paging quite well. It's only and exactly the comint-derived modes which don't need paging. Changing the default to "cat" in this way might be a bit controversial... In GNU Emacs 29.0.60 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2023-03-13 built on igm-qws-u22796a Repository revision: e759905d2e0828eac4c8164b09113b40f6899656 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --with-x-toolkit=lucid --with-modules --with-gif=ifavailable' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Set-PAGER-cat-in-comint.el.patch >From 0069a0253c73567b131ddc75d57e29d405d11a72 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Wed, 19 Apr 2023 17:44:54 -0400 Subject: [PATCH] Set PAGER=cat in comint.el Paging is useless and annoying in comint-derived commands such as async-shell-command and M-x shell. It is a frequent footgun for new Emacs users when they try to run commands which start a pager in such modes. I know a number of users who set PAGER=cat in their Emacs to avoid it. Simply adding (setenv "PAGER" "cat") globally is not correct, since that will break modes like term, which support paging quite well. It's only and exactly the comint-derived modes which don't need paging. Changing the default to "cat" in this way might be a bit controversial... * lisp/comint.el (comint-pager): Add, defaulted to "cat". (comint-exec-1): Use comint-pager to set PAGER. --- lisp/comint.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/comint.el b/lisp/comint.el index 682b555a33c..915907c1bb9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -258,6 +258,15 @@ comint-input-ring-file-name file) :group 'comint) +(defcustom comint-pager "cat" + "If non-nil, the value to use for PAGER. +gWhen this is nil, comint doesn't set PAGER at all." + :version "30.1" + :type '(choice (const :tag "Don't set PAGER" nil) + (const :tag "cat" "cat") + string) + :group 'comint) + (defvar comint-input-ring-file-prefix nil "The prefix to skip when parsing the input ring file. This is useful in Zsh when the extended_history option is on.") @@ -864,6 +873,7 @@ comint-exec-1 (nconc (comint-term-environment) (list (format "INSIDE_EMACS=%s,comint" emacs-version)) + (when comint-pager (list (format "PAGER=%s" comint-pager))) process-environment)) (default-directory (if (file-accessible-directory-p default-directory) -- 2.30.2 --=-=-=-- From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Apr 2023 06:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168197297927196 (code B ref 62958); Thu, 20 Apr 2023 06:43:01 +0000 Received: (at 62958) by debbugs.gnu.org; 20 Apr 2023 06:42:59 +0000 Received: from localhost ([127.0.0.1]:36345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppO0R-00074Z-GM for submit@debbugs.gnu.org; Thu, 20 Apr 2023 02:42:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppO0M-00074J-CP for 62958@debbugs.gnu.org; Thu, 20 Apr 2023 02:42:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppO0G-000427-JO; Thu, 20 Apr 2023 02:42:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HxrY+PtRhz9m2CTiHyP3/VYNz+yDGDeatD+1whZz9BQ=; b=hGGoIYxi77sI AB4brFF9o/sP5qTWkOcTt39+snzvLXngJRU2hun2J91k5SQMpm/IVis/8hru9QqpnzUKnRcANWVn2 fnpx8Rrk+xAcYRo/QQSlDJRw7qR/NXmG0zVGhj30QP2i+h1e/uFDVZJ7ajturc/FfdOVQ1IRdOZ2e ehNA/dYAaehgMa7q2UoqFas9obAwP747OVNnkieNWc8ZU2w43r18YHvEIyeaGfVPbol22ujCmosiK 39bNMEXgmIeqLMOOX/f/yEeDV9jU5c5eTL5wDJptZ6WzwhS5FC3WBUVYSQl75SPBgiCYjTMKuuj+6 eoK1LLQjX3od9gISKrb2xA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppO0F-0006Qm-4L; Thu, 20 Apr 2023 02:42:48 -0400 Date: Thu, 20 Apr 2023 09:43:00 +0300 Message-Id: <83edof6oln.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Wed, 19 Apr 2023 17:57:38 -0400) References: 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 (---) > From: Spencer Baugh > Date: Wed, 19 Apr 2023 17:57:38 -0400 > > Simply adding (setenv "PAGER" "cat") globally is not correct, since > that will break modes like term, which support paging quite well. > It's only and exactly the comint-derived modes which don't need > paging. > > Changing the default to "cat" in this way might be a bit > controversial... Sorry, this default cannot be universally correct. You assume that 'cat' is always available, which is not true on non-Posix platforms. So at the very least the value should be set according to executable-find. Having said that, I'm not really sure the default should be "cat" even if it is available, since AFAIK you are the only one who is unhappy with the current situation. So why not leave the default value as it is, i.e. nil? > +(defcustom comint-pager "cat" > + "If non-nil, the value to use for PAGER. This is too terse. It should at least say that the value should be a program name, a string. Bonus point for explaining what is PAGER, for those who don't necessarily know off-hand. > +gWhen this is nil, comint doesn't set PAGER at all." ^ Typo. Also, "set PAGER" is again too terse. > + :version "30.1" > + :type '(choice (const :tag "Don't set PAGER" nil) > + (const :tag "cat" "cat") The tag of "cat" is too terse again. It should at least include the word "program" somewhere. > @@ -864,6 +873,7 @@ comint-exec-1 > (nconc > (comint-term-environment) > (list (format "INSIDE_EMACS=%s,comint" emacs-version)) > + (when comint-pager (list (format "PAGER=%s" comint-pager))) Should this test that comint-pager is a string? From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Apr 2023 15:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168200567413218 (code B ref 62958); Thu, 20 Apr 2023 15:48:02 +0000 Received: (at 62958) by debbugs.gnu.org; 20 Apr 2023 15:47:54 +0000 Received: from localhost ([127.0.0.1]:38560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppWVl-0003Qv-7v for submit@debbugs.gnu.org; Thu, 20 Apr 2023 11:47:53 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:37989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppWVg-0003Pp-E2 for 62958@debbugs.gnu.org; Thu, 20 Apr 2023 11:47:50 -0400 From: Spencer Baugh In-Reply-To: <83edof6oln.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Apr 2023 09:43:00 +0300") References: <83edof6oln.fsf@gnu.org> Date: Thu, 20 Apr 2023 11:47:42 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Date: Wed, 19 Apr 2023 17:57:38 -0400 >> >> Simply adding (setenv "PAGER" "cat") globally is not correct, since >> that will break modes like term, which support paging quite well. >> It's only and exactly the comint-derived modes which don't need >> paging. >> >> Changing the default to "cat" in this way might be a bit >> controversial... > > Sorry, this default cannot be universally correct. You assume that > 'cat' is always available, which is not true on non-Posix platforms. > So at the very least the value should be set according to > executable-find. executable-find is not correct in the case of "cat" unfortunately, because there are programs (git, for one) which if they see PAGER=cat, just don't start a pager at all, for greater efficiency. (which is desirable behavior) > Having said that, I'm not really sure the default should be "cat" even > if it is available, since AFAIK you are the only one who is unhappy > with the current situation. So why not leave the default value as it > is, i.e. nil? Yes okay, I'll leave the default as it is. >> +(defcustom comint-pager "cat" >> + "If non-nil, the value to use for PAGER. > > This is too terse. It should at least say that the value should be a > program name, a string. Bonus point for explaining what is PAGER, for > those who don't necessarily know off-hand. Hm, yes, I have updated the docstring to explain the issue, it's worth having a good explanation. Hopefully this isn't too verbose now :) >> +gWhen this is nil, comint doesn't set PAGER at all." > ^ > Typo. Also, "set PAGER" is again too terse. > >> + :version "30.1" >> + :type '(choice (const :tag "Don't set PAGER" nil) >> + (const :tag "cat" "cat") > > The tag of "cat" is too terse again. It should at least include the > word "program" somewhere. > >> @@ -864,6 +873,7 @@ comint-exec-1 >> (nconc >> (comint-term-environment) >> (list (format "INSIDE_EMACS=%s,comint" emacs-version)) >> + (when comint-pager (list (format "PAGER=%s" comint-pager))) > > Should this test that comint-pager is a string? I don't think that's necessary; doing (if (stringp comint-pager) (list (format "PAGER=%s" comint-pager))) would have unexpected behavior if comint-pager was accidentally set to a non-string; doing (when comint-pager (progn (assert (stringp comint-pager)) (list (format "PAGER=%s" comint-pager)))) is a bit verbose and looks weird and is probably not that important. Revised patch: commit a375cb9c1260edb40a92f11fdec7f6910538135d Author: Spencer Baugh Date: Wed Apr 19 17:44:54 2023 -0400 Set PAGER=cat in comint.el Paging can be undesirable in comint-derived commands such as async-shell-command and M-x shell. It is a frequent footgun for new Emacs users when they try to run commands which start a pager in such modes. Simply adding (setenv "PAGER" "cat") globally is not correct, since that will break modes like term, which support paging quite well. It's only and exactly the comint-derived modes which don't need paging. * lisp/comint.el (comint-pager): Add. (comint-exec-1): Use comint-pager to set PAGER. diff --git a/lisp/comint.el b/lisp/comint.el index 682b555a33c..37e189e4bbf 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -258,6 +258,49 @@ comint-input-ring-file-name file) :group 'comint) +(defcustom comint-pager nil + "If non-nil, name of the program to use as a pager. + +If non-nil, comint sets the PAGER environment variable to this +value before starting a subprocess. PAGER controls the pager +that will be used. If you prefer to not use a pager, you can set +this variable to \"cat\". + +If nil, the PAGER environment variable is not set and the default +pager will be used. On Unix systems, typically this is \"less\". + +Some programs start a pager before producing output. A pager +supports viewing text page by page, so that if the parent program +produces more output than will fit on the screen, that output can +be viewed incrementally. + +When a program is running under Emacs, this behavior can be +undesirable, since Emacs itself supports viewing text page by +page, and a pager requires input from the user before it will +show more text. Furthermore, comint is not a full fledged +terminal emulator, so a pager will typically behave badly. + +However, pagers also provide backpressure: They will not consume +more output from the parent program than the user has actually +viewed, which on Unix means the output pipe will fill up and the +parent program will be stopped from producing unnecessary output. +Many programs (such as \"git log\") take advantage of this by +producing large amounts of output by default and relying on the +pager to not consume text that the user doesn't view. + +Emacs and comint do not keep track of what text the user has +viewed, so they can't provide backpressure like a pager does. +This means users who do not use a pager should be careful to not +run commands which produce a lot of output. Users can avoid this +by limiting the amount of output (such as with \"git log -n10\") +or by using native Emacs interfaces instead (such as +`vc-print-log').") + :version "30.1" + :type '(choice (const :tag "Don't set PAGER" nil) + (const :tag "Don't do paging (PAGER=cat)" "cat") + string) + :group 'comint) + (defvar comint-input-ring-file-prefix nil "The prefix to skip when parsing the input ring file. This is useful in Zsh when the extended_history option is on.") @@ -864,6 +907,7 @@ comint-exec-1 (nconc (comint-term-environment) (list (format "INSIDE_EMACS=%s,comint" emacs-version)) + (when comint-pager (list (format "PAGER=%s" comint-pager))) process-environment)) (default-directory (if (file-accessible-directory-p default-directory) From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Apr 2023 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168200620314832 (code B ref 62958); Thu, 20 Apr 2023 15:57:02 +0000 Received: (at 62958) by debbugs.gnu.org; 20 Apr 2023 15:56:43 +0000 Received: from localhost ([127.0.0.1]:38565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppWeI-0003r9-Nf for submit@debbugs.gnu.org; Thu, 20 Apr 2023 11:56:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppWeD-0003qq-P6 for 62958@debbugs.gnu.org; Thu, 20 Apr 2023 11:56:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppWe8-0007eK-3A; Thu, 20 Apr 2023 11:56:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9T0soKzcKwVhIzhKm/9BlvxWjr2TSiZGNVsa2mjhowg=; b=cvBBM0SWmPKy hZ7+I7iUuOhwmpK0ovPf2M2aidcsrS/toVZPi4n67UkL9wkm+RZ6RZXGPHdXwDdB72786KbAeSKPi VNQwlgd2R9l2eDSjee+LlO5ljTAxgjZRj1sveoY7S7shzkZv+zNcNgbXOifxPtdGHIIJWfGRFfPgq HSqT+Co4a/stHx2M+uZzgmYKCNOQ5Tx4DBKinMNaYF9P6emxTa0M9CDLS+VZXZpxY3FvESfrkcGAc 8UkaNnsRxaH7k/vVRXUMU5iOU1vUdRyR+qLV2/DgTKgRhzuPS7QYABUdDecKQ+wcc8ftH0cuynT+3 BU3XIv7uo33sL8qoaf03Xg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppWe7-0005Gs-JQ; Thu, 20 Apr 2023 11:56:31 -0400 Date: Thu, 20 Apr 2023 18:56:45 +0300 Message-Id: <83zg724kea.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Thu, 20 Apr 2023 11:47:42 -0400) References: <83edof6oln.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: 62958@debbugs.gnu.org > Date: Thu, 20 Apr 2023 11:47:42 -0400 > > Eli Zaretskii writes: > > > Sorry, this default cannot be universally correct. You assume that > > 'cat' is always available, which is not true on non-Posix platforms. > > So at the very least the value should be set according to > > executable-find. > > executable-find is not correct in the case of "cat" unfortunately, > because there are programs (git, for one) which if they see PAGER=cat, > just don't start a pager at all, for greater efficiency. (which is > desirable behavior) Is this about removing the leading directories from the value of executable-find? If so, that is trivial to do, and is not the main point of what I wrote. > > Should this test that comint-pager is a string? > > I don't think that's necessary; doing > (if (stringp comint-pager) (list (format "PAGER=%s" comint-pager))) > would have unexpected behavior if comint-pager was accidentally set to a > non-string; doing > (when comint-pager (progn (assert (stringp comint-pager)) > (list (format "PAGER=%s" comint-pager)))) > is a bit verbose and looks weird and is probably not that important. So we are okay with the user setting the variable to a symbol or a list or a vector? Thanks. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Apr 2023 16:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168200652015447 (code B ref 62958); Thu, 20 Apr 2023 16:02:01 +0000 Received: (at 62958) by debbugs.gnu.org; 20 Apr 2023 16:02:00 +0000 Received: from localhost ([127.0.0.1]:38569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppWjP-000415-H3 for submit@debbugs.gnu.org; Thu, 20 Apr 2023 12:01:59 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:50693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppWjK-00040q-QZ for 62958@debbugs.gnu.org; Thu, 20 Apr 2023 12:01:58 -0400 From: Spencer Baugh In-Reply-To: <83zg724kea.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Apr 2023 18:56:45 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> Date: Thu, 20 Apr 2023 12:01:49 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: 62958@debbugs.gnu.org >> Date: Thu, 20 Apr 2023 11:47:42 -0400 >> >> Eli Zaretskii writes: >> >> > Sorry, this default cannot be universally correct. You assume that >> > 'cat' is always available, which is not true on non-Posix platforms. >> > So at the very least the value should be set according to >> > executable-find. >> >> executable-find is not correct in the case of "cat" unfortunately, >> because there are programs (git, for one) which if they see PAGER=cat, >> just don't start a pager at all, for greater efficiency. (which is >> desirable behavior) > > Is this about removing the leading directories from the value of > executable-find? If so, that is trivial to do, and is not the main > point of what I wrote. Yes. But anyway, the default is nil now, so it should be fine. Unless you'd like the custom option of "cat" to not show up on non-UNIX platforms, somehow? >> > Should this test that comint-pager is a string? >> >> I don't think that's necessary; doing >> (if (stringp comint-pager) (list (format "PAGER=%s" comint-pager))) >> would have unexpected behavior if comint-pager was accidentally set to a >> non-string; doing >> (when comint-pager (progn (assert (stringp comint-pager)) >> (list (format "PAGER=%s" comint-pager)))) >> is a bit verbose and looks weird and is probably not that important. > > So we are okay with the user setting the variable to a symbol or a > list or a vector? Fair enough, I added a check: diff --git a/lisp/comint.el b/lisp/comint.el index 682b555a33c..a145751565f 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -258,6 +258,49 @@ comint-input-ring-file-name file) :group 'comint) +(defcustom comint-pager nil + "If non-nil, name of the program to use as a pager. + +If non-nil, comint sets the PAGER environment variable to this +value before starting a subprocess. PAGER controls the pager +that will be used. If you prefer to not use a pager, you can set +this variable to \"cat\". + +If nil, the PAGER environment variable is not set and the default +pager will be used. On Unix systems, typically this is \"less\". + +Some programs start a pager before producing output. A pager +supports viewing text page by page, so that if the parent program +produces more output than will fit on the screen, that output can +be viewed incrementally. + +When a program is running under Emacs, this behavior can be +undesirable, since Emacs itself supports viewing text page by +page, and a pager requires input from the user before it will +show more text. Furthermore, comint is not a full fledged +terminal emulator, so a pager will typically behave badly. + +However, pagers also provide backpressure: They will not consume +more output from the parent program than the user has actually +viewed, which on Unix means the output pipe will fill up and the +parent program will be stopped from producing unnecessary output. +Many programs (such as \"git log\") take advantage of this by +producing large amounts of output by default and relying on the +pager to not consume text that the user doesn't view. + +Emacs and comint do not keep track of what text the user has +viewed, so they can't provide backpressure like a pager does. +This means users who do not use a pager should be careful to not +run commands which produce a lot of output. Users can avoid this +by limiting the amount of output (such as with \"git log -n10\") +or by using native Emacs interfaces instead (such as +`vc-print-log')." + :version "30.1" + :type '(choice (const :tag "Use default PAGER" nil) + (const :tag "Don't do paging (PAGER=cat)" "cat") + string) + :group 'comint) + (defvar comint-input-ring-file-prefix nil "The prefix to skip when parsing the input ring file. This is useful in Zsh when the extended_history option is on.") @@ -864,6 +907,10 @@ comint-exec-1 (nconc (comint-term-environment) (list (format "INSIDE_EMACS=%s,comint" emacs-version)) + (when comint-pager + (if (stringp comint-pager) + (list (format "PAGER=%s" comint-pager)) + (error "comint-pager should be a string: %s" comint-pager))) process-environment)) (default-directory (if (file-accessible-directory-p default-directory) From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Apr 2023 07:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Spencer Baugh , 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168249565220851 (code B ref 62958); Wed, 26 Apr 2023 07:55:02 +0000 Received: (at 62958) by debbugs.gnu.org; 26 Apr 2023 07:54:12 +0000 Received: from localhost ([127.0.0.1]:54179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prZyd-0005QF-Vk for submit@debbugs.gnu.org; Wed, 26 Apr 2023 03:54:12 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prZya-0005Q0-WA for 62958@debbugs.gnu.org; Wed, 26 Apr 2023 03:54:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0C3B324035A for <62958@debbugs.gnu.org>; Wed, 26 Apr 2023 09:54:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682495643; bh=nGjgeW4s9+tsgiSu7hW177HNut4Fk2MNlDTcoiRdQgc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=liQutT7hbWNdL5KLZbBD0hMjPhYSSQyx5SYktcl/8cbSmGk2BDE20Me9Z/XMLQnVX qD/oehImSH8OPH8OBcvYQTJxzAiuuYUzMU+Kx26E6+C9cPJy5ktdHVKENapFozIjYR QGtaK3AXt7JGqZzcW4pbLvdGKYK2xXkmKIYF8Q44goC6CWvyWpccEFFINDwVKz+YRF DqIV2e7cJX0TDoHlytt9GfkhLAQBimqdd8nstnVP5bMsyvnwomf9k77RevCUw5VfRi gvVQ9pp0P+TgqO1M/DCXffTiIrAldnj9r5StT7Al1e9M9oz8eeshHMQiL1Wy/nIxAy OFqNtvr2589Bg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q5rjQ2srSz9rxD; Wed, 26 Apr 2023 09:54:02 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <83edof6oln.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Apr 2023 09:43:00 +0300") References: <83edof6oln.fsf@gnu.org> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Wed, 26 Apr 2023 07:54:34 +0000 Message-ID: <875y9jaxj9.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain 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 (---) Eli Zaretskii writes: >> From: Spencer Baugh >> Date: Wed, 19 Apr 2023 17:57:38 -0400 >> >> Simply adding (setenv "PAGER" "cat") globally is not correct, since >> that will break modes like term, which support paging quite well. >> It's only and exactly the comint-derived modes which don't need >> paging. >> >> Changing the default to "cat" in this way might be a bit >> controversial... > > Sorry, this default cannot be universally correct. You assume that > 'cat' is always available, which is not true on non-Posix platforms. > So at the very least the value should be set according to > executable-find. What systems respect PAGER (and would have it presumably set to something like less), but would not provide cat? From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Apr 2023 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: sbaugh@janestreet.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168250051529939 (code B ref 62958); Wed, 26 Apr 2023 09:16:02 +0000 Received: (at 62958) by debbugs.gnu.org; 26 Apr 2023 09:15:15 +0000 Received: from localhost ([127.0.0.1]:54266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prbF5-0007mp-7y for submit@debbugs.gnu.org; Wed, 26 Apr 2023 05:15:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prbF2-0007mY-Hd for 62958@debbugs.gnu.org; Wed, 26 Apr 2023 05:15:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prbEw-0004be-0C; Wed, 26 Apr 2023 05:15:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6F2Uwu0vGyAhyOuSRs5rT6qqPnBI9HFmI1vB/HtqU5s=; b=rrpHuqU98juC AOhDAMb5Md9bO8cGccuo2AGt6BUVKHkSq0AA7DMQnlkq4bRib9k4MGFtNpJf4hcHR7qnpwfOgQeSj bvU+UwEU4yo0w2F5o257d9b3SwptLEAkXeGgE2bcKNxyZ1mXjmwlUMrOG6Sfk83GdAh7nTpieiUmM k/SJPyPEQcJx4t2rq/R1hT9jPR48EvhME/IgMH+rMTo+pfYV1z82fsjwFbah5C7ozwZLrTEHCbYbS Q8z7Zbk9D3DaF4FYdIsX8LRLzLWtvpjkaNejIlSGuAbG/og7C2/bWC8kdkYVZqeKEeqv92ZexYgAX b8Y6gnXmaG8h/z13l83YLw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prbEv-0001h4-9x; Wed, 26 Apr 2023 05:15:05 -0400 Date: Wed, 26 Apr 2023 12:15:34 +0300 Message-Id: <831qk7uhqh.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875y9jaxj9.fsf@posteo.net> (message from Philip Kaludercic on Wed, 26 Apr 2023 07:54:34 +0000) References: <83edof6oln.fsf@gnu.org> <875y9jaxj9.fsf@posteo.net> 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 (---) > From: Philip Kaludercic > Cc: Spencer Baugh , 62958@debbugs.gnu.org > Date: Wed, 26 Apr 2023 07:54:34 +0000 > > Eli Zaretskii writes: > > >> Changing the default to "cat" in this way might be a bit > >> controversial... > > > > Sorry, this default cannot be universally correct. You assume that > > 'cat' is always available, which is not true on non-Posix platforms. > > So at the very least the value should be set according to > > executable-find. > > What systems respect PAGER (and would have it presumably set to > something like less), but would not provide cat? PAGER is not a system-provided feature, it is provided by the programs which honor the variable. Any such program, when ported to a system where there's no 'cat', will still support PAGER. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 May 2023 06:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168326848530585 (code B ref 62958); Fri, 05 May 2023 06:35:02 +0000 Received: (at 62958) by debbugs.gnu.org; 5 May 2023 06:34:45 +0000 Received: from localhost ([127.0.0.1]:52976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pup1h-0007xD-89 for submit@debbugs.gnu.org; Fri, 05 May 2023 02:34:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pup1e-0007wi-1L for 62958@debbugs.gnu.org; Fri, 05 May 2023 02:34:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pup1Y-0003yi-Gd; Fri, 05 May 2023 02:34:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pMzGOqcJP9JqRrkaUNpdbo65sJXcr3pSgzHyUWcN73o=; b=lfRHW2vMRzTt 9KhOFyuI4batDIhMnUBWu0uzZZXHf72jbuOhEo/bF8g1+hyMesO/APSNWmvmqbCz+te8x8iX73N2Y 81QhLXNdss3CmdbyVIW1zmv4XnzDjfJwlCBEap4mCVeNWqQpsyynOaBlRiviZlqtYPw+wpFurr89i MzTMdlePD6Vqbwf+GzWGy+dnnGGrhklFkqyyHAyO3aIsXthqxHPIjnCMeMYNZe1Q3CnaObiMl5JCr gk8opRqCItzIJDlox3m02+wojp1y4uh0K8AaHp2LEYss1mn97XtkQPztPB2QGNhkbI9SoQwc2grYT e7zV82w810vp1kEZOTGYtg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pup1Q-0003ot-5E; Fri, 05 May 2023 02:34:36 -0400 Date: Fri, 05 May 2023 09:35:18 +0300 Message-Id: <835y97jnfd.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Thu, 20 Apr 2023 12:01:49 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: 62958@debbugs.gnu.org > Date: Thu, 20 Apr 2023 12:01:49 -0400 > > Eli Zaretskii writes: > > Is this about removing the leading directories from the value of > > executable-find? If so, that is trivial to do, and is not the main > > point of what I wrote. > > Yes. But anyway, the default is nil now, so it should be fine. Unless > you'd like the custom option of "cat" to not show up on non-UNIX > platforms, somehow? > > >> > Should this test that comint-pager is a string? > >> > >> I don't think that's necessary; doing > >> (if (stringp comint-pager) (list (format "PAGER=%s" comint-pager))) > >> would have unexpected behavior if comint-pager was accidentally set to a > >> non-string; doing > >> (when comint-pager (progn (assert (stringp comint-pager)) > >> (list (format "PAGER=%s" comint-pager)))) > >> is a bit verbose and looks weird and is probably not that important. > > > > So we are okay with the user setting the variable to a symbol or a > > list or a vector? > > Fair enough, I added a check: Thanks. This is almost ready to go, I have only 2 minor comments: > diff --git a/lisp/comint.el b/lisp/comint.el > index 682b555a33c..a145751565f 100644 > --- a/lisp/comint.el > +++ b/lisp/comint.el > @@ -258,6 +258,49 @@ comint-input-ring-file-name > file) > :group 'comint) > > +(defcustom comint-pager nil > + "If non-nil, name of the program to use as a pager. > + > +If non-nil, comint sets the PAGER environment variable to this > +value before starting a subprocess. PAGER controls the pager > +that will be used. If you prefer to not use a pager, you can set > +this variable to \"cat\". > + > +If nil, the PAGER environment variable is not set and the default > +pager will be used. On Unix systems, typically this is \"less\". > + > +Some programs start a pager before producing output. A pager > +supports viewing text page by page, so that if the parent program > +produces more output than will fit on the screen, that output can > +be viewed incrementally. > + > +When a program is running under Emacs, this behavior can be > +undesirable, since Emacs itself supports viewing text page by > +page, and a pager requires input from the user before it will > +show more text. Furthermore, comint is not a full fledged > +terminal emulator, so a pager will typically behave badly. > + > +However, pagers also provide backpressure: They will not consume > +more output from the parent program than the user has actually > +viewed, which on Unix means the output pipe will fill up and the > +parent program will be stopped from producing unnecessary output. > +Many programs (such as \"git log\") take advantage of this by > +producing large amounts of output by default and relying on the > +pager to not consume text that the user doesn't view. > + > +Emacs and comint do not keep track of what text the user has > +viewed, so they can't provide backpressure like a pager does. > +This means users who do not use a pager should be careful to not > +run commands which produce a lot of output. Users can avoid this > +by limiting the amount of output (such as with \"git log -n10\") > +or by using native Emacs interfaces instead (such as > +`vc-print-log')." This is too long, IMO. There's no need for such a long doc string. I have tried to make it shorter without losing important details: "If non-nil, the program to use to disable pagination of program output. Some programs produce large amounts of output, and have provision for pagination of their output through a filter program, commonly known as a \"pager\". The pager allows the user to interactively browse the output one page at a time. Some programs paginate their output by default, by always starting a pager. The program they use as the pager is specified by the environment variable PAGER; if that variable is not defined, they use some fixed default, such as \"less\". Pagination is not needed, and gets in the way, when the output of the program is directed to an Emacs buffer, so in those cases pagination should be disabled. To disable pagination, this variable's value should be a string that names a program, such as \"cat\", which passes through all of the output without any filtering or delays. Comint will then set the PAGER variable to name that program, when it invokes external programs." > + :type '(choice (const :tag "Use default PAGER" nil) > + (const :tag "Don't do paging (PAGER=cat)" "cat") > + string) Could we have a helpful :tag for the 'string' alternative? It would be good to explain there what kind of strings should be used: either a full absolute file name or a basename that can be found via PATH. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 May 2023 19:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168357470218215 (code B ref 62958); Mon, 08 May 2023 19:39:01 +0000 Received: (at 62958) by debbugs.gnu.org; 8 May 2023 19:38:22 +0000 Received: from localhost ([127.0.0.1]:41700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw6gf-0004ji-Nk for submit@debbugs.gnu.org; Mon, 08 May 2023 15:38:22 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:56897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw6gd-0004jT-La for 62958@debbugs.gnu.org; Mon, 08 May 2023 15:38:20 -0400 From: Spencer Baugh In-Reply-To: <835y97jnfd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 05 May 2023 09:35:18 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> Date: Mon, 08 May 2023 15:38:12 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: 62958@debbugs.gnu.org >> Date: Thu, 20 Apr 2023 12:01:49 -0400 >> >> Eli Zaretskii writes: >> > Is this about removing the leading directories from the value of >> > executable-find? If so, that is trivial to do, and is not the main >> > point of what I wrote. >> >> Yes. But anyway, the default is nil now, so it should be fine. Unless >> you'd like the custom option of "cat" to not show up on non-UNIX >> platforms, somehow? >> >> >> > Should this test that comint-pager is a string? >> >> >> >> I don't think that's necessary; doing >> >> (if (stringp comint-pager) (list (format "PAGER=%s" comint-pager))) >> >> would have unexpected behavior if comint-pager was accidentally set to a >> >> non-string; doing >> >> (when comint-pager (progn (assert (stringp comint-pager)) >> >> (list (format "PAGER=%s" comint-pager)))) >> >> is a bit verbose and looks weird and is probably not that important. >> > >> > So we are okay with the user setting the variable to a symbol or a >> > list or a vector? >> >> Fair enough, I added a check: > > Thanks. This is almost ready to go, I have only 2 minor comments: > > >> diff --git a/lisp/comint.el b/lisp/comint.el >> index 682b555a33c..a145751565f 100644 >> --- a/lisp/comint.el >> +++ b/lisp/comint.el >> @@ -258,6 +258,49 @@ comint-input-ring-file-name >> file) >> :group 'comint) >> >> +(defcustom comint-pager nil >> + "If non-nil, name of the program to use as a pager. >> + >> +If non-nil, comint sets the PAGER environment variable to this >> +value before starting a subprocess. PAGER controls the pager >> +that will be used. If you prefer to not use a pager, you can set >> +this variable to \"cat\". >> + >> +If nil, the PAGER environment variable is not set and the default >> +pager will be used. On Unix systems, typically this is \"less\". >> + >> +Some programs start a pager before producing output. A pager >> +supports viewing text page by page, so that if the parent program >> +produces more output than will fit on the screen, that output can >> +be viewed incrementally. >> + >> +When a program is running under Emacs, this behavior can be >> +undesirable, since Emacs itself supports viewing text page by >> +page, and a pager requires input from the user before it will >> +show more text. Furthermore, comint is not a full fledged >> +terminal emulator, so a pager will typically behave badly. >> + >> +However, pagers also provide backpressure: They will not consume >> +more output from the parent program than the user has actually >> +viewed, which on Unix means the output pipe will fill up and the >> +parent program will be stopped from producing unnecessary output. >> +Many programs (such as \"git log\") take advantage of this by >> +producing large amounts of output by default and relying on the >> +pager to not consume text that the user doesn't view. >> + >> +Emacs and comint do not keep track of what text the user has >> +viewed, so they can't provide backpressure like a pager does. >> +This means users who do not use a pager should be careful to not >> +run commands which produce a lot of output. Users can avoid this >> +by limiting the amount of output (such as with \"git log -n10\") >> +or by using native Emacs interfaces instead (such as >> +`vc-print-log')." > > This is too long, IMO. There's no need for such a long doc string. I > have tried to make it shorter without losing important details: > > "If non-nil, the program to use to disable pagination of program output. > > Some programs produce large amounts of output, and have provision for > pagination of their output through a filter program, commonly known > as a \"pager\". The pager allows the user to interactively browse > the output one page at a time. > Some programs paginate their output by default, by always starting > a pager. The program they use as the pager is specified by the > environment variable PAGER; if that variable is not defined, they > use some fixed default, such as \"less\". > > Pagination is not needed, and gets in the way, when the output of > the program is directed to an Emacs buffer, so in those cases > pagination should be disabled. To disable pagination, this > variable's value should be a string that names a program, such > as \"cat\", which passes through all of the output without any > filtering or delays. Comint will then set the PAGER variable > to name that program, when it invokes external programs." I think it's worth noting the fact that there are programs which depend on pagination for their normal functionality. How about this short additional paragraph added after your text: "Disabling pagination means programs will produce their entire output immediately. If only part of the output is useful, this can be wasteful. For some programs, this can be avoided by using commands (for example, `vc-print-log') which run the program, limit the output it produces, and let the user interactively browse the output inside Emacs." From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 05:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168360887720804 (code B ref 62958); Tue, 09 May 2023 05:08:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 05:07:57 +0000 Received: from localhost ([127.0.0.1]:42211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwFZs-0005PU-QD for submit@debbugs.gnu.org; Tue, 09 May 2023 01:07:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwFZr-0005PE-B5 for 62958@debbugs.gnu.org; Tue, 09 May 2023 01:07:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwFZl-0001fd-RZ; Tue, 09 May 2023 01:07:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EzveeWyKGM4p2zDy6u4DM+B1/Lau66DJ/f+6z1QHZdU=; b=GvcdEB1Z0gac LxWPwPZdT6KHUuJqSHp25XW2GpPei7T2favHhgvRJNseN7GktclIfyehY4re3ZiVb/fyvSFv6CEID HTRLptteRvCnajDb7Rx2QLTA2W2x76UmGD98g+0PsAuS94GSwz7TOkVjoULXIxGPz5W0wR6aXe704 D1UFrortsJdbw/TCbnRqSmqY7CBh9tp9A7kvK99MtjsaXABoXw3Rl5dnQ5LMa4iNhkTb7uJuURuqd qvVp+sHMn83swC+QiKr0vTpjupDS9QnZXeMUV4mCrRqbdukbIipGzeXtSYFFmSX00/6wDsjvRqM6B Dc5jVzlzSGR0pjtZPukVaQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwFZk-0003Sk-JI; Tue, 09 May 2023 01:07:49 -0400 Date: Tue, 09 May 2023 08:08:51 +0300 Message-Id: <83pm7aay70.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Mon, 08 May 2023 15:38:12 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: 62958@debbugs.gnu.org > Date: Mon, 08 May 2023 15:38:12 -0400 > > > Pagination is not needed, and gets in the way, when the output of > > the program is directed to an Emacs buffer, so in those cases > > pagination should be disabled. To disable pagination, this > > variable's value should be a string that names a program, such > > as \"cat\", which passes through all of the output without any > > filtering or delays. Comint will then set the PAGER variable > > to name that program, when it invokes external programs." > > I think it's worth noting the fact that there are programs which depend > on pagination for their normal functionality. How about this short > additional paragraph added after your text: > > "Disabling pagination means programs will produce their entire output > immediately. If only part of the output is useful, this can be > wasteful. For some programs, this can be avoided by using commands (for > example, `vc-print-log') which run the program, limit the output it > produces, and let the user interactively browse the output inside > Emacs." Sorry, I don't understand: why would it matter that a program produces its output immediately when that output is redirected to an Emacs buffer? Whatever the amount of output, the user can always page through it interactively and conveniently using the normal movement commands, no? What am I missing? From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 14:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Spencer Baugh , 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168364414014428 (code B ref 62958); Tue, 09 May 2023 14:56:01 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 14:55:40 +0000 Received: from localhost ([127.0.0.1]:44134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwOke-0003ke-Ek for submit@debbugs.gnu.org; Tue, 09 May 2023 10:55:40 -0400 Received: from s.wrqvtbkv.outbound-mail.sendgrid.net ([149.72.123.24]:52200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwOkb-0003kN-BJ for 62958@debbugs.gnu.org; Tue, 09 May 2023 10:55:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=429qDEOXiltlveYwlM4awZv+3E62gnzPJnN01FnATno=; b=Lc6DZP20SaVCMSGT8LOUKbx87R43Gbzdx0jrI9tJR7pKGGuTuKfw5NKdq7hvMcDEZB8t Ro/omyT8XNyBMgKKZ7YPZGbQRtIe5blin5oKN/5FktdAaiKUgdVSXDtcLMAoQQlyh9/OX5 rVdcwm9x7+3bNq/c5vQhdOsrllDzaGAw9pogEOvilNb3M78EqF/Au5UJQaxkqX09r2E70J 0CUbCZF4XAPQdCll/JttVYdSBgx5JhnbhPlpszRa4CH1GHH3fAde3Kl1PoaM2x48stKgun 29J33vmGM4k33JIsngcBS4DaT+IFvkc4TeYNEyHAo1w6cHmPpF70BXZcfe04brVA== Received: by filterdrecv-59cb65cf6d-sfxbf with SMTP id filterdrecv-59cb65cf6d-sfxbf-1-645A5EE3-46 2023-05-09 14:55:31.803446724 +0000 UTC m=+6229481.086482838 Received: from earth.catern.com (unknown) by geopod-ismtpd-18 (SG) with ESMTP id JLNv_oMcRLKqEYrR1ojfCg Tue, 09 May 2023 14:55:31.555 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver= Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 078EF6009F; Tue, 9 May 2023 10:55:30 -0400 (EDT) From: sbaugh@catern.com In-Reply-To: <83pm7aay70.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 08:08:51 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> Date: Tue, 09 May 2023 14:55:31 +0000 (UTC) Message-ID: <874jol1rml.fsf@catern.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbKvpy28pmjEbiMHnWFqxKjwcdDXq1g9gqdq2IVTcO8xf/V80XceuO5OqPIGOHoM9SIm8uxTuAQdwRs4EYsOP3eiI4P2SYISU2AOZaTcMgA80g2Ne4SsJtU+9celxJlDqq1iD58pnaoLseW7JAqOSWyphQmeyzYZxIdSpkZcbN/8uA== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: 62958@debbugs.gnu.org >> Date: Mon, 08 May 2023 15:38:12 -0400 >> >> > Pagination is not needed, and gets in the way, when the output of >> > the [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [149.72.123.24 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_BL Mailspike blocklisted 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.0 RCVD_IN_MSPIKE_ZBI No description available. 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.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: 62958@debbugs.gnu.org >> Date: Mon, 08 May 2023 15:38:12 -0400 >> >> > Pagination is not needed, and gets in the way, when the output of >> > the [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [149.72.123.24 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_BL Mailspike blocklisted 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.0 RCVD_IN_MSPIKE_ZBI No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: 62958@debbugs.gnu.org >> Date: Mon, 08 May 2023 15:38:12 -0400 >> >> > Pagination is not needed, and gets in the way, when the output of >> > the program is directed to an Emacs buffer, so in those cases >> > pagination should be disabled. To disable pagination, this >> > variable's value should be a string that names a program, such >> > as \"cat\", which passes through all of the output without any >> > filtering or delays. Comint will then set the PAGER variable >> > to name that program, when it invokes external programs." >> >> I think it's worth noting the fact that there are programs which depend >> on pagination for their normal functionality. How about this short >> additional paragraph added after your text: >> >> "Disabling pagination means programs will produce their entire output >> immediately. If only part of the output is useful, this can be >> wasteful. For some programs, this can be avoided by using commands (for >> example, `vc-print-log') which run the program, limit the output it >> produces, and let the user interactively browse the output inside >> Emacs." > > Sorry, I don't understand: why would it matter that a program produces > its output immediately when that output is redirected to an Emacs > buffer? Whatever the amount of output, the user can always page > through it interactively and conveniently using the normal movement > commands, no? What am I missing? If the command produces a lot of output it can take a long time to run and slow down Emacs. For example, if a user disables pagination, runs M-x shell, and then runs "git log" in the Emacs repo, it takes ~3.5 minutes to run and produces ~1.5 million lines. Even if all they want is to see the 10 most recent commits. There are several negative effects of this, in decreasing order of importance: - The shell buffer now has way more output, which slows down navigation and operations on that buffer forever after, including font lock. - The user's shell is blocked during that whole time, preventing further shell commands. - git log producing unnecessary output wastes CPU and IO. If "git log" is run with a pager, it can complete as soon as the user exits the pager, and it only produces a few lines. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 15:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: sbaugh@catern.com Cc: sbaugh@janestreet.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168364715719852 (code B ref 62958); Tue, 09 May 2023 15:46:01 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 15:45:57 +0000 Received: from localhost ([127.0.0.1]:44182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwPXI-0005A7-KQ for submit@debbugs.gnu.org; Tue, 09 May 2023 11:45:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwPXD-00059r-Gk for 62958@debbugs.gnu.org; Tue, 09 May 2023 11:45:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwPX6-0005uT-GT; Tue, 09 May 2023 11:45:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Cks429Xil6H62HILpbHxS8vQd2603hwrHebfIzEc2dg=; b=drboSxWnhjcQ Ycxt86MOMb9OaS04SdfQSrZwrj43DgNbdD+c8FiIOeKgls6Csa0h6ufa7j6enxC8bIkzdDndELFDh hpkmzerVvuJtO5z8YHWz/SaYaQDREn/gassbRrOcUeObkcrMMDnH4e9/gd9+th2yKUMM5B3x1mhpr UCGiBPjg4tuTS7F4DZan6Du4oN7ZvEAaIwbpQOMtKB1E1bWZPf6jVt49TgwWb7uK8Zy2T2p2dp8qX ATB+mp+6K9Dm86kb11hZBBFuEYJ+ii3mT/ij5HHEy7GavJxGjqzxNEjpBcRvzfn1tS8v3VRSNsBKV 0JsghccIH/E95qlp16m4xA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwPWv-0000uz-2j; Tue, 09 May 2023 11:45:44 -0400 Date: Tue, 09 May 2023 18:46:36 +0300 Message-Id: <831qjpbj8j.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <874jol1rml.fsf@catern.com> (sbaugh@catern.com) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> 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 (---) > From: sbaugh@catern.com > Date: Tue, 09 May 2023 14:55:31 +0000 (UTC) > Cc: Spencer Baugh , 62958@debbugs.gnu.org > > Eli Zaretskii writes: > > >> From: Spencer Baugh > >> Cc: 62958@debbugs.gnu.org > >> Date: Mon, 08 May 2023 15:38:12 -0400 > >> > >> > Pagination is not needed, and gets in the way, when the output of > >> > the program is directed to an Emacs buffer, so in those cases > >> > pagination should be disabled. To disable pagination, this > >> > variable's value should be a string that names a program, such > >> > as \"cat\", which passes through all of the output without any > >> > filtering or delays. Comint will then set the PAGER variable > >> > to name that program, when it invokes external programs." > >> > >> I think it's worth noting the fact that there are programs which depend > >> on pagination for their normal functionality. How about this short > >> additional paragraph added after your text: > >> > >> "Disabling pagination means programs will produce their entire output > >> immediately. If only part of the output is useful, this can be > >> wasteful. For some programs, this can be avoided by using commands (for > >> example, `vc-print-log') which run the program, limit the output it > >> produces, and let the user interactively browse the output inside > >> Emacs." > > > > Sorry, I don't understand: why would it matter that a program produces > > its output immediately when that output is redirected to an Emacs > > buffer? Whatever the amount of output, the user can always page > > through it interactively and conveniently using the normal movement > > commands, no? What am I missing? > > If the command produces a lot of output it can take a long time to run > and slow down Emacs. > > For example, if a user disables pagination, runs M-x shell, and then > runs "git log" in the Emacs repo, it takes ~3.5 minutes to run and > produces ~1.5 million lines. Even if all they want is to see the 10 > most recent commits. There are several negative effects of this, in > decreasing order of importance: > > - The shell buffer now has way more output, which slows down navigation > and operations on that buffer forever after, including font lock. > - The user's shell is blocked during that whole time, preventing further > shell commands. > - git log producing unnecessary output wastes CPU and IO. > > If "git log" is run with a pager, it can complete as soon as the user > exits the pager, and it only produces a few lines. But this is impossible in general, AFAIU: most comint clients aren't prepared for interactive paging anyway. If someone wants paging, they should use "M-x term" or "M-x ansi-term", the terminal emulators that Emacs provides. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 16:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168364985125369 (code B ref 62958); Tue, 09 May 2023 16:31:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 16:30:51 +0000 Received: from localhost ([127.0.0.1]:44270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQEk-0006b6-G2 for submit@debbugs.gnu.org; Tue, 09 May 2023 12:30:50 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:57623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQEi-0006ar-EA for 62958@debbugs.gnu.org; Tue, 09 May 2023 12:30:48 -0400 From: Spencer Baugh In-Reply-To: <831qjpbj8j.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 18:46:36 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> Date: Tue, 09 May 2023 12:30:42 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: sbaugh@catern.com >> Date: Tue, 09 May 2023 14:55:31 +0000 (UTC) >> Cc: Spencer Baugh , 62958@debbugs.gnu.org >> >> Eli Zaretskii writes: >> >> >> From: Spencer Baugh >> >> Cc: 62958@debbugs.gnu.org >> >> Date: Mon, 08 May 2023 15:38:12 -0400 >> >> >> >> > Pagination is not needed, and gets in the way, when the output of >> >> > the program is directed to an Emacs buffer, so in those cases >> >> > pagination should be disabled. To disable pagination, this >> >> > variable's value should be a string that names a program, such >> >> > as \"cat\", which passes through all of the output without any >> >> > filtering or delays. Comint will then set the PAGER variable >> >> > to name that program, when it invokes external programs." >> >> >> >> I think it's worth noting the fact that there are programs which depend >> >> on pagination for their normal functionality. How about this short >> >> additional paragraph added after your text: >> >> >> >> "Disabling pagination means programs will produce their entire output >> >> immediately. If only part of the output is useful, this can be >> >> wasteful. For some programs, this can be avoided by using commands (for >> >> example, `vc-print-log') which run the program, limit the output it >> >> produces, and let the user interactively browse the output inside >> >> Emacs." >> > >> > Sorry, I don't understand: why would it matter that a program produces >> > its output immediately when that output is redirected to an Emacs >> > buffer? Whatever the amount of output, the user can always page >> > through it interactively and conveniently using the normal movement >> > commands, no? What am I missing? >> >> If the command produces a lot of output it can take a long time to run >> and slow down Emacs. >> >> For example, if a user disables pagination, runs M-x shell, and then >> runs "git log" in the Emacs repo, it takes ~3.5 minutes to run and >> produces ~1.5 million lines. Even if all they want is to see the 10 >> most recent commits. There are several negative effects of this, in >> decreasing order of importance: >> >> - The shell buffer now has way more output, which slows down navigation >> and operations on that buffer forever after, including font lock. >> - The user's shell is blocked during that whole time, preventing further >> shell commands. >> - git log producing unnecessary output wastes CPU and IO. >> >> If "git log" is run with a pager, it can complete as soon as the user >> exits the pager, and it only produces a few lines. > > But this is impossible in general, AFAIU: most comint clients aren't > prepared for interactive paging anyway. If someone wants paging, they > should use "M-x term" or "M-x ansi-term", the terminal emulators that > Emacs provides. Yes. I of course know that, that's why I filed this bug :) Nevertheless, today by default many programs run in comint clients will run a pager, and even though it is a hassle and gets in the way inside Emacs, it does prevent some programs from producing lots of output and yielding the negative effects I mentioned previously: >> - The shell buffer now has way more output, which slows down navigation >> and operations on that buffer forever after, including font lock. >> - The user's shell is blocked during that whole time, preventing further >> shell commands. >> - git log producing unnecessary output wastes CPU and IO. Because of these negative effects which will start happening for some programs when the user disables pagination, I think it's important for users to know that there's alternatives for such programs: namely, using native Emacs interfaces like vc-print-log. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 16:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365053026616 (code B ref 62958); Tue, 09 May 2023 16:43:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 16:42:10 +0000 Received: from localhost ([127.0.0.1]:44279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQPi-0006vD-5G for submit@debbugs.gnu.org; Tue, 09 May 2023 12:42:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQPe-0006ug-QD for 62958@debbugs.gnu.org; Tue, 09 May 2023 12:42:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQPZ-0001Ap-91; Tue, 09 May 2023 12:42:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DkO2I/FSp3LVbOgndWYgkRX9xwT8die6w3FVXCKsuuE=; b=Jx6SIg3s3CqF CPUhh0yGiA+MzB86R67ArqKKkGSl8RFogcxyWLVr+JXJ6/x98WI4AoRmHoPHB5+28kImOTfN6mIWT 3QmXHT5T0ShD6xbKK8iTwR/I9nTY5WMBJNly+UFHH+WLWUHR5B3876vbhrxWn8c1xUVUMGLJI9eMw 7NSQt3D5xAuY/lJPal7WHrcDduMmr2AAl7gHmthqy1eNFbOOZOhDdto9rCsJ0yTWiec0+Jv+UywzU YI0xrhTS1f4XFSE+vytqv/3CjLp6MszAEOSE0+YyvtuAVvWc9mgBinPSABJjXLGqc+3I4yWgROkCZ Y7lOoc4Xn2JLh0jHGVTuBA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQPY-0002PE-Ot; Tue, 09 May 2023 12:42:01 -0400 Date: Tue, 09 May 2023 19:43:03 +0300 Message-Id: <83wn1ha220.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Tue, 09 May 2023 12:30:42 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Tue, 09 May 2023 12:30:42 -0400 > > Eli Zaretskii writes: > > >> From: sbaugh@catern.com > >> Date: Tue, 09 May 2023 14:55:31 +0000 (UTC) > >> Cc: Spencer Baugh , 62958@debbugs.gnu.org > >> > >> Eli Zaretskii writes: > >> > >> >> From: Spencer Baugh > >> >> Cc: 62958@debbugs.gnu.org > >> >> Date: Mon, 08 May 2023 15:38:12 -0400 > >> >> > >> >> > Pagination is not needed, and gets in the way, when the output of > >> >> > the program is directed to an Emacs buffer, so in those cases > >> >> > pagination should be disabled. To disable pagination, this > >> >> > variable's value should be a string that names a program, such > >> >> > as \"cat\", which passes through all of the output without any > >> >> > filtering or delays. Comint will then set the PAGER variable > >> >> > to name that program, when it invokes external programs." > >> >> > >> >> I think it's worth noting the fact that there are programs which depend > >> >> on pagination for their normal functionality. How about this short > >> >> additional paragraph added after your text: > >> >> > >> >> "Disabling pagination means programs will produce their entire output > >> >> immediately. If only part of the output is useful, this can be > >> >> wasteful. For some programs, this can be avoided by using commands (for > >> >> example, `vc-print-log') which run the program, limit the output it > >> >> produces, and let the user interactively browse the output inside > >> >> Emacs." > >> > > >> > Sorry, I don't understand: why would it matter that a program produces > >> > its output immediately when that output is redirected to an Emacs > >> > buffer? Whatever the amount of output, the user can always page > >> > through it interactively and conveniently using the normal movement > >> > commands, no? What am I missing? > >> > >> If the command produces a lot of output it can take a long time to run > >> and slow down Emacs. > >> > >> For example, if a user disables pagination, runs M-x shell, and then > >> runs "git log" in the Emacs repo, it takes ~3.5 minutes to run and > >> produces ~1.5 million lines. Even if all they want is to see the 10 > >> most recent commits. There are several negative effects of this, in > >> decreasing order of importance: > >> > >> - The shell buffer now has way more output, which slows down navigation > >> and operations on that buffer forever after, including font lock. > >> - The user's shell is blocked during that whole time, preventing further > >> shell commands. > >> - git log producing unnecessary output wastes CPU and IO. > >> > >> If "git log" is run with a pager, it can complete as soon as the user > >> exits the pager, and it only produces a few lines. > > > > But this is impossible in general, AFAIU: most comint clients aren't > > prepared for interactive paging anyway. If someone wants paging, they > > should use "M-x term" or "M-x ansi-term", the terminal emulators that > > Emacs provides. > > Yes. I of course know that, that's why I filed this bug :) > > Nevertheless, today by default many programs run in comint clients will > run a pager, and even though it is a hassle and gets in the way inside > Emacs, it does prevent some programs from producing lots of output and > yielding the negative effects I mentioned previously: > > >> - The shell buffer now has way more output, which slows down navigation > >> and operations on that buffer forever after, including font lock. > >> - The user's shell is blocked during that whole time, preventing further > >> shell commands. > >> - git log producing unnecessary output wastes CPU and IO. > > Because of these negative effects which will start happening for some > programs when the user disables pagination, I think it's important for > users to know that there's alternatives for such programs: namely, using > native Emacs interfaces like vc-print-log. OK, but what's the purpose of the addition you were proposing? It basically says that sometimes paging should not be disabled, but since this is a defcustom, and the default is not to disable paging, that already speaks volumes about the same issue, right? From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365121428395 (code B ref 62958); Tue, 09 May 2023 16:54:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 16:53:34 +0000 Received: from localhost ([127.0.0.1]:44298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQak-0007Nv-8F for submit@debbugs.gnu.org; Tue, 09 May 2023 12:53:34 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:54599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQag-0007Nd-2o for 62958@debbugs.gnu.org; Tue, 09 May 2023 12:53:33 -0400 From: Spencer Baugh In-Reply-To: <83wn1ha220.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 19:43:03 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> Date: Tue, 09 May 2023 12:53:24 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: sbaugh@catern.com, 62958@debbugs.gnu.org >> Date: Tue, 09 May 2023 12:30:42 -0400 >> >> Eli Zaretskii writes: >> >> >> From: sbaugh@catern.com >> >> Date: Tue, 09 May 2023 14:55:31 +0000 (UTC) >> >> Cc: Spencer Baugh , 62958@debbugs.gnu.org >> >> >> >> Eli Zaretskii writes: >> >> >> >> >> From: Spencer Baugh >> >> >> Cc: 62958@debbugs.gnu.org >> >> >> Date: Mon, 08 May 2023 15:38:12 -0400 >> >> >> >> >> >> > Pagination is not needed, and gets in the way, when the output of >> >> >> > the program is directed to an Emacs buffer, so in those cases >> >> >> > pagination should be disabled. To disable pagination, this >> >> >> > variable's value should be a string that names a program, such >> >> >> > as \"cat\", which passes through all of the output without any >> >> >> > filtering or delays. Comint will then set the PAGER variable >> >> >> > to name that program, when it invokes external programs." >> >> >> >> >> >> I think it's worth noting the fact that there are programs which depend >> >> >> on pagination for their normal functionality. How about this short >> >> >> additional paragraph added after your text: >> >> >> >> >> >> "Disabling pagination means programs will produce their entire output >> >> >> immediately. If only part of the output is useful, this can be >> >> >> wasteful. For some programs, this can be avoided by using commands (for >> >> >> example, `vc-print-log') which run the program, limit the output it >> >> >> produces, and let the user interactively browse the output inside >> >> >> Emacs." >> >> > >> >> > Sorry, I don't understand: why would it matter that a program produces >> >> > its output immediately when that output is redirected to an Emacs >> >> > buffer? Whatever the amount of output, the user can always page >> >> > through it interactively and conveniently using the normal movement >> >> > commands, no? What am I missing? >> >> >> >> If the command produces a lot of output it can take a long time to run >> >> and slow down Emacs. >> >> >> >> For example, if a user disables pagination, runs M-x shell, and then >> >> runs "git log" in the Emacs repo, it takes ~3.5 minutes to run and >> >> produces ~1.5 million lines. Even if all they want is to see the 10 >> >> most recent commits. There are several negative effects of this, in >> >> decreasing order of importance: >> >> >> >> - The shell buffer now has way more output, which slows down navigation >> >> and operations on that buffer forever after, including font lock. >> >> - The user's shell is blocked during that whole time, preventing further >> >> shell commands. >> >> - git log producing unnecessary output wastes CPU and IO. >> >> >> >> If "git log" is run with a pager, it can complete as soon as the user >> >> exits the pager, and it only produces a few lines. >> > >> > But this is impossible in general, AFAIU: most comint clients aren't >> > prepared for interactive paging anyway. If someone wants paging, they >> > should use "M-x term" or "M-x ansi-term", the terminal emulators that >> > Emacs provides. >> >> Yes. I of course know that, that's why I filed this bug :) >> >> Nevertheless, today by default many programs run in comint clients will >> run a pager, and even though it is a hassle and gets in the way inside >> Emacs, it does prevent some programs from producing lots of output and >> yielding the negative effects I mentioned previously: >> >> >> - The shell buffer now has way more output, which slows down navigation >> >> and operations on that buffer forever after, including font lock. >> >> - The user's shell is blocked during that whole time, preventing further >> >> shell commands. >> >> - git log producing unnecessary output wastes CPU and IO. >> >> Because of these negative effects which will start happening for some >> programs when the user disables pagination, I think it's important for >> users to know that there's alternatives for such programs: namely, using >> native Emacs interfaces like vc-print-log. > > OK, but what's the purpose of the addition you were proposing? It > basically says that sometimes paging should not be disabled, but since > this is a defcustom, and the default is not to disable paging, that > already speaks volumes about the same issue, right? My addition says: - sometimes paging should not be disabled (for programs like "git log") - but if you're going to disable it anyway, commands like `vc-print-log' become more useful (because it's an alternative to "git log") The purpose of the addition is to communicate the second part. (And since I think the primary way most people will encounter this is through "git log", I think it's worth mentioning `vc-print-log' specifically) From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 16:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365152229206 (code B ref 62958); Tue, 09 May 2023 16:59:01 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 16:58:42 +0000 Received: from localhost ([127.0.0.1]:44303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQfi-0007ay-5z for submit@debbugs.gnu.org; Tue, 09 May 2023 12:58:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQfd-0007ai-GR for 62958@debbugs.gnu.org; Tue, 09 May 2023 12:58:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQfY-0004WZ-0b; Tue, 09 May 2023 12:58:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mMqy4lfRrFWzkRfj1gacay1NcJnvIxyIcqedkkhH274=; b=KekdG/qrQz4k N+ZhW+SIU05POxEfzz7rncLhgH82w1nkl7o0BCpYmWZUSMCgzFDBQaONfiunDtOLRS6g/Hj+fPR9L YyOwLIFxBn2XnxCIdYoaUfXxn0xG9yuX4DdxZIFvUci98n1p1qUSAga/dAqnt9qil9XwLXgK2ScUa QQJ1yAYwIr3ln+oyy2QUbpgfLzazPfk7/4O5xegWkN9gsHCI4ZoxMTWu3rpLa13AHGMvPukg3aUj4 p9pdaWQm58c/l9LlRd+erG68FBS9xmJPnoHW7pBMJMJqf+SmFJAT9YAs+Bk88zM+je9ZwR2ZUuynz FlFeBMV1RXfqojb8zTzbSw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQfX-0000an-G7; Tue, 09 May 2023 12:58:31 -0400 Date: Tue, 09 May 2023 19:59:35 +0300 Message-Id: <83sfc5a1ag.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Tue, 09 May 2023 12:53:24 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Tue, 09 May 2023 12:53:24 -0400 > > > OK, but what's the purpose of the addition you were proposing? It > > basically says that sometimes paging should not be disabled, but since > > this is a defcustom, and the default is not to disable paging, that > > already speaks volumes about the same issue, right? > > My addition says: > - sometimes paging should not be disabled (for programs like "git log") > - but if you're going to disable it anyway, commands like `vc-print-log' > become more useful (because it's an alternative to "git log") > > The purpose of the addition is to communicate the second part. (And > since I think the primary way most people will encounter this is through > "git log", I think it's worth mentioning `vc-print-log' specifically) I'm asking why this is not already obvious from the fact that this is a defcustom, by default off. All your addition says is "don't disable paging in all cases, sometimes it can be useful". But we already said that, in effect, by making the paging enabled by default. So there's no reason to have that text, as it isn't instrumental, and doesn't add anything. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365168529642 (code B ref 62958); Tue, 09 May 2023 17:02:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 17:01:25 +0000 Received: from localhost ([127.0.0.1]:44317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQiL-0007i2-9k for submit@debbugs.gnu.org; Tue, 09 May 2023 13:01:25 -0400 Received: from mxout6.mail.janestreet.com ([64.215.233.21]:45125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQiJ-0007hm-6S for 62958@debbugs.gnu.org; Tue, 09 May 2023 13:01:24 -0400 Received: from mail-ua1-f69.google.com ([209.85.222.69]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.96) id 1pwQiC-0081cc-2K for 62958@debbugs.gnu.org; Tue, 09 May 2023 13:01:18 -0400 Received: by mail-ua1-f69.google.com with SMTP id a1e0cc1a2514c-7809ab7c361so1665255241.0 for <62958@debbugs.gnu.org>; Tue, 09 May 2023 10:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1683651677; x=1686243677; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8O7Z3GQpIoL9i+3JCSKLK77YcksypALEtshPiPEtmS8=; b=maHSMSdin1OKUeom9tjhuFaGCJb83YmQtI7fnDZVX3/bvzCqOapi9xtxEFCXWQuPyb 4ynxpJu4mEGS2y3EcdZHtEOXiRjsX4rUu1a0TR5uRzAqNF5ev/heDWKAKeq4Egq89bs2 MOBExOQdbri88KXuQmwIvMPQ/qhIZM1w1ijHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683651677; x=1686243677; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8O7Z3GQpIoL9i+3JCSKLK77YcksypALEtshPiPEtmS8=; b=g1LBEx5pXgaETM0PTYKYPDDIEhn8oGICVzK0u2qNdAJwI/bl6B2l/LrwnhSb9CRNzG 7zR95PPb7yPZbdpOzwHRkp1wv2FDnx9G1BP/PlttDZhBOwrscbaz0YUC1eGYaosgY42V tEilbf8emuxqTFf0wddjVB+IGjQZIR+41hH/9eo86o9pObddfJ75pBda27JOetGmn5O4 S56SZpdSNAWXAJ1pXRVlwDuhSZb7YQbFrieqVYQVCRmLPxTztUN90jM0ZAzRfNkeurpy 30wIlK+s/hVS3M5xJQvTYe0zSMBhS6eCW3p9tccRSeTGVB8+c/EjGvfPs1SmXQ4+6DDM 2vIw== X-Gm-Message-State: AC+VfDz2Gaz2iIQimSCU3mIost+TcmOg91o4fRomxLv07VpYDdH46riF P4huGtUrZ9OD8jWRAZPG3Mh/WbEwf5xaCvQNNMvypY3nwQ2ub2ZYcuLKNylujvqiJHGTNG73a2v bk/ZtIWrRlaxUsTmc1tqhPZkxkpfiOg== X-Received: by 2002:a67:d005:0:b0:42e:41d9:4ea8 with SMTP id r5-20020a67d005000000b0042e41d94ea8mr5008752vsi.9.1683651677764; Tue, 09 May 2023 10:01:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oAO9BlWmsp7BvcF1px1OhkuG1XXg/5jVFnOjQrZvaphNsMarNfvzWsxYk80fi5e49XlkdOGhVL2+PAzklfRg= X-Received: by 2002:a67:d005:0:b0:42e:41d9:4ea8 with SMTP id r5-20020a67d005000000b0042e41d94ea8mr5008739vsi.9.1683651677535; Tue, 09 May 2023 10:01:17 -0700 (PDT) MIME-Version: 1.0 References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> In-Reply-To: <83sfc5a1ag.fsf@gnu.org> From: Spencer Baugh Date: Tue, 9 May 2023 13:01:07 -0400 Message-ID: Content-Type: multipart/alternative; boundary="0000000000002a51ec05fb45b440" X-Spam-Score: -0.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: -1.0 (-) --0000000000002a51ec05fb45b440 Content-Type: text/plain; charset="UTF-8" On Tue, May 9, 2023, 12:58 Eli Zaretskii wrote: > > From: Spencer Baugh > > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > > Date: Tue, 09 May 2023 12:53:24 -0400 > > > > > OK, but what's the purpose of the addition you were proposing? It > > > basically says that sometimes paging should not be disabled, but since > > > this is a defcustom, and the default is not to disable paging, that > > > already speaks volumes about the same issue, right? > > > > My addition says: > > - sometimes paging should not be disabled (for programs like "git log") > > - but if you're going to disable it anyway, commands like `vc-print-log' > > become more useful (because it's an alternative to "git log") > > > > The purpose of the addition is to communicate the second part. (And > > since I think the primary way most people will encounter this is through > > "git log", I think it's worth mentioning `vc-print-log' specifically) > > I'm asking why this is not already obvious from the fact that this is > a defcustom, by default off. All your addition says is "don't disable > paging in all cases, sometimes it can be useful". But we already said > that, in effect, by making the paging enabled by default. So there's > no reason to have that text, as it isn't instrumental, and doesn't add > anything. > How does "this is a defcustom, by default off" communicate "you should use vc-print-log if you turn this on"? > --0000000000002a51ec05fb45b440 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, May 9, 2023, 12:58 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Spencer Baugh <sbaugh@janestreet.com>
> Cc: sbaugh@catern.com,=C2=A0 62958@debbugs.gnu.org
> Date: Tue, 09 May 2023 12:53:24 -0400
>
> > OK, but what's the purpose of the addition you were proposing= ?=C2=A0 It
> > basically says that sometimes paging should not be disabled, but = since
> > this is a defcustom, and the default is not to disable paging, th= at
> > already speaks volumes about the same issue, right?
>
> My addition says:
> - sometimes paging should not be disabled (for programs like "git= log")
> - but if you're going to disable it anyway, commands like `vc-prin= t-log'
>=C2=A0 =C2=A0become more useful (because it's an alternative to &qu= ot;git log")
>
> The purpose of the addition is to communicate the second part.=C2=A0 (= And
> since I think the primary way most people will encounter this is throu= gh
> "git log", I think it's worth mentioning `vc-print-log&#= 39; specifically)

I'm asking why this is not already obvious from the fact that this is a defcustom, by default off.=C2=A0 All your addition says is "don'= t disable
paging in all cases, sometimes it can be useful".=C2=A0 But we already= said
that, in effect, by making the paging enabled by default.=C2=A0 So there= 9;s
no reason to have that text, as it isn't instrumental, and doesn't = add
anything.

How does "this is a defcustom, by default off" communic= ate "you should use vc-print-log if you turn this on"?
--0000000000002a51ec05fb45b440-- From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 17:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: sbaugh@janestreet.com Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365173829746 (code B ref 62958); Tue, 09 May 2023 17:03:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 17:02:18 +0000 Received: from localhost ([127.0.0.1]:44322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQjB-0007ji-RW for submit@debbugs.gnu.org; Tue, 09 May 2023 13:02:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQj9-0007jV-SP for 62958@debbugs.gnu.org; Tue, 09 May 2023 13:02:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQj4-0005Ir-ME; Tue, 09 May 2023 13:02:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=V89oKCIod5RlJM3VnLj2TVfv5F49HJ5GvsUaDwYzdrY=; b=n9vzNbNR6+6c FCBz/ljPemvLSzHFcSpghvteorg3oj6z87it2gGNUmAngVAetPMLYKMys1sy/+B5zV4HVSKs/KQyt IrO3Dvl9TaYPFRy/uDdQSDyYBtrjkKRFRZfV+aE/JcVYZzUzfz4hORD1JryUrVxWSDg2h+7L3GeNH k+Rq5DfELIX87RGTyIgFFWdUu+rZgSlsxucNkCwhiwTr5TnAEMHgNbHgCTMa9DY48xGO5WL+JDFYG 4LMG14E4YS2Pro5rGa5ETya/m8JiM8ZuadUesFrDv7Z3tEGRzQSNJrHJQmSNx1gCvge0qhRqAW1lw H17fwJU0mjZcqUawzsjiIA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQj4-0007Pp-4s; Tue, 09 May 2023 13:02:10 -0400 Date: Tue, 09 May 2023 20:03:14 +0300 Message-Id: <83r0rpa14d.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <83sfc5a1ag.fsf@gnu.org> (message from Eli Zaretskii on Tue, 09 May 2023 19:59:35 +0300) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> 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 (---) > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Tue, 09 May 2023 19:59:35 +0300 > From: Eli Zaretskii > > I'm asking why this is not already obvious from the fact that this is > a defcustom, by default off. All your addition says is "don't disable > paging in all cases, sometimes it can be useful". But we already said > that, in effect, by making the paging enabled by default. So there's > no reason to have that text, as it isn't instrumental, and doesn't add > anything. Or let me turn the table and ask whether the following minor rephrasing of what I proposed will satisfy you: Pagination is normally not needed, and might get in the way, when the output of the program is directed to an Emacs buffer, so in those cases pagination might need to be disabled. To disable pagination, this variable's value should be a string that names a program, such as \"cat\", which passes through all of the output without any filtering or delays. Comint will then set the PAGER variable to name that program, when it invokes external programs." From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 17:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365189330037 (code B ref 62958); Tue, 09 May 2023 17:05:01 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 17:04:53 +0000 Received: from localhost ([127.0.0.1]:44341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQlh-0007oP-4r for submit@debbugs.gnu.org; Tue, 09 May 2023 13:04:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQlf-0007o6-51 for 62958@debbugs.gnu.org; Tue, 09 May 2023 13:04:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQlZ-0005gq-UY; Tue, 09 May 2023 13:04:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RDZLouIFCEQEfBqJdLxgJFxnaLFTgtzwciI1khLirFc=; b=UJn0O48dhFOL qUN8Q+mzTkfPnLwlSsXT1o5Wvkb/UIv77KqC7HfHjxyPc0zkDfUiV/OLCApa3eSDy8RQ3NQ+DD8+E geF6/ly3FyEJ7spJ9Dl/nbz1ImhFHg29xEpZmRig22Cp6USN66WFStNFQzZG4DqGJc5psfx/USiJf SGiz7WAEJ5bFz+AtlbX0wTtt0bCj/80slRWTKCKVLMxTukktgxAxUQ+CmheRPfZgS0w/iUOrB8e7G 27QFzFkvzVn0LRNpYYwWOVCVjgjVCDxeLWlTuugltW7nlWG8opr9EWccJeUONs1R3qQw0vwo6yG+h jQ2+7tPW/AIFCrPyNZpAjg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQlY-0006sf-9Q; Tue, 09 May 2023 13:04:44 -0400 Date: Tue, 09 May 2023 20:05:48 +0300 Message-Id: <83pm79a103.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Tue, 9 May 2023 13:01:07 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Date: Tue, 9 May 2023 13:01:07 -0400 > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > > I'm asking why this is not already obvious from the fact that this is > a defcustom, by default off. All your addition says is "don't disable > paging in all cases, sometimes it can be useful". But we already said > that, in effect, by making the paging enabled by default. So there's > no reason to have that text, as it isn't instrumental, and doesn't add > anything. > > How does "this is a defcustom, by default off" communicate "you should use vc-print-log if you turn this > on"? Why are we suddenly talking about vc-print-log when discussing a much more general feature? From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365244331219 (code B ref 62958); Tue, 09 May 2023 17:15:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 17:14:03 +0000 Received: from localhost ([127.0.0.1]:44397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQuY-00087I-Qe for submit@debbugs.gnu.org; Tue, 09 May 2023 13:14:03 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:37935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwQuX-00086j-Sm for 62958@debbugs.gnu.org; Tue, 09 May 2023 13:14:02 -0400 From: Spencer Baugh In-Reply-To: <83pm79a103.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 20:05:48 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> Date: Tue, 09 May 2023 13:13:56 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Date: Tue, 9 May 2023 13:01:07 -0400 >> Cc: sbaugh@catern.com, 62958@debbugs.gnu.org >> >> I'm asking why this is not already obvious from the fact that this is >> a defcustom, by default off. All your addition says is "don't disable >> paging in all cases, sometimes it can be useful". But we already said >> that, in effect, by making the paging enabled by default. So there's >> no reason to have that text, as it isn't instrumental, and doesn't add >> anything. >> >> How does "this is a defcustom, by default off" communicate "you should use vc-print-log if you turn this >> on"? > > Why are we suddenly talking about vc-print-log when discussing a much > more general feature? Because disabling pagination effectively breaks the shell command "git log" and vc-print-log is one alternative to running "git log", and I don't know how else the user would realize that. (In my experience with talking to users about this, they usually don't) From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2023 18:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168365863229714 (code B ref 62958); Tue, 09 May 2023 18:58:02 +0000 Received: (at 62958) by debbugs.gnu.org; 9 May 2023 18:57:12 +0000 Received: from localhost ([127.0.0.1]:44504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwSWO-0007jC-6g for submit@debbugs.gnu.org; Tue, 09 May 2023 14:57:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwSWK-0007ix-H7 for 62958@debbugs.gnu.org; Tue, 09 May 2023 14:57:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwSWE-0002D9-EC; Tue, 09 May 2023 14:57:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2OLuPatT4wTDib3SB2W89X5fpYBDXOOujccp/KAGYVE=; b=QWMLiur/bQfz 4iHARhlrDnquUXGHlzP8cwlumwN6fgUP1lVmKGbHsCd5ngvZOKIuZH3m59j8jOyCqdHq1ISoSxWqd 3LnvFRN4r+kUeL0Cbg0T87oNxp/Mn9zlt4FoEIEbGAArCKqPl+t3Vo23noGLhbkl3+in7Lb/V8+NI aD5ziPN9LrLEK9NQvdbxCDKjo3iGNG5HKpLjU/MvRKEhE5G2d430irKj+Glo3/MAIHdeLe8uOIdCz EV8O+35k8lFnlyaD1tNS68JcptGzYIG73UrFKLJzrzNgscV1BPOGQh1Rkh3xM1BDQmUVgenUhKlsX f9/oAVX+t8LrpUGkHSADsw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwSWD-0002QW-Tx; Tue, 09 May 2023 14:57:02 -0400 Date: Tue, 09 May 2023 21:58:06 +0300 Message-Id: <83mt2d9vsx.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Tue, 09 May 2023 13:13:56 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Tue, 09 May 2023 13:13:56 -0400 > > Eli Zaretskii writes: > > >> From: Spencer Baugh > >> Date: Tue, 9 May 2023 13:01:07 -0400 > >> Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > >> > >> I'm asking why this is not already obvious from the fact that this is > >> a defcustom, by default off. All your addition says is "don't disable > >> paging in all cases, sometimes it can be useful". But we already said > >> that, in effect, by making the paging enabled by default. So there's > >> no reason to have that text, as it isn't instrumental, and doesn't add > >> anything. > >> > >> How does "this is a defcustom, by default off" communicate "you should use vc-print-log if you turn this > >> on"? > > > > Why are we suddenly talking about vc-print-log when discussing a much > > more general feature? > > Because disabling pagination effectively breaks the shell command "git > log" and vc-print-log is one alternative to running "git log", and I > don't know how else the user would realize that. (In my experience with > talking to users about this, they usually don't) A doc string of a general option is not the proper place for talking about some very specific case when that option is used. If the main problem is vc-print-log, we should find another way of dealing with it. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 May 2023 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: sbaugh@catern.com Cc: Spencer Baugh , Eli Zaretskii , 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168373782515637 (code B ref 62958); Wed, 10 May 2023 16:58:01 +0000 Received: (at 62958) by debbugs.gnu.org; 10 May 2023 16:57:05 +0000 Received: from localhost ([127.0.0.1]:48884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwn7h-000449-2Q for submit@debbugs.gnu.org; Wed, 10 May 2023 12:57:05 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwn7e-00043Z-Gu for 62958@debbugs.gnu.org; Wed, 10 May 2023 12:57:03 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 91B7AE0004; Wed, 10 May 2023 16:56:54 +0000 (UTC) From: Juri Linkov In-Reply-To: <874jol1rml.fsf@catern.com> (sbaugh@catern.com's message of "Tue, 09 May 2023 14:55:31 +0000 (UTC)") Organization: LINKOV.NET References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> Date: Wed, 10 May 2023 19:39:12 +0300 Message-ID: <86y1lw4mjr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> Sorry, I don't understand: why would it matter that a program produces >> its output immediately when that output is redirected to an Emacs >> buffer? Whatever the amount of output, the user can always page >> through it interactively and conveniently using the normal movement >> commands, no? What am I missing? > > If the command produces a lot of output it can take a long time to run > and slow down Emacs. I will definitely customize the new option 'comint-pager' to "cat" as soon as it arrives to master. But for such cases when some commands produce too long output, would it be also possible to provide an additional option to set the number of lines to output before stopping? It seems not possible just to set the ENV variable 'LINES'. >From 'man less': LINES Sets the number of lines on the screen. Takes precedence over the number of lines specified by the TERM variable. (But if you have a windowing system which supports TIOCGWINSZ or WIOCGETD, the window system's idea of the screen size takes precedence over the LINES and COLUMNS environment variables.) And indeed it has no effect when I tried. Maybe because window size adjustments are explicitly coded in 'window--adjust-process-windows'. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 May 2023 16:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: sbaugh@catern.com, 62958@debbugs.gnu.org, sbaugh@janestreet.com Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168373792515823 (code B ref 62958); Wed, 10 May 2023 16:59:02 +0000 Received: (at 62958) by debbugs.gnu.org; 10 May 2023 16:58:45 +0000 Received: from localhost ([127.0.0.1]:48897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwn9J-000479-8H for submit@debbugs.gnu.org; Wed, 10 May 2023 12:58:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwn9H-00046w-P4 for 62958@debbugs.gnu.org; Wed, 10 May 2023 12:58:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwn9B-0001yd-Qa; Wed, 10 May 2023 12:58:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sqNTwm2rUHPWYg7I1Nb/bfplD3eFRe9U/xbbXPgDVbs=; b=G+LimQ47kK4W fthV8JnKV9MPQ3jsaDyNO4y6vGirAflMRg4UDNB+NIQdaZdoBcNr/eN9y07YITN7+BDnwocVy6xIC qXsGumiWz98WloagKnCy1SYVBYqaU5zi5nEnEWQmPxQhdJaIKvfgzhRVPkPQ/XntDJSOeZdkwrflK ghsHgKMcFSFmjnrEt3mVakA4joU1/hZpqHN1RPCfEDsEkBW7c4+m/EhOFfws6LnQCMvO2zlUuvoI9 ArhxpXEYe8qM0/TMyoW356cYVnIJ1iGPtYcp9J6hiYRc0aeQrvYIrP5SRILb6eF6oVPS3uYF8kBw1 WORkoZUTsPk7lNjPRUB3sw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwn9B-0007yS-AG; Wed, 10 May 2023 12:58:37 -0400 Date: Wed, 10 May 2023 19:59:43 +0300 Message-Id: <83fs846s1s.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86y1lw4mjr.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 10 May 2023 19:39:12 +0300) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <86y1lw4mjr.fsf@mail.linkov.net> 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 (---) > From: Juri Linkov > Cc: Eli Zaretskii , Spencer Baugh , > 62958@debbugs.gnu.org > Date: Wed, 10 May 2023 19:39:12 +0300 > > It seems not possible just to set the ENV variable 'LINES'. > >From 'man less': > > LINES Sets the number of lines on the screen. Takes precedence over the number of > lines specified by the TERM variable. (But if you have a windowing system > which supports TIOCGWINSZ or WIOCGETD, the window system's idea of the screen > size takes precedence over the LINES and COLUMNS environment variables.) > > And indeed it has no effect when I tried. Maybe because window size > adjustments are explicitly coded in 'window--adjust-process-windows'. Almost definitely because of that. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 May 2023 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: sbaugh@catern.com, Eli Zaretskii , 62958@debbugs.gnu.org, Spencer Baugh Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168374244723916 (code B ref 62958); Wed, 10 May 2023 18:15:01 +0000 Received: (at 62958) by debbugs.gnu.org; 10 May 2023 18:14:07 +0000 Received: from localhost ([127.0.0.1]:48993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwoKD-0006De-JP for submit@debbugs.gnu.org; Wed, 10 May 2023 14:14:07 -0400 Received: from heytings.org ([95.142.160.155]:56530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwoK8-0006D4-N7 for 62958@debbugs.gnu.org; Wed, 10 May 2023 14:14:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1683742439; bh=N4S1VF9z0j3p+CQqYHTfDSvWzdRTy1SM2VExdssvYlU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=ykq9CxdY6FP9kdNbhCAk9aN8/9w4KqrzQy4M0JSpZqBXgyjsK00jEB0vmp72dSWQ+ jguBsMjkNNBHwIcdXe/wYZmAFNukrig1clO3OAvf+oDzpxqJNDz8ErMJME7quTo8hV TajIDwP0IKrC29s4vT5gTlmB9lBQZWtN3Q4HgGHjCNaM+iTiC8oewhN9HzkwOmp8AQ PyD79ow01jG3Dw+8Ydm/AhHEg14obaCFb0nvYW7uRzvr7gsVBqHdSf4lveNwtzxfZ/ 3gYKG0/wu9Lg1t2YmVQEe1Gl6Gl8UqfWTMs+PmFwMdTkfq+WPxZOL7nPUgLf/jbI2k iwWKufnVhiIXA== Date: Wed, 10 May 2023 18:13:59 +0000 From: Gregory Heytings In-Reply-To: <86y1lw4mjr.fsf@mail.linkov.net> Message-ID: <030b4f83a575bd1be4e5@heytings.org> References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <86y1lw4mjr.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.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: -1.0 (-) > > I will definitely customize the new option 'comint-pager' to "cat" as > soon as it arrives to master. But for such cases when some commands > produce too long output, would it be also possible to provide an > additional option to set the number of lines to output before stopping? > Did you try "cat | head -N"? From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 May 2023 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Gregory Heytings Cc: sbaugh@catern.com, Eli Zaretskii , 62958@debbugs.gnu.org, Spencer Baugh Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.16839139456257 (code B ref 62958); Fri, 12 May 2023 17:53:02 +0000 Received: (at 62958) by debbugs.gnu.org; 12 May 2023 17:52:25 +0000 Received: from localhost ([127.0.0.1]:60993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxWwL-0001co-B6 for submit@debbugs.gnu.org; Fri, 12 May 2023 13:52:25 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxWwJ-0001cX-Is for 62958@debbugs.gnu.org; Fri, 12 May 2023 13:52:23 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id C201CE0002; Fri, 12 May 2023 17:52:15 +0000 (UTC) From: Juri Linkov In-Reply-To: <030b4f83a575bd1be4e5@heytings.org> (Gregory Heytings's message of "Wed, 10 May 2023 18:13:59 +0000") Organization: LINKOV.NET References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <86y1lw4mjr.fsf@mail.linkov.net> <030b4f83a575bd1be4e5@heytings.org> Date: Fri, 12 May 2023 20:49:05 +0300 Message-ID: <86fs81l9ta.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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.7 (-) >> I will definitely customize the new option 'comint-pager' to "cat" as >> soon as it arrives to master. But for such cases when some commands >> produce too long output, would it be also possible to provide an >> additional option to set the number of lines to output before stopping? > > Did you try "cat | head -N"? Now I tried out, and it works as expected. Only there is no indication that the output is truncated. But probably such indication is not important with overly long output. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 May 2023 22:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: sbaugh@catern.com, Eli Zaretskii , 62958@debbugs.gnu.org, Spencer Baugh Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.16839300815261 (code B ref 62958); Fri, 12 May 2023 22:22:01 +0000 Received: (at 62958) by debbugs.gnu.org; 12 May 2023 22:21:21 +0000 Received: from localhost ([127.0.0.1]:33899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxb8b-0001Mn-5T for submit@debbugs.gnu.org; Fri, 12 May 2023 18:21:21 -0400 Received: from heytings.org ([95.142.160.155]:59276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxb8a-0001Mc-4Q for 62958@debbugs.gnu.org; Fri, 12 May 2023 18:21:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1683930079; bh=pkbrEvJZNWu+qhbvGdkYuuOpurPVclnWRzpSKWW5aVA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=4nmD9mUCB8YHn8uLX5s7YQry2QZppMU0OrDZUOkum9KRWC9POArabnau2dolkCvbr TuMN4PSR8/Bzi4LVvpyWmXNjdlMBTX2/MYMZCt2IXDVrvXYPCml+S0hL31ZvZpF8L0 E7qNjWnp5N5gVPQlcQp1EfV5LCfxgyJXMn2f/7pSQweZtXHkwFCF3bAqBvyzZt5auA luGdbNB2afcdnJLFumKIzpfS3Ty7Tc7cXvAppt4VoM8unPU9IMyT/wZXj07fcrduga AUxOllo9DTEk93A/wq+yiYt4ege28PJxYL6tMbrQ4mQ1+IiRsxLDLrG95mAbcjbGfK 89hUeGfuwyaZQ== Date: Fri, 12 May 2023 22:21:19 +0000 From: Gregory Heytings In-Reply-To: <86fs81l9ta.fsf@mail.linkov.net> Message-ID: <78c44aa5150bbe81d8e9@heytings.org> References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <86y1lw4mjr.fsf@mail.linkov.net> <030b4f83a575bd1be4e5@heytings.org> <86fs81l9ta.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.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: -1.0 (-) >>> I will definitely customize the new option 'comint-pager' to "cat" as >>> soon as it arrives to master. But for such cases when some commands >>> produce too long output, would it be also possible to provide an >>> additional option to set the number of lines to output before >>> stopping? >> >> Did you try "cat | head -N"? > > Now I tried out, and it works as expected. Only there is no indication > that the output is truncated. But probably such indication is not > important with overly long output. > If you want such an indication, I suggest using sed instead of head: cat | sed -e "aOUTPUT TRUNCATED" -e "q" (Of course, replace with the number of lines of output you want. And of course you can replace the string "OUTPUT TRUNCATED" with whatever you want.) From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 May 2023 19:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168426657024852 (code B ref 62958); Tue, 16 May 2023 19:50:01 +0000 Received: (at 62958) by debbugs.gnu.org; 16 May 2023 19:49:30 +0000 Received: from localhost ([127.0.0.1]:48138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz0fq-0006Sm-Ap for submit@debbugs.gnu.org; Tue, 16 May 2023 15:49:30 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:57113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pz0fm-0006SX-LZ for 62958@debbugs.gnu.org; Tue, 16 May 2023 15:49:28 -0400 From: Spencer Baugh In-Reply-To: <83mt2d9vsx.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 21:58:06 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> <83mt2d9vsx.fsf@gnu.org> Date: Tue, 16 May 2023 15:49:21 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.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: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: sbaugh@catern.com, 62958@debbugs.gnu.org >> Date: Tue, 09 May 2023 13:13:56 -0400 >> >> Eli Zaretskii writes: >> >> >> From: Spencer Baugh >> >> Date: Tue, 9 May 2023 13:01:07 -0400 >> >> Cc: sbaugh@catern.com, 62958@debbugs.gnu.org >> >> >> >> I'm asking why this is not already obvious from the fact that this is >> >> a defcustom, by default off. All your addition says is "don't disable >> >> paging in all cases, sometimes it can be useful". But we already said >> >> that, in effect, by making the paging enabled by default. So there's >> >> no reason to have that text, as it isn't instrumental, and doesn't add >> >> anything. >> >> >> >> How does "this is a defcustom, by default off" communicate "you should use vc-print-log if you turn this >> >> on"? >> > >> > Why are we suddenly talking about vc-print-log when discussing a much >> > more general feature? >> >> Because disabling pagination effectively breaks the shell command "git >> log" and vc-print-log is one alternative to running "git log", and I >> don't know how else the user would realize that. (In my experience with >> talking to users about this, they usually don't) > > A doc string of a general option is not the proper place for talking > about some very specific case when that option is used. If the main > problem is vc-print-log, we should find another way of dealing with > it. OK, how about this doc string? "If non-nil, the program to use for pagination of program output. Some programs produce large amounts of output, and have provision for pagination of their output through a filter program, commonly known as a \"pager\". The pager limits the amount of output produced and allows the user to interactively browse the output one page at a time. Some programs paginate their output by default, by always starting a pager. The program they use as the pager is specified by the environment variable PAGER; if that variable is not defined, they use some fixed default, such as \"less\". The interactive browsing aspects of pagination are not needed, and get in the way, when the output of the program is directed to an Emacs buffer, so in those cases pagination might need to be disabled. Disabling pagination means that some programs will produce large amounts of output, but most such programs have other ways to limit their output, such as additional arguments or Emacs interfaces. To disable pagination, this variable's value should be a string that names a program, such as \"cat\", which passes through all of the output without any filtering or delays. Comint will then set the PAGER variable to name that program, when it invokes external programs." From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 May 2023 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168432314511744 (code B ref 62958); Wed, 17 May 2023 11:33:01 +0000 Received: (at 62958) by debbugs.gnu.org; 17 May 2023 11:32:25 +0000 Received: from localhost ([127.0.0.1]:49147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzFOK-00033L-KG for submit@debbugs.gnu.org; Wed, 17 May 2023 07:32:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzFOJ-000339-5G for 62958@debbugs.gnu.org; Wed, 17 May 2023 07:32:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzFOD-0004S8-Gl; Wed, 17 May 2023 07:32:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Su5s8Kwo9n9DjX5I4+XbmlnB9nkumvslsYTznmj3dsM=; b=U6m9mPRTEzWZ WPEh/1UA7XWvHHt76WmeKnKBi9ByTQvQzEOz5AM9l2fh72AcZB/W7fTzzieb7Qcr2cnizLA4p+VVP 4htd8H/CcVJDzvJe2eSNVjdeqY7VWzx61GwxW1fNFCsR2edAbFm30xt5L5V6sPNNpwXNpgE0ArRho ga7kPYkuRqPlkYxDSmv/jFUJOdaz5LTMzu2ze22R6sQLGVM26UiaDzyAsz6NiGinzcbCWdMGOSm05 O8VsvXs4/3/JT1FaUvbjXT/2lSv+BGuYNJZHEtNJRSxzas8wgm70IaoQ2bgjWfisixwACtp721Rww DfZMvblYouDtkwD7mKxODg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzFNy-0007Sl-Gv; Wed, 17 May 2023 07:32:15 -0400 Date: Wed, 17 May 2023 14:32:12 +0300 Message-Id: <83r0rfxkg3.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Tue, 16 May 2023 15:49:21 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> <83mt2d9vsx.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Tue, 16 May 2023 15:49:21 -0400 > > Eli Zaretskii writes: > > OK, how about this doc string? > > "If non-nil, the program to use for pagination of program output. > > Some programs produce large amounts of output, and have provision for > pagination of their output through a filter program, commonly known as > a \"pager\". The pager limits the amount of output produced and > allows the user to interactively browse the output one page at a time. > Some programs paginate their output by default, by always starting a > pager. The program they use as the pager is specified by the > environment variable PAGER; if that variable is not defined, they use > some fixed default, such as \"less\". > > The interactive browsing aspects of pagination are not needed, and get > in the way, when the output of the program is directed to an Emacs > buffer, so in those cases pagination might need to be disabled. > Disabling pagination means that some programs will produce large > amounts of output, but most such programs have other ways to limit > their output, such as additional arguments or Emacs interfaces. > To disable pagination, this variable's value should be a string that > names a program, such as \"cat\", which passes through all of the > output without any filtering or delays. Comint will then set the > PAGER variable to name that program, when it invokes external > programs." SGTM, thanks. From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 May 2023 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168433532324015 (code B ref 62958); Wed, 17 May 2023 14:56:02 +0000 Received: (at 62958) by debbugs.gnu.org; 17 May 2023 14:55:23 +0000 Received: from localhost ([127.0.0.1]:50622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzIYk-0006FD-Hq for submit@debbugs.gnu.org; Wed, 17 May 2023 10:55:23 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:41513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzIYj-0006ET-Lc for 62958@debbugs.gnu.org; Wed, 17 May 2023 10:55:21 -0400 From: Spencer Baugh In-Reply-To: <83r0rfxkg3.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 May 2023 14:32:12 +0300") References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> <83mt2d9vsx.fsf@gnu.org> <83r0rfxkg3.fsf@gnu.org> Date: Wed, 17 May 2023 10:55:16 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.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: -1.0 (-) --=-=-= Content-Type: text/plain Updated patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Support-setting-PAGER-cat-in-comint.el-bug-62958.patch >From 94db0faf148960eeace9279fea9e173b1d1ea516 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Wed, 19 Apr 2023 17:44:54 -0400 Subject: [PATCH] Support setting PAGER=cat in comint.el (bug#62958) Paging can be undesirable in comint-derived commands such as async-shell-command and M-x shell. It is a frequent footgun for new Emacs users when they try to run commands which start a pager in such modes. Simply adding (setenv "PAGER" "cat") globally is not correct, since that will break modes like term, which support paging quite well. It's only and exactly the comint-derived modes which don't need paging. * lisp/comint.el (comint-pager): Add. (bug#62958) (comint-exec-1): Use comint-pager to set PAGER. --- lisp/comint.el | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lisp/comint.el b/lisp/comint.el index 682b555a33c..b956bd6f697 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -258,6 +258,35 @@ comint-input-ring-file-name file) :group 'comint) +(defcustom comint-pager nil + "If non-nil, the program to use for pagination of program output. + +Some programs produce large amounts of output, and have provision for +pagination of their output through a filter program, commonly known as +a \"pager\". The pager limits the amount of output produced and +allows the user to interactively browse the output one page at a time. +Some programs paginate their output by default, by always starting a +pager. The program they use as the pager is specified by the +environment variable PAGER; if that variable is not defined, they use +some fixed default, such as \"less\". + +The interactive browsing aspects of pagination are not needed, and get +in the way, when the output of the program is directed to an Emacs +buffer, so in those cases pagination might need to be disabled. +Disabling pagination means that some programs will produce large +amounts of output, but most such programs have other ways to limit +their output, such as additional arguments or Emacs interfaces. +To disable pagination, this variable's value should be a string that +names a program, such as \"cat\", which passes through all of the +output without any filtering or delays. Comint will then set the +PAGER variable to name that program, when it invokes external +programs." + :version "30.1" + :type '(choice (const :tag "Use default PAGER" nil) + (const :tag "Don't do paging (PAGER=cat)" "cat") + (string :tag "Program name or absolute path of pager")) + :group 'comint) + (defvar comint-input-ring-file-prefix nil "The prefix to skip when parsing the input ring file. This is useful in Zsh when the extended_history option is on.") @@ -864,6 +893,10 @@ comint-exec-1 (nconc (comint-term-environment) (list (format "INSIDE_EMACS=%s,comint" emacs-version)) + (when comint-pager + (if (stringp comint-pager) + (list (format "PAGER=%s" comint-pager)) + (error "comint-pager should be a string: %s" comint-pager))) process-environment)) (default-directory (if (file-accessible-directory-p default-directory) -- 2.30.2 --=-=-=-- From unknown Sat Jun 21 05:17:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 06:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62958 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Spencer Baugh Cc: sbaugh@catern.com, 62958@debbugs.gnu.org Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168447658722548 (code B ref 62958); Fri, 19 May 2023 06:10:02 +0000 Received: (at 62958) by debbugs.gnu.org; 19 May 2023 06:09:47 +0000 Received: from localhost ([127.0.0.1]:55200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pztJD-0005rb-9A for submit@debbugs.gnu.org; Fri, 19 May 2023 02:09:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pztJB-0005rN-L1 for 62958@debbugs.gnu.org; Fri, 19 May 2023 02:09:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pztJ5-0004Kz-Ra; Fri, 19 May 2023 02:09:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vguMFS4n6C/2plQhDPGRyjo+KTgvur2jkaP9I5d9uFg=; b=D/F4a6fdUIPk l3EU5FtIy7JaRaaxp4I0Bgyb20wHuhZk8Lx/MdsHmSFnyJhVllYJV0CgPH3KKia16PMygMQdYukFb E9kRo4wWMu0Vwt6yMGWughi4eZckZGsYyNOundtd0viBeLthLt6B3UpjN8WOz6y4jsVp9x5z5GKpQ 2Tu1aYV+I5j+e7Ul66WeF+hbc7gZ+/XC6FnH7r6BZfiH7GXhLnOjpr/UHQFWA6N8OOqlHTP9+zYnv uS9eEDiqrfLLZBj4fh+6tdamJ0b5sF5dkj/pGAPeI3YRs80wwVDx13PBI+OROGCUUUfPbHcHluXPQ a+e7vEjGmOP3c9moM/9c+Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pztJ5-0006R9-A3; Fri, 19 May 2023 02:09:39 -0400 Date: Fri, 19 May 2023 09:09:54 +0300 Message-Id: <83wn14ua19.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Wed, 17 May 2023 10:55:16 -0400) References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> <83mt2d9vsx.fsf@gnu.org> <83r0rfxkg3.fsf@gnu.org> 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 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Wed, 17 May 2023 10:55:16 -0400 > > Updated patch. LGTM, thanks. From unknown Sat Jun 21 05:17:04 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: Spencer Baugh Subject: bug#62958: closed (Re: bug#62958: [PATCH] Set PAGER=cat in comint.el) Message-ID: References: <83wn0vjpld.fsf@gnu.org> X-Gnu-PR-Message: they-closed 62958 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 62958@debbugs.gnu.org Date: Fri, 26 May 2023 11:32:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1685100721-9800-1" This is a multi-part message in MIME format... ------------=_1685100721-9800-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #62958: [PATCH] Set PAGER=3Dcat in comint.el which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 62958@debbugs.gnu.org. --=20 62958: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62958 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1685100721-9800-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 62958-done) by debbugs.gnu.org; 26 May 2023 11:31:44 +0000 Received: from localhost ([127.0.0.1]:49012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Vfc-0002XO-7S for submit@debbugs.gnu.org; Fri, 26 May 2023 07:31:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Vfa-0002X9-VQ for 62958-done@debbugs.gnu.org; Fri, 26 May 2023 07:31:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2VfU-0004Eh-Qj; Fri, 26 May 2023 07:31:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nj7nBCwVuhW+cqjUAaTG/swSZJWIMF9g9S26AA2Ifss=; b=mUmZAypwrskY bHjZz2O7Dm5F3tXmVVNC1CD74OMuO3/5N3P5NhA5TfXest+1u7Epl2B97KVWfEvWHdm/PUafEeItA EnOcRI64R9p6pV4PmaW5GV8canJbXavUHtR6KAninDcieSN9PqpVUVUZouNEGrzL1lGiHhGhCpbqd BCub7gf0VStHM2C1gP8ZOB+YPjRx2F4RYNk+lAzWKXBXTxjcbpr9+wyp1Q0HV1zYN+M0K6axB0Ysq Ds/C4D3ZRan3VUp4Owhyr7T5PdRMbtiwzSSzaQivrtSw1M0JpbfuO4zEZMRhJnjVO62J04tdxPfFB 0ureVenhSoAtcp0qFDLaVQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2VfP-0002uw-R1; Fri, 26 May 2023 07:31:35 -0400 Date: Fri, 26 May 2023 14:31:58 +0300 Message-Id: <83wn0vjpld.fsf@gnu.org> From: Eli Zaretskii To: sbaugh@janestreet.com In-Reply-To: <83wn14ua19.fsf@gnu.org> (message from Eli Zaretskii on Fri, 19 May 2023 09:09:54 +0300) Subject: Re: bug#62958: [PATCH] Set PAGER=cat in comint.el References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> <874jol1rml.fsf@catern.com> <831qjpbj8j.fsf@gnu.org> <83wn1ha220.fsf@gnu.org> <83sfc5a1ag.fsf@gnu.org> <83pm79a103.fsf@gnu.org> <83mt2d9vsx.fsf@gnu.org> <83r0rfxkg3.fsf@gnu.org> <83wn14ua19.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62958-done Cc: sbaugh@catern.com, 62958-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: -3.3 (---) > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > Date: Fri, 19 May 2023 09:09:54 +0300 > From: Eli Zaretskii > > > From: Spencer Baugh > > Cc: sbaugh@catern.com, 62958@debbugs.gnu.org > > Date: Wed, 17 May 2023 10:55:16 -0400 > > > > Updated patch. > > LGTM, thanks. No further comment, so I've now installed this on the master branch, and I'm therefore closing this bug. Thanks. ------------=_1685100721-9800-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Apr 2023 21:57:47 +0000 Received: from localhost ([127.0.0.1]:36035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppFoB-0006vY-Ad for submit@debbugs.gnu.org; Wed, 19 Apr 2023 17:57:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:33638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppFo6-0006vN-A9 for submit@debbugs.gnu.org; Wed, 19 Apr 2023 17:57:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppFo6-0004xC-37 for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2023 17:57:42 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppFo4-00006O-4T for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2023 17:57:41 -0400 From: Spencer Baugh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Set PAGER=cat in comint.el Date: Wed, 19 Apr 2023 17:57:38 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 (--) --=-=-= Content-Type: text/plain Tags: patch Paging is useless and annoying in comint-derived commands such as async-shell-command and M-x shell. It is a frequent footgun for new Emacs users when they try to run commands which start a pager in such modes. I know a number of users who set PAGER=cat in their Emacs to avoid it. Simply adding (setenv "PAGER" "cat") globally is not correct, since that will break modes like term, which support paging quite well. It's only and exactly the comint-derived modes which don't need paging. Changing the default to "cat" in this way might be a bit controversial... In GNU Emacs 29.0.60 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2023-03-13 built on igm-qws-u22796a Repository revision: e759905d2e0828eac4c8164b09113b40f6899656 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --with-x-toolkit=lucid --with-modules --with-gif=ifavailable' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Set-PAGER-cat-in-comint.el.patch >From 0069a0253c73567b131ddc75d57e29d405d11a72 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Wed, 19 Apr 2023 17:44:54 -0400 Subject: [PATCH] Set PAGER=cat in comint.el Paging is useless and annoying in comint-derived commands such as async-shell-command and M-x shell. It is a frequent footgun for new Emacs users when they try to run commands which start a pager in such modes. I know a number of users who set PAGER=cat in their Emacs to avoid it. Simply adding (setenv "PAGER" "cat") globally is not correct, since that will break modes like term, which support paging quite well. It's only and exactly the comint-derived modes which don't need paging. Changing the default to "cat" in this way might be a bit controversial... * lisp/comint.el (comint-pager): Add, defaulted to "cat". (comint-exec-1): Use comint-pager to set PAGER. --- lisp/comint.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/comint.el b/lisp/comint.el index 682b555a33c..915907c1bb9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -258,6 +258,15 @@ comint-input-ring-file-name file) :group 'comint) +(defcustom comint-pager "cat" + "If non-nil, the value to use for PAGER. +gWhen this is nil, comint doesn't set PAGER at all." + :version "30.1" + :type '(choice (const :tag "Don't set PAGER" nil) + (const :tag "cat" "cat") + string) + :group 'comint) + (defvar comint-input-ring-file-prefix nil "The prefix to skip when parsing the input ring file. This is useful in Zsh when the extended_history option is on.") @@ -864,6 +873,7 @@ comint-exec-1 (nconc (comint-term-environment) (list (format "INSIDE_EMACS=%s,comint" emacs-version)) + (when comint-pager (list (format "PAGER=%s" comint-pager))) process-environment)) (default-directory (if (file-accessible-directory-p default-directory) -- 2.30.2 --=-=-=-- ------------=_1685100721-9800-1--