From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#62958: [PATCH] Set PAGER=cat in comint.el Date: Tue, 09 May 2023 14:55:31 +0000 (UTC) Message-ID: <874jol1rml.fsf@catern.com> References: <83edof6oln.fsf@gnu.org> <83zg724kea.fsf@gnu.org> <835y97jnfd.fsf@gnu.org> <83pm7aay70.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29569"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 62958@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 09 16:56:43 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pwOld-0007Pk-LW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 May 2023 16:56:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwOl8-0006PV-Cw; Tue, 09 May 2023 10:56:11 -0400 Original-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 1pwOl1-0006PA-20 for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 10:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwOl0-0003am-H6 for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 10:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwOkz-0003lK-RN for bug-gnu-emacs@gnu.org; Tue, 09 May 2023 10:56:01 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 62958-submit@debbugs.gnu.org id=B62958.168364414014428 (code B ref 62958); Tue, 09 May 2023 14:56:01 +0000 Original-Received: (at 62958) by debbugs.gnu.org; 9 May 2023 14:55:40 +0000 Original-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 Original-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== Original-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 Original-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= Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 078EF6009F; Tue, 9 May 2023 10:55:30 -0400 (EDT) In-Reply-To: <83pm7aay70.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 May 2023 08:08:51 +0300") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbKvpy28pmjEbiMHnWFqxKjwcdDXq1g9gqdq2IVTcO8xf/V80XceuO5OqPIGOHoM9SIm8uxTuAQdwRs4EYsOP3eiI4P2SYISU2AOZaTcMgA80g2Ne4SsJtU+9celxJlDqq1iD58pnaoLseW7JAqOSWyphQmeyzYZxIdSpkZcbN/8uA== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261417 Archived-At: 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.