From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Date: Tue, 06 Aug 2024 11:31:06 -0400 Message-ID: References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32779"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 72426@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 06 17:31:58 2024 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 1sbMAH-0008Ls-4B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Aug 2024 17:31:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbMA1-00053n-PF; Tue, 06 Aug 2024 11:31:41 -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 1sbM9y-00053N-H2 for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2024 11:31:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbM9y-0006ZK-4v for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2024 11:31:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=6NlwUHIvwZ51MzZvC0aZ+3+B2OJbKeojurTlGIDFyvQ=; b=YqBD4PsHUznGi58cKcwcFgqHSNAWz9EfNPiXQChlXXswSfRha7zYHGCoGaLQpHsx/YOX6pwtYRFUAZwMWyPdqc/aDzDVkkwHrHSXBJqwBhXesFOvev1AaU3rMOgY2sAC/byg3vmWmqMUuGh/2OapkUtLTZGO9oFZ4YW7+MkaGVSdD7UaXk3cEGY0IrxMBb8Vn/jhZQUhrr+1BB9z9kfbBKDNMDa4/fuRMJGInZazGB5VfBcppBBD+VucF9lQxZc3j4BATeEu3hPTS6zGzVWZP+QX4N7aalAndsKXU69WYTDjydT91Nw14AKJFcLq6atSAJsq8aY6I3EMgrBNhAwKNg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sbMAL-0001I7-VH for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2024 11:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Aug 2024 15:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72426 X-GNU-PR-Package: emacs Original-Received: via spool by 72426-submit@debbugs.gnu.org id=B72426.17229582984911 (code B ref 72426); Tue, 06 Aug 2024 15:32:01 +0000 Original-Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 15:31:38 +0000 Original-Received: from localhost ([127.0.0.1]:32906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbM9y-0001H9-6w for submit@debbugs.gnu.org; Tue, 06 Aug 2024 11:31:38 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:36749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbM9v-0001Gs-U0 for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 11:31:37 -0400 In-Reply-To: <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> (Jim Porter's message of "Sat, 3 Aug 2024 11:38:35 -0700") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722958266; bh=6NlwUHIvwZ51MzZvC0aZ+3+B2OJbKeojurTlGIDFyvQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=1+LOFlERJwx1Do2K8+hx4tx9Klcz+AeFXmbc4EzF3xqMN3Cn89sL/zni5e/9jtaEx GfcBhO8PjlnDfRxzXsPvuoAG2zs/1GrLJk6UpEtE9T3D6aXvf3PtjU58t0QR/nSNlM LGHvbCd0G/Sunw4g0mpMFabHDa47cRYBrynJEwsGQBLLC2hwxfxpjUQ67DkmBN274h HJy0czY272QEwpvFqgiDSMqw1x83mPSd1Hbcd1Lg4S3isGRaU6a/SzPPyQqPQQ0lVN SCGMCcPHceYpNMXLWYJtDRCX1JpjK6S4+bgeh9QGtBlKf6O8DSmkX14Sg1xZlwIp6U 0VzczFyOiQKTw== 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:289833 Archived-At: Jim Porter writes: > On 8/3/2024 8:38 AM, Eli Zaretskii wrote: >>> From: Spencer Baugh >>> Date: Sat, 3 Aug 2024 06:47:10 -0400 >>> Cc: 72426@debbugs.gnu.org >>> >>> comint-terminfo-terminal affects async-shell-command, why not this? >> Ugh! A mistake, IMNSHO. But that ship sailed a long time ago, so >> we >> cannot fix the mistake. We can avoid enlarging the mistake, though. >> >>> If the fact that the variable is in comint is the problem, I can rename it and move it elsewhere. >> I don't think functions that are almost primitives should pay >> attention to application-level features such as this one. > > Perhaps we should be setting the pager in a similar way to how TERM is > set in startup.el? > > ;; Subprocesses of Emacs do not have direct access to the terminal, so > ;; unless told otherwise they should only assume a dumb terminal. > ;; We are careful to do it late (after term-setup-hook), although the > ;; new multi-tty code does not use $TERM any more there anyway. > (setenv "TERM" "dumb") > > I think the reasoning in that comment applies to PAGER as well: unless > told otherwise, subprocesses probably shouldn't use pager like "less"; > it's very unlikely to work correctly. > > In that case, would it make sense to add something along these lines > to startup.el? > > (when (executable-find "cat") > (setenv "PAGER" "cat")) Yes, I'd be very in favor of that. Fixing this is exactly my motivation. > The 'comint-pager' variable could still be useful though, since you > can set it to a pager that's fancier than "cat" but that actually > works in Comint (unlike "less"). For example, you could set a pager > that does automatic syntax highlighting with ANSI escapes; Comint > would be able to handle that. Maybe, but I'd rather delete it in the meantime, since it doesn't serve its main purpose.