From unknown Mon Jun 16 23:47:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#72426 <72426@debbugs.gnu.org> To: bug#72426 <72426@debbugs.gnu.org> Subject: Status: 29.2.50; comint-pager doesn't affect async-shell-command Reply-To: bug#72426 <72426@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:47:26 +0000 retitle 72426 29.2.50; comint-pager doesn't affect async-shell-command reassign 72426 emacs submitter 72426 Spencer Baugh severity 72426 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 02 14:36:00 2024 Received: (at submit) by debbugs.gnu.org; 2 Aug 2024 18:36:00 +0000 Received: from localhost ([127.0.0.1]:53746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZx89-0000Xd-4f for submit@debbugs.gnu.org; Fri, 02 Aug 2024 14:36:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:42932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZx84-0000XR-3J for submit@debbugs.gnu.org; Fri, 02 Aug 2024 14:35:55 -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 1sZx7j-00087z-8q for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 14:35:33 -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 1sZx7g-0004pU-K3 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 14:35:31 -0400 From: Spencer Baugh To: bug-gnu-emacs@gnu.org Subject: 29.2.50; comint-pager doesn't affect async-shell-command Date: Fri, 02 Aug 2024 14:35:25 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722623725; bh=tnd4Fq160QAsSdcK5BXyrfGYV1/1uX8pX8FPnS8CIdk=; h=From:To:Subject:Date; b=gr6aV+9HmX/jZmI8vyU3F2l9MBFu0O34R6NlFjYT0AFl5TF7yXnZh2odKC2wlM52r WroV3rfWGHp8dbtVMYs4Xz3LWzjsLmpsPoBl/UsqAjo1n7KZkx8dMlR41IEXd20ieX i87ORkeAx+h5F+IGskmh3gqGYqDMuSaaFCIM3MwNiZyFqWRhn8BF55SwUu9MXB2D5j DPees+mr3bjEx7be8oUZk6TNHQn6FjFObIVia6vq5BkIMdA5CUbImwl/YRyivSlofl ztmCMK/0Bq1+z0itm8LsZxd7PX96ee6YTTd1mdk3HQjpVFhlXEE60fckWx9hnUJ/Qr X4++ddhHlrFAA== Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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: -3.3 (---) 1. PAGER=less emacs -Q 2. (setq comint-pager "cat") 3. (async-shell-command "echo $PAGER") 4. Observe "less" rather than "cat". I intended async-shell-command to also be affected when I added comint-pager; a patch to fix this will follow. In GNU Emacs 29.2.50 (build 9, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2024-07-30 built on igm-qws-u22796a Repository revision: cd9604db959c439c5695cf79f6533b5cbd340851 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Rocky Linux 8.10 (Green Obsidian) Configured using: 'configure --with-x-toolkit=lucid --without-gpm --without-gconf --without-selinux --without-imagemagick --with-modules --with-gif=no --with-cairo --with-rsvg --without-compress-install --with-native-compilation=aot --with-tree-sitter PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/' Configured features: CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 02 14:40:07 2024 Received: (at 72426) by debbugs.gnu.org; 2 Aug 2024 18:40:07 +0000 Received: from localhost ([127.0.0.1]:53752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZxCB-0000fC-1u for submit@debbugs.gnu.org; Fri, 02 Aug 2024 14:40:07 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:34463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZxC9-0000eZ-E7 for 72426@debbugs.gnu.org; Fri, 02 Aug 2024 14:40:06 -0400 From: Spencer Baugh To: 72426@debbugs.gnu.org Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: (Spencer Baugh's message of "Fri, 02 Aug 2024 14:35:25 -0400") References: Date: Fri, 02 Aug 2024 14:39:41 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722623981; bh=IosTL35D243TRNBNgzyFp/52pdNegxItBYVPkATHK+Y=; h=From:To:Subject:In-Reply-To:References:Date; b=vXoWabNrPwBMW47TJrnvgjH1Ls5AJDsP7TKBc1kcJG4hJBcMjcgWRoyugHeRe3YYn s2RXyY+YCBEcXQmDogN3M/Mwyr/WjfMM3AgYsbDNMSRCbUBhKm5aq9q/dxmVivpDom H8eJBLINK8ote6UW5HSbenmrWkBC+GfRzRskpexuQMa0EljqiA9iqnLwMS9dWxVpsX XHXEBVNjGhwcvpP4Ln6G7EDqBQDREWh0ngHl2uIj7jf5BoxGM6DC7DDRtcMJukfUg/ C02FTCKDfxDK44kNW2NJK/hQnqGVor3ZpTYiVEhd8zN+HhgtMm7FpPbaRWAU8pnZaw 2mMouIaIHTkrA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 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 Patch fixing this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Respect-comint-pager-in-async-shell-command.patch >From 2af83cd922b34e1cde4ab4973e07fdb283acd26a Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Fri, 2 Aug 2024 14:39:08 -0400 Subject: [PATCH] Respect comint-pager in async-shell-command comint-pager now also affects async-shell-command. As a side benefit, this also allows it to be configured with connection-local variables. * lisp/comint.el (comint-exec-1): Remove check on comint-pager. (comint-term-environment): Add check on comint-pager. (bug#72426) --- lisp/comint.el | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index c7cd22d840a..4f28ddc3165 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -893,10 +893,6 @@ 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) @@ -925,7 +921,9 @@ comint-exec-1 proc)) (defun comint-term-environment () - "Return an environment variable list for terminal configuration." + "Return an environment variable list for terminal configuration. + +Includes a value for PAGER based on `comint-pager'." ;; If using termcap, we specify `emacs' as the terminal type ;; because that lets us specify a width. ;; If using terminfo, we default to `dumb' because that is @@ -934,12 +932,17 @@ comint-term-environment ;; Some programs that use terminfo get very confused ;; if TERM is not a valid terminal type. (with-connection-local-variables - (if system-uses-terminfo - (list (format "TERM=%s" comint-terminfo-terminal) - "TERMCAP=" - (format "COLUMNS=%d" (window-width))) - (list "TERM=emacs" - (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width)))))) + (nconc + (when comint-pager + (if (stringp comint-pager) + (list (format "PAGER=%s" comint-pager)) + (error "comint-pager should be a string: %s" comint-pager))) + (if system-uses-terminfo + (list (format "TERM=%s" comint-terminfo-terminal) + "TERMCAP=" + (format "COLUMNS=%d" (window-width))) + (list "TERM=emacs" + (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width))))))) (defun comint-nonblank-p (str) "Return non-nil if STR contains non-whitespace syntax." -- 2.39.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 01:50:48 2024 Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 05:50:48 +0000 Received: from localhost ([127.0.0.1]:53980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa7fE-0001jd-FJ for submit@debbugs.gnu.org; Sat, 03 Aug 2024 01:50:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa7fC-0001jP-JH for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 01:50:47 -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 1sa7cg-00077L-6Y; Sat, 03 Aug 2024 01:48: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=bSSl6BhOfmUcr3IY8TqKC9Jhy4fl1BeAwAWmxSlIEeM=; b=MwUQuJ2FuQ3c JIkW2V4PM5u9uiljV/b0kzN0dMofYFO2rZwYPV1JBFlU9nqlafSygqn0bJW5NiopsEv7f0VpICzzu Tc/yya8lD1Z09AXW2487/E8L21/2jHtx37Ix+mSiaUUjn9rwQ1JiReX+g61/xGCVDxPuB6WvJWGmu /KLumVipUcMp9mH8MJ+XyQSlhn6HLTVmSpGfd9BmAMKC0mPR/bD48kfHLAaE4B2xpqYrUQKMcO2Vo fy4/wkQqIJ4Pw22ZAv6CQbyTXDVL7pBBskkvLxUSMvMrQhORMjtHuD3hBfrgL3bcCwoaHtqKeLGAj Pc7U8hiCkhlWoquUUQHtmw==; Date: Sat, 03 Aug 2024 08:48:07 +0300 Message-Id: <86sevmupgo.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Fri, 02 Aug 2024 14:35:25 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: 72426@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 (---) > From: Spencer Baugh > Date: Fri, 02 Aug 2024 14:35:25 -0400 > > > 1. PAGER=less emacs -Q > 2. (setq comint-pager "cat") > 3. (async-shell-command "echo $PAGER") > 4. Observe "less" rather than "cat". > > I intended async-shell-command to also be affected when I added > comint-pager; a patch to fix this will follow. Thanks, I don't think this is right: comint stuff should not affect lower-level primitives, it should only affect comint and its callers. Lisp programs that use async-shell-command can arrange for process-environment to have PAGER=SOMETHING as they see fit. So I don't think we should install your patch. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 06:47:51 2024 Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 10:47:51 +0000 Received: from localhost ([127.0.0.1]:54119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saCIg-0000nM-9c for submit@debbugs.gnu.org; Sat, 03 Aug 2024 06:47:51 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:54439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saCId-0000n7-RR for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 06:47:48 -0400 Received: from mail-ej1-f69.google.com ([209.85.218.69]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.98) id 1saCIE-00000002z35-0I98 for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 06:47:22 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a7abee2b4b0so797278966b.1 for <72426@debbugs.gnu.org>; Sat, 03 Aug 2024 03:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1722682041; x=1723286841; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IfSyByOteYvm5FujMXsz/T5TXnVWQJJfC+N0SWpMZpo=; b=IDAX/L18HHApaX2j22hiCnVCs2BY6gTqvjo7H3gseuaV/Abjl/2n0ARyR1TjtI+egh RBiCCr9OteUPXNmq97DXyliXmBtpY5U0o08NpFfp098rCQEfkqKLHyUX/pvGIu0lvFYG wSqt9g5J8E9fDnWKaAH0NOcUc3QZqz06xB94c= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722682042; bh=IfSyByOteYvm5FujMXsz/T5TXnVWQJJfC+N0SWpMZpo=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=k+jyj4RqL3Uda0/HgzDoHy1xH2Pih7lsT7d/JRcLuKmy7ofHJHf2KHV7RkbGFgypW +MGxOjm69ZUkG+ef9V7lKGxDovvj9AJaHoJyvS9S3RRc4IZGQOFNwZON2Iydtlnjc9 tm7R9qvuTkcD75fUA2lrV9rppV9e+AhPou7x0po7aUXo30IbTX2C5usZWdy/yz3Lhg JdahUitF/wCJ9LgVUVejoimyCCdNxBk7CAU5IQAYt/1oOal+4mfUsHF6AoKosibeMJ H6AshBiPfo9MKLr49z9DP9N78MM88y2Yw+zy9o6bGvRQQ352+zLwoaZ6pKJTzHFkBt Hzq3ZPX/izcUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722682041; x=1723286841; 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=IfSyByOteYvm5FujMXsz/T5TXnVWQJJfC+N0SWpMZpo=; b=kIFW4xd8dQMIQ+2/tjOGMb63VWXQg49tRL9PdjtGEi69MvbmBdCcmpHCTKtCilFHTJ ivDJcaUb/CYI/HDEJUdlo6ZdFP3EO6AYCPWW+tEVCEZGWLKkYy0w29Xd+5ch6nWrEFWG EU2wpQYir+wIrcGbeFlBpxYyalID+nFxRiTLMVCw6zXfYrc8jrTvCxWVoztbw04kdbd0 zR7c202sVlMA9BAEX88KkFqveEh7sOwbvfsNdvmS9jfDnQ5POWeMubPEatZMYIhWE1pC UDih0is2fsoJ2uQlR5w50JSuNZQqBENqS7Yft01f844y8jk4+Q2BjKuv59fEfj1R+nD+ 3+4Q== X-Gm-Message-State: AOJu0YyJ/bg4frCbW0ciFkG1KGRI6sxXPAke2xmZC2lNT8M0a5ngWYLT 1hG1GE7JVRuEUrjkpqW34hWc1PIRhswfcIg2PjtsKVhevahvbHPMdF2ZKeJ3aZDS9KlE0+FHAXL P/THX5l//EK2xEZGbiJdMHyJWeYVDx8KShiL2v4CGQkP8cVD325tU3vHITFQiCnxCLpoQQI8Gl4 cMdLGTdGqbEhrwqMg7G/1nn/OFmw== X-Received: by 2002:a17:906:6a08:b0:a7a:a7b8:ada6 with SMTP id a640c23a62f3a-a7dc4ffa91dmr503732566b.39.1722682041596; Sat, 03 Aug 2024 03:47:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWjSsEaoMDJcyc4sZzEMmAWoHzqY3kXsrXcdyfsnRrkYZDm9Ad65L/oOKwqHCebGjNUs+lt37JvjEXjkErTNk= X-Received: by 2002:a17:906:6a08:b0:a7a:a7b8:ada6 with SMTP id a640c23a62f3a-a7dc4ffa91dmr503730966b.39.1722682041200; Sat, 03 Aug 2024 03:47:21 -0700 (PDT) MIME-Version: 1.0 References: <86sevmupgo.fsf@gnu.org> In-Reply-To: <86sevmupgo.fsf@gnu.org> From: Spencer Baugh Date: Sat, 3 Aug 2024 06:47:10 -0400 Message-ID: Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000002088b5061ec52bd3" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000002088b5061ec52bd3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 3, 2024, 1:48=E2=80=AFAM Eli Zaretskii wrote: > > From: Spencer Baugh > > Date: Fri, 02 Aug 2024 14:35:25 -0400 > > > > > > 1. PAGER=3Dless emacs -Q > > 2. (setq comint-pager "cat") > > 3. (async-shell-command "echo $PAGER") > > 4. Observe "less" rather than "cat". > > > > I intended async-shell-command to also be affected when I added > > comint-pager; a patch to fix this will follow. > > Thanks, I don't think this is right: comint stuff should not affect > lower-level primitives, it should only affect comint and its callers. > comint-terminfo-terminal affects async-shell-command, why not this? If the fact that the variable is in comint is the problem, I can rename it and move it elsewhere. Lisp programs that use async-shell-command can arrange for > process-environment to have PAGER=3DSOMETHING as they see fit. > My intention is primarily to affect interactive usage of async-shell-command. > --0000000000002088b5061ec52bd3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 3, 2024, 1:48=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Spencer Baugh <sbaugh@janestreet.com= >
> Date: Fri, 02 Aug 2024 14:35:25 -0400
>
>
> 1. PAGER=3Dless emacs -Q
> 2. (setq comint-pager "cat")
> 3. (async-shell-command "echo $PAGER")
> 4. Observe "less" rather than "cat".
>
> I intended async-shell-command to also be affected when I added
> comint-pager; a patch to fix this will follow.

Thanks, I don't think this is right: comint stuff should not affect
lower-level primitives, it should only affect comint and its callers.

comint= -terminfo-terminal affects async-shell-command, why not this?

If the fact that the variable is in c= omint is the problem, I can rename it and move it elsewhere.

Lisp programs that use async-shell-command can arrange for
process-environment to have PAGER=3DSOMETHING as they see fit.

My intention = is primarily to affect interactive usage of async-shell-command.
--0000000000002088b5061ec52bd3-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 11:39:28 2024 Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 15:39:28 +0000 Received: from localhost ([127.0.0.1]:54697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saGqu-0008Ur-G8 for submit@debbugs.gnu.org; Sat, 03 Aug 2024 11:39:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saGqs-0008Ud-3s for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 11:39:27 -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 1saGqR-0001qG-3y; Sat, 03 Aug 2024 11:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Y+Wmbkyc5z7Dldkh5A2c7rU3V/PEKF7xanqeIXSLqww=; b=FBB8JPVFr4G39MLQ4wIU 6sYDt4iQ26VmbkoCUMw6H0kcvXAK/6g3mh3qh5+7yI67yviu1IkAR1N1kYxpGIHg+s0CIFySG5hip BZg1fe210MW6gT98/+FoVAvhTqtC0X7O/8PypRsbWXojb4Yjats/k36ZYNyR9gDoVadmn0LGNxwM2 29uwcINvz9e2IfkQHgAcWsJmjUCtBKUcnmjFIc49cSKgvEMwC++AweciPO5t7kwkKMdryEiDPr7q6 8cOiAuiuYI8VSjuN4mWVtxVcgBApq/bZiD30ZvmSsYbYRYbPoGmADn1hmQavQS1sireFuhqB5YRdz QO3g5XdHYUxUXQ==; Date: Sat, 03 Aug 2024 18:38:56 +0300 Message-Id: <86bk29vcof.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Sat, 3 Aug 2024 06:47:10 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: 72426@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 (---) > From: Spencer Baugh > Date: Sat, 3 Aug 2024 06:47:10 -0400 > Cc: 72426@debbugs.gnu.org > > On Sat, Aug 3, 2024, 1:48 AM Eli Zaretskii wrote: > > > From: Spencer Baugh > > Date: Fri, 02 Aug 2024 14:35:25 -0400 > > > > > > 1. PAGER=less emacs -Q > > 2. (setq comint-pager "cat") > > 3. (async-shell-command "echo $PAGER") > > 4. Observe "less" rather than "cat". > > > > I intended async-shell-command to also be affected when I added > > comint-pager; a patch to fix this will follow. > > Thanks, I don't think this is right: comint stuff should not affect > lower-level primitives, it should only affect comint and its callers. > > 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. > Lisp programs that use async-shell-command can arrange for > process-environment to have PAGER=SOMETHING as they see fit. > > My intention is primarily to affect interactive usage of async-shell-command. But comint-term-environment also affects "M-x compile". From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 12:42:42 2024 Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 16:42:42 +0000 Received: from localhost ([127.0.0.1]:54734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saHq6-0002dy-2H for submit@debbugs.gnu.org; Sat, 03 Aug 2024 12:42:42 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:50407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saHq1-0002dR-IV for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 12:42:40 -0400 Received: from mail-ej1-f72.google.com ([209.85.218.72]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.98) id 1saHpb-00000003DpA-2nxp for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 12:42:12 -0400 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a77f0eca75bso827243066b.1 for <72426@debbugs.gnu.org>; Sat, 03 Aug 2024 09:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1722703331; x=1723308131; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KC6rdOzEydZZTB1pLIShG5qSlN7aJEcFz2+yali87qU=; b=aABoo53iD5Fe9Bp3BRRV9/LAx71Py05Jhna6B94AelxKIyDh2dBjpj2gFGIZCq20oV HkE4XFZmZvAtEdY8rkq7WyBEROa0ZpN2NvAPbigsIncli5b88UZyOwArK08X9FO0VYII AlKvVPKRXX6Qrqg6UhH4+0bGc/E2R8r5zejRg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722703332; bh=KC6rdOzEydZZTB1pLIShG5qSlN7aJEcFz2+yali87qU=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=MEhXThTMoJ+CjZ+CrBL+Dmp5ZtF90YOYuFoRj48EtqnzRwCVXogDZGklBhXw7+t4h aOZ/Qn6qzQkNV0QnzjJ+QU65xYcKfFgNrLu1y00X5D9wRUborAiYS9nbJTYJvhIikx tf1r6gCI1BOEi2vuu0pz64uFYEvKAHBKPcb8iYdDoLrA1LYhh35w9z5HCCAQOXJudB I8y2ZOb72vl2j7v2DmdPA1FfDLWxqZNXBBQCAL429T9L5vZXmz57U1rXwetVuUp8rx B3ZklG4AW6/BtFKjesIhUpDywxsbY/Yv1ZimXMvk8g0sNJYCJxpST7MAf4pMrKR3G3 SirQzOH8QF5NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722703331; x=1723308131; 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=KC6rdOzEydZZTB1pLIShG5qSlN7aJEcFz2+yali87qU=; b=R4yFq0B92We2MtLqkRUBHR811VYnYSQ7nwx98mjqdTgRAddzdmLjhEBGdPrVkgZhtI 19BSg+rDxSZ+ql4GfIvYefOA5zrxNTd5Y5l+uFl0nqL/qdN+ruhg17J2TTO+4IB5PTGt hzlge+BH7nXgHErlOPLMq6j3HdESIWEGC0Y6S5+P3EDdnf++7MljmrVs2LlMUodVuMxT wb7wvat8UmmSfxA39SmHRAHz1QN4kAJdTaJV032PkqeZqE+D4DlvRaMNVa0BazVfPcMX gNtxKJ1HN+yh9VxsEEdLGU1lqiQQ3/AY1sa846SoioIKeGVqtbHXxB5Finlr8UY/NVyk 4O1Q== X-Gm-Message-State: AOJu0YwT6hp4t+JRld+OXMFPQTABDZsKLlNrlGWnTET9kIj2JBPMVjw6 fwDSMuHni10dxEDOryCreXgZ6vG4u2OJk3ptIOq2IS4oT2UePlzwCkMqcZGAhbJwF01imibYc30 5LoDIcscjyBvkSUQGehjsb6TPLELL5zgsbDi5ntXcMteumLrWwP24iEnkhEMxiPqGkXhlVZCvxZ YPQf+GbMitQG2OR5mcrVIgwFvg1Q== X-Received: by 2002:a17:907:724b:b0:a72:7d5c:ace0 with SMTP id a640c23a62f3a-a7dc4db39fcmr501351966b.11.1722703331248; Sat, 03 Aug 2024 09:42:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3bRoEv2Lq3uE7Q+WNfCfgwQR/qQ0JFs3SVyLzzkRW/GmS91wLhfLaWaYZvuFh4M9g4Yds5qI0KyAv4if5O6Q= X-Received: by 2002:a17:907:724b:b0:a72:7d5c:ace0 with SMTP id a640c23a62f3a-a7dc4db39fcmr501350666b.11.1722703330706; Sat, 03 Aug 2024 09:42:10 -0700 (PDT) MIME-Version: 1.0 References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> In-Reply-To: <86bk29vcof.fsf@gnu.org> From: Spencer Baugh Date: Sat, 3 Aug 2024 12:42:00 -0400 Message-ID: Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000149c0c061eca20ea" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000149c0c061eca20ea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 3, 2024, 11:39=E2=80=AFAM Eli Zaretskii wrote: > > From: Spencer Baugh > > Date: Sat, 3 Aug 2024 06:47:10 -0400 > > Cc: 72426@debbugs.gnu.org > > > > On Sat, Aug 3, 2024, 1:48=E2=80=AFAM Eli Zaretskii wrote= : > > > > > From: Spencer Baugh > > > Date: Fri, 02 Aug 2024 14:35:25 -0400 > > > > > > > > > 1. PAGER=3Dless emacs -Q > > > 2. (setq comint-pager "cat") > > > 3. (async-shell-command "echo $PAGER") > > > 4. Observe "less" rather than "cat". > > > > > > I intended async-shell-command to also be affected when I added > > > comint-pager; a patch to fix this will follow. > > > > Thanks, I don't think this is right: comint stuff should not affect > > lower-level primitives, it should only affect comint and its callers. > > > > 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. > If we're not going to make the variable apply to all usage, I think it should just be deleted before 30 is released. There's no point to it in that case, because it's still necessary to add (setenv "PAGER" "cat") to one's configuration. Alternatively, the default of comint-pager should be set to "cat". But I see no value in a variable like this if it neither applies to all (or at least most) users, nor provides better default behavior. > > Lisp programs that use async-shell-command can arrange for > > process-environment to have PAGER=3DSOMETHING as they see fit. > > > > My intention is primarily to affect interactive usage of > async-shell-command. > > But comint-term-environment also affects "M-x compile". > Yes, I would like comint-pager to also affect that. > --000000000000149c0c061eca20ea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Sat, Aug 3, 2024, 11:39=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Spencer Baugh <sbaugh@janestreet.co= m>
> Date: Sat, 3 Aug 2024 06:47:10 -0400
> Cc: 72426@debbugs.gnu.org
>
> On Sat, Aug 3, 2024, 1:48=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> = wrote:
>
>=C2=A0 > From: Spencer Baugh <sbaugh@janestreet.com> >=C2=A0 > Date: Fri, 02 Aug 2024 14:35:25 -0400
>=C2=A0 >
>=C2=A0 >
>=C2=A0 > 1. PAGER=3Dless emacs -Q
>=C2=A0 > 2. (setq comint-pager "cat")
>=C2=A0 > 3. (async-shell-command "echo $PAGER")
>=C2=A0 > 4. Observe "less" rather than "cat". >=C2=A0 >
>=C2=A0 > I intended async-shell-command to also be affected when I a= dded
>=C2=A0 > comint-pager; a patch to fix this will follow.
>
>=C2=A0 Thanks, I don't think this is right: comint stuff should not= affect
>=C2=A0 lower-level primitives, it should only affect comint and its cal= lers.
>
> comint-terminfo-terminal affects async-shell-command, why not this?
Ugh!=C2=A0 A mistake, IMNSHO.=C2=A0 But that ship sailed a long time ago, s= o we
cannot fix the mistake.=C2=A0 We can avoid enlarging the mistake, though.
> If the fact that the variable is in comint is the problem, I can renam= e 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.
<= /div>

If we're not g= oing to make the variable apply to all usage, I think it should just be del= eted before 30 is released.=C2=A0 There's no point to it in that case, = because it's still necessary to add (setenv "PAGER" "cat= ") to one's configuration.

Alternatively, the default of comint-pager should be set to &qu= ot;cat".

But I see = no value in a variable like this if it neither applies to all (or at least = most) users, nor provides better default behavior.
<= br>

>=C2=A0 Lisp programs that use async-shell-command can arrange for
>=C2=A0 process-environment to have PAGER=3DSOMETHING as they see fit. >
> My intention is primarily to affect interactive usage of async-shell-c= ommand.

But comint-term-environment also affects "M-x compile".

Yes, I wou= ld like comint-pager to also affect that.
--000000000000149c0c061eca20ea-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 13:19:08 2024 Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 17:19:08 +0000 Received: from localhost ([127.0.0.1]:54744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saIPL-0004Sp-U4 for submit@debbugs.gnu.org; Sat, 03 Aug 2024 13:19:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saIPI-0004S6-UP for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 13:19:06 -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 1saIOt-00066E-5u; Sat, 03 Aug 2024 13:18: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=k/nmX46zA0K3qPk7eA5fYojdIF54J+wczKEoAYGBwi4=; b=LVCjKODkxBr9 8CYgGmBm1NT7gBBKg1kKSsrZhvFPrVX3p4LbSLqwWDJNzuvWd4BtBx78fnawNJSWK4VjH8ob7cKOa tljQjlOCWB45pIbMLq7Y2Xv0hdoWU8QKD6g0QgMDvQrvijn7brxjnrWNv5SEayEDSDxzLn0StSm3r QQ6Lh4unC5GlwgCUvq75sLz8Tcw38Qwt7vVMKVCH5Cq/mEooran4noAV5WY+bcfA1x6l7rSyavo/V nzxOVUdIeB/iNu9EUzzJ094V0ODZS5cN+zFBfqF5lrgA9sZ9sZmAI/TW4/tTKjWovMwGjBIAQedxV uoNRZo2B8cD1DjdDlZopzw==; Date: Sat, 03 Aug 2024 20:18:35 +0300 Message-Id: <8634nlv82c.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Sat, 3 Aug 2024 12:42:00 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: 72426@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 (---) > From: Spencer Baugh > Date: Sat, 3 Aug 2024 12:42:00 -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. > > If we're not going to make the variable apply to all usage, I think it should just be deleted before 30 is > released. There's no point to it in that case, because it's still necessary to add (setenv "PAGER" "cat") to > one's configuration. > > Alternatively, the default of comint-pager should be set to "cat". > > But I see no value in a variable like this if it neither applies to all (or at least most) users, nor provides better > default behavior. > > > Lisp programs that use async-shell-command can arrange for > > process-environment to have PAGER=SOMETHING as they see fit. > > > > My intention is primarily to affect interactive usage of async-shell-command. > > But comint-term-environment also affects "M-x compile". > > Yes, I would like comint-pager to also affect that. That makes very little sense to me, as "M-x compile" is used for non-interactive programs. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 03 14:40:03 2024 Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 18:40:03 +0000 Received: from localhost ([127.0.0.1]:54798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saJff-0008PQ-3Q for submit@debbugs.gnu.org; Sat, 03 Aug 2024 14:40:03 -0400 Received: from mail-pl1-f171.google.com ([209.85.214.171]:58673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saJfc-0008Od-PI for 72426@debbugs.gnu.org; Sat, 03 Aug 2024 14:40:01 -0400 Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1fc5549788eso74926615ad.1 for <72426@debbugs.gnu.org>; Sat, 03 Aug 2024 11:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722710315; x=1723315115; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=MY+6rp5RpBxa3sGsYI7ci4IXiHsWHVKrTD2XVGPQMX8=; b=flrMW0+57OhJnJxrJYr5OdPmzcT0mmw1qk2IoPFInPcnDBIXmFJjEG0CWZnlUoZ8Sm UzVs75hzsJC39W1GspPwL5bcNV+SpxJEZDsHrOBjvPCzwIHlzlEPSCzmULjX4A2MiGoY zWh2Vox/4ZPDl4p7GyTkNogo3Mh2fpFBXa7QRMrdGp2qbg4bZn9NGjO3NYnbO9uzWaky 00+cleusKjPr10P2DL8+iifRU771ZJF6mS/ELEOrgUsueY1PfnJiV2g75v8XkVeAZNzT RLtkO5TMu8sK5lfPedKFjrJripR/kyaV/7Oq4Oz+iqiOe20b/CY8zc20VBzO1eN3EnI7 874A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722710315; x=1723315115; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MY+6rp5RpBxa3sGsYI7ci4IXiHsWHVKrTD2XVGPQMX8=; b=RDIGPaTX1fLsR6rqLBlLaqjpyz9DH5MWJCJz0bk1D11WYS5NjKTHCeE3I63ZrMvsbP yzEq2AYG2W31HlWL33EvCixNh5ODGD3KJGPm0msM9rgk67I3MB9P9pmj7nJDQT2OHxXz 0Rn6lLpRJ4zVPZyDbJQmCfUV3VT84pZTrR/sp0+/exUEKc6XvNzevJksZETnpJnMfRdy MF3kYCOrV1UawhBfNBzrBuJcDdFi8LvT1kj+G6PS2XydSgahZoccPrJ7mY9+aid9cyIj mVYXVCmTrJcif+uOWFVU3LlxiyMz/dv765ZEI7gOofyQB9fazDN8zmCr/ozG6d6lRc+h QxUQ== X-Gm-Message-State: AOJu0YwK84XgdLpsFYOEcEekkKADpOZoAs3GDUYZqJwgZE3E4T0jISDL Q1wLuuZO8Q4j/WhsLXUhOTTEdAIT99smibAMUGJr+SmJ0J7XTpta X-Google-Smtp-Source: AGHT+IF5aY1a/MrgB1Rao4AoX5iw2h0NI4l6x36i9XrfKwPBkHsen9dXoh6RrdlozTQSoLf5JZ7uPA== X-Received: by 2002:a17:903:24c:b0:1fd:9e6e:7c1f with SMTP id d9443c01a7336-1ff5748f366mr97255775ad.56.1722710314649; Sat, 03 Aug 2024 11:38:34 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1ff58f19cc2sm38150315ad.36.2024.08.03.11.38.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Aug 2024 11:38:34 -0700 (PDT) Message-ID: <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> Date: Sat, 3 Aug 2024 11:38:35 -0700 MIME-Version: 1.0 Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Content-Language: en-US To: Eli Zaretskii , Spencer Baugh References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> From: Jim Porter In-Reply-To: <86bk29vcof.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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")) 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 11:31:38 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 15:31:38 +0000 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 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 From: Spencer Baugh To: Jim Porter Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> (Jim Porter's message of "Sat, 3 Aug 2024 11:38:35 -0700") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> Date: Tue, 06 Aug 2024 11:31:06 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: Eli Zaretskii , 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 11:34:24 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 15:34:24 +0000 Received: from localhost ([127.0.0.1]:32911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbMCd-0001Ms-Rc for submit@debbugs.gnu.org; Tue, 06 Aug 2024 11:34:24 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:40857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbMCX-0001MT-04 for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 11:34:22 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <8634nlv82c.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 03 Aug 2024 20:18:35 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <8634nlv82c.fsf@gnu.org> Date: Tue, 06 Aug 2024 11:33:47 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722958427; bh=7iPkm8GnsAxNV+ZRVIyNbvTAglSA4g5v/4CM+5NTPas=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=fzDQZ9Owc3Zi44r3xc26hekY0Hvt4BDyqZXgWsgkVLFAroODn9e+Di2/1clWbcaKE +p1FfzFcm/3BNI/7Z74P3xyuwO7B0fEjQunGyjc9OLDlhz1BrXyBhVGZ7e0yFdxsxq 7cKTWBsnJDUpxJMtN99TZP+G3Mr6XXbK47rTfgF1/YmpcmGtlHqspXknyVAqFcCRn/ U1RHIZIiusncjYhoorX4ADhHpe8lmZEUptrKlUJiQ7oQiGNIKP34USlVRV92QLxWsb lA0hKamVTalggOQhIerDHIm6T97a8YkRupauFrWib4/Lvs25rkuXSt0WX0ro7ZeY48 gc+lwEXqGvW5g== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Date: Sat, 3 Aug 2024 12:42:00 -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. >> >> If we're not going to make the variable apply to all usage, I think it should just be deleted before 30 is >> released. There's no point to it in that case, because it's still necessary to add (setenv "PAGER" "cat") to >> one's configuration. >> >> Alternatively, the default of comint-pager should be set to "cat". >> >> But I see no value in a variable like this if it neither applies to all (or at least most) users, nor provides better >> default behavior. >> >> > Lisp programs that use async-shell-command can arrange for >> > process-environment to have PAGER=SOMETHING as they see fit. >> > >> > My intention is primarily to affect interactive usage of async-shell-command. >> >> But comint-term-environment also affects "M-x compile". >> >> Yes, I would like comint-pager to also affect that. > > That makes very little sense to me, as "M-x compile" is used for > non-interactive programs. Yes. If you run a program which is supposed to be non-interactive, and it tries to run PAGER (as some do, e.g. "hg log"), then it will break. So setting PAGER would be helpful for M-x compile. Anyway, can we just remove comint-pager for now, to avoid adding something broken that has to be maintained? I can try it again for Emacs 31. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 11:46:52 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 15:46:52 +0000 Received: from localhost ([127.0.0.1]:32923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbMOi-0001lv-4p for submit@debbugs.gnu.org; Tue, 06 Aug 2024 11:46:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbMOf-0001lY-AY for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 11:46:50 -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 1sbMOB-0000CG-2a; Tue, 06 Aug 2024 11:46:19 -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=XKbbjrgZIJY42AP9EEh+lqpjCxZ0Tk6HJp0E0vF171Q=; b=Kl6YBNY3OJbp tQ4drfsiS3gNdgVV/tf3JgPBxbsnCKyQZJBhVtkk3qOZz5qgFK2BEMyOF/9jlVBHNw/4KnduRq9EA 0V87cAcioqCRhjCBF51J1yV825VtcRijpOMeIK3Iwij4S2dGrhbCrEBuBTQmsGyaxiZATSanSf8zD iLdX2VYA/C+IPWesKtvPue2tHEjiW0+XzKkJhN/qa8M3F8g79JkRF03vfIvh3ktPB1QSEeecEfm7k lb9eqzKSaaLSCMXA+ziAI8g+gMPhI0qhr24+Gb/xVMKRPNxQV7rt3dsD/kM14XcJshiX9d1QdEz/U P4J77zOFu9QqksOa4jvg2g==; Date: Tue, 06 Aug 2024 18:46:14 +0300 Message-Id: <864j7xpsc9.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 06 Aug 2024 11:33:47 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <8634nlv82c.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: 72426@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 (---) > From: Spencer Baugh > Cc: 72426@debbugs.gnu.org > Date: Tue, 06 Aug 2024 11:33:47 -0400 > > Anyway, can we just remove comint-pager for now, to avoid adding > something broken that has to be maintained? I can try it again for > Emacs 31. I think it's too late for that, sorry. It is already supported in Eshell, and Emacs 30 is frozen for such changes anyway. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 11:51:19 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 15:51:19 +0000 Received: from localhost ([127.0.0.1]:32929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbMT0-0001vF-Pr for submit@debbugs.gnu.org; Tue, 06 Aug 2024 11:51:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbMSx-0001us-9V for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 11:51:17 -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 1sbMST-0000kP-7A; Tue, 06 Aug 2024 11:50: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=OB7AEqJjfYe830rC8pz+YArjKDMNEs9XrJIapg81Bdc=; b=alF7VvwrEZ9q 5u+KUOaHGoDDJmZ8YoFrCPCsXUrYDPFcXw/b9eVQIodWE/oUexY7MsNh24x4OZ/76d/SSKHSSt6KN 1QqMBzlaRQtGbujKtVs/Xn+q+qMqg9vfKNYKDYxS4VsYfuQvZJhBso3uOIPNLm9RMD23Wh7HhBRMl 6UrrxCfFD+QA34Zt8R9Mx+LQ3YsLDfNmfkAcY7SSAdybUrLc4MpNfc4VH6eY5T9hr56Wb0BPIKP8Z JMLS8uL06exYEdEFKRpVF95adS9wm2awgCjnUnGXKmGzSNYe80PtXaY5XeAGsl2in4TZotwjXAD5c TB8N4AtouUzBwBonNdZkZA==; Date: Tue, 06 Aug 2024 18:50:42 +0300 Message-Id: <8634nhps4t.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 06 Aug 2024 11:31:06 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@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 (---) > From: Spencer Baugh > Cc: Eli Zaretskii , 72426@debbugs.gnu.org > Date: Tue, 06 Aug 2024 11:31:06 -0400 > > Jim Porter writes: > > > 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. We could perhaps try this on master. If it doesn't cause trouble, maybe this is the right way, indeed. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 12:31:07 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 16:31:07 +0000 Received: from localhost ([127.0.0.1]:32955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbN5W-00033n-Iz for submit@debbugs.gnu.org; Tue, 06 Aug 2024 12:31:06 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:56805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbN5U-00033G-D0 for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 12:31:05 -0400 Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1fed72d23a7so7152435ad.1 for <72426@debbugs.gnu.org>; Tue, 06 Aug 2024 09:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722961774; x=1723566574; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=ZozGEbxHd+fzVU7RCE1IMbAaLEweZuf9zgAsk1V486w=; b=RPCMQXJv0fPmD6BEia1TQ8VwHdKhUy/yP6OPWnrXMbZImlkKudA6FBoRmzVuRpG+XG qTHP0+JH6TUG8ihqU+YviibS/17jGYj73ivIgv7KgsHnP+92/SmuYMeHfmmWy8dtLXWw 9I3XQjomB3e8iMNiSG0CRzxa1IQLkqfvKLHz7I0cRePzK02zRrIutWPGvrwVkA2f5vf7 HPeVOYyoLtWS0/Gkn5sanO/AxKMhmDnSEYk+xdQpzBK2gTbz/FfP5Hk5bg29HUPE7lpJ HFEYGXvU934RMAwWoCtXYcGSXULkOcA+BRFZb/37/qvUk4R4eQexADfblILIh5/+V0q1 e6kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722961774; x=1723566574; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZozGEbxHd+fzVU7RCE1IMbAaLEweZuf9zgAsk1V486w=; b=wp9z5e+Lvdr9s36OWmsOsNcJrEybukA3MlXLGJ3uFrt7sDWu/XIbqd7OQ8TezMlfw6 xgxc1AvUKTOhgtufzj/vE1WKVtoK+Cpdb9wTV1iAQ/n4mB0P6yJ2ubaAZUm2xWygdH/s GkDmpTaridrAtK5GtehuCEtd68HFiFTj49s/daF6ubHoGHLo/iEqNxbLHzoTfASiDAXx yr2rC48zZuOEfkvFY+zc/Q4TwBKtQWC3bVMS6jJ+o+l3AVlPwqRLFzaURMpH1tTnpNW3 8EP8eWYZM8EVBJ1K4/Ms0TI/6h7MKNo1a9hbrSfV/DS7kQfKrh8Fz3MbZzWnMWWQ0B66 znEA== X-Gm-Message-State: AOJu0YyFwGRYMNmS8ot32OKlNROj0dHsqCPU3YO7E1DVwEPMzbADax5G 1w7xrPLYVHRpKC+ZICAk9W3Rd6F6uNEW0fmxB6IdCD6a1eTlM8h5 X-Google-Smtp-Source: AGHT+IHuGfFZNA6lu33XF16zhwWmma08TuA/O9HEEJ3+JOWV6HKAxRhXPzPWeGI9Iyz4/4AvTaxgKg== X-Received: by 2002:a17:902:f54b:b0:1fd:8904:ecf6 with SMTP id d9443c01a7336-1ff5728c53fmr168814075ad.21.1722961774052; Tue, 06 Aug 2024 09:29:34 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-7b7654befeasm7116523a12.76.2024.08.06.09.29.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Aug 2024 09:29:33 -0700 (PDT) Message-ID: <091182cc-9667-7740-9712-9affe3a2548e@gmail.com> Date: Tue, 6 Aug 2024 09:29:34 -0700 MIME-Version: 1.0 Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Content-Language: en-US To: Eli Zaretskii , Spencer Baugh References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <8634nlv82c.fsf@gnu.org> <864j7xpsc9.fsf@gnu.org> From: Jim Porter In-Reply-To: <864j7xpsc9.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 8/6/2024 8:46 AM, Eli Zaretskii wrote: >> From: Spencer Baugh >> Cc: 72426@debbugs.gnu.org >> Date: Tue, 06 Aug 2024 11:33:47 -0400 >> >> Anyway, can we just remove comint-pager for now, to avoid adding >> something broken that has to be maintained? I can try it again for >> Emacs 31. > > I think it's too late for that, sorry. It is already supported in > Eshell, and Emacs 30 is frozen for such changes anyway. For what it's worth, from the perspective of Eshell, I see the current implementation as a half-measure that makes things better, but may be obviated by a better implementation (e.g. setting PAGER in startup.el). While it's disappointing to have a not-quite-right solution make it to 30.1, I don't think that solution paints us into a corner either: it doesn't make it any harder for us to make the startup.el change for 31.1. On the plus(?) side, it looks like the only place 'comint-pager' is mentioned is in the Eshell manual (and the docstrings, of course). So since we're not really "advertising" this option, and since I think it would still be useful even with the startup.el change, I don't think we have to worry too much. We can just consider the underlying issue to be something we'll (try to) fix in 31. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 12:42:40 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 16:42:40 +0000 Received: from localhost ([127.0.0.1]:32971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbNGh-0003MS-MH for submit@debbugs.gnu.org; Tue, 06 Aug 2024 12:42:40 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:57971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbNGg-0003MF-IW for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 12:42:39 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <8634nhps4t.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Aug 2024 18:50:42 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> Date: Tue, 06 Aug 2024 12:42:09 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722962529; bh=pZBdDGicZk4OmIxPAYD6dNjCijdrExJF91pC1si5tJw=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=mVKNmjCxmmI/81UEUqRG9QDF2DsBgJAbHm52Qqy35UZSWlb7cjpqzvJy+AQQCGXfd q4A0S1gMdy1KKGc4cPa7LVRIuvm0nbMJkLuaXwe4DC0OGFSHRoFMJ2Bde4wI9IE0TU 6M+a9KRbGHbiJBa0Crw+RmR/kTwVb5behGvwOfpGuejhwI9Xzl8YMuRmAh/1i1qvFu CkUpmkB9xragKZtfB3wxzcfaDfHUW8vicOtJA4/ckjzE9vH4wdfDW6wNP+je7PoYJ/ /MpnsIq0px03LyK+XSPm8mOrJV/qRu/wnF4ke77IqDrlvRIeBPDzZwdf2xkzbQ8lo1 lGeIPh5uVU23A== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: Eli Zaretskii , 72426@debbugs.gnu.org >> Date: Tue, 06 Aug 2024 11:31:06 -0400 >> >> Jim Porter writes: >> >> > 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. > > We could perhaps try this on master. If it doesn't cause trouble, > maybe this is the right way, indeed. Here's a patch which does this, for master. (Everyone please feel free to CC me on any bugs or emacs-devel discussions about this; I will try hard to fix any issues that crop up.) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Stop-subprocesses-from-using-inherited-or-default-PA.patch >From 14db307fd53a6c5b13a09ef3e023b0ba299d61a8 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 6 Aug 2024 12:39:37 -0400 Subject: [PATCH] Stop subprocesses from using inherited or default PAGER At startup, set PAGER to cat so that any inherited or default value of PAGER does not affect subprocesses of Emacs. Pagers generally won't work when a subprocess runs under Emacs. A user can use comint-pager (or other customizations) to tell subprocesses to use a different specific pager. * lisp/startup.el (normal-top-level): Set PAGER to cat, if cat is available. (bug#72426) --- lisp/startup.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/startup.el b/lisp/startup.el index f18795ae6ac..324f3aeee60 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -854,6 +854,10 @@ normal-top-level ;; 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") + ;; Likewise, subprocesses should not use a pager unless told + ;; otherwise, since it generally won't work. + (when (executable-find "cat") + (setenv "PAGER" "cat")) ;; Remove DISPLAY from the process-environment as well. This allows ;; `callproc.c' to give it a useful adaptive default which is either ;; the value of the `display' frame-parameter or the DISPLAY value -- 2.39.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 14:04:44 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 18:04:44 +0000 Received: from localhost ([127.0.0.1]:33001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbOY8-0005Qd-5g for submit@debbugs.gnu.org; Tue, 06 Aug 2024 14:04:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbOY6-0005QM-DI for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 14:04:42 -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 1sbOVX-0001mv-3o; Tue, 06 Aug 2024 14:02:03 -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=CtwxjFCFdnqT930pu1oezHecNC6bu4p1rjW2gqIHv7U=; b=dHshNcgwvYF/ 1HUA2Ll/lGQgtj+rgkGxUEc38/dytzjb6AOA2LLKCN2oDjAAhrGpqT7AqK9I3+gUQTuTM6Ug4eVFY nyJk5DdMge6vsk2Idf8B/Eba2y8DBWFcSl/NTOBLxxT1DX/up08UYNPpzM2O5D3iQLF3Twgb2mqhk KIhnhe7m4Hz9TI63wnrPwRHET6ZQVdD9/88/Anvg+0seV2yizP5BR9sPj8vOaaKey1M42RyI0Rwy3 Frm7saFBl1Nj/qRF6tNoZgo1mkEuD6rt1kzjm8nXMbzHEALlM6lAlJW9H4jeZYzq6OgpcY8kx3bLm FyEaQ6Wi19g2zgKVKH3vBA==; Date: Tue, 06 Aug 2024 21:02:00 +0300 Message-Id: <86y159o7hj.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter In-Reply-To: <091182cc-9667-7740-9712-9affe3a2548e@gmail.com> (message from Jim Porter on Tue, 6 Aug 2024 09:29:34 -0700) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <8634nlv82c.fsf@gnu.org> <864j7xpsc9.fsf@gnu.org> <091182cc-9667-7740-9712-9affe3a2548e@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: sbaugh@janestreet.com, 72426@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 (---) > Date: Tue, 6 Aug 2024 09:29:34 -0700 > Cc: 72426@debbugs.gnu.org > From: Jim Porter > > On 8/6/2024 8:46 AM, Eli Zaretskii wrote: > >> From: Spencer Baugh > >> Cc: 72426@debbugs.gnu.org > >> Date: Tue, 06 Aug 2024 11:33:47 -0400 > >> > >> Anyway, can we just remove comint-pager for now, to avoid adding > >> something broken that has to be maintained? I can try it again for > >> Emacs 31. > > > > I think it's too late for that, sorry. It is already supported in > > Eshell, and Emacs 30 is frozen for such changes anyway. > > For what it's worth, from the perspective of Eshell, I see the current > implementation as a half-measure that makes things better, but may be > obviated by a better implementation (e.g. setting PAGER in startup.el). > While it's disappointing to have a not-quite-right solution make it to > 30.1, I don't think that solution paints us into a corner either: it > doesn't make it any harder for us to make the startup.el change for 31.1. > > On the plus(?) side, it looks like the only place 'comint-pager' is > mentioned is in the Eshell manual (and the docstrings, of course). So > since we're not really "advertising" this option, and since I think it > would still be useful even with the startup.el change, I don't think we > have to worry too much. We can just consider the underlying issue to be > something we'll (try to) fix in 31. Yes, I think the fix will have to be postponed to Emacs 31, and meanwhile we need to test the fix well enough to be sure it (a) fixes the problem and (b) doesn't cause new ones. There's a lesson to be learned here, but I'll leave to each one of use to spell it out to him/herself. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 14:07:59 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 18:07:59 +0000 Received: from localhost ([127.0.0.1]:33011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbObH-0005WM-4Z for submit@debbugs.gnu.org; Tue, 06 Aug 2024 14:07:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbObF-0005WA-LJ for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 14:07: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 1sbOam-0002pS-8K; Tue, 06 Aug 2024 14:07:28 -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=K0/K6CdM18IAmX3woTapbyGIT9MMsZJJILs/jeeaKig=; b=aSE/prIbSoXj OPzhK4L3FDYyvjepI+QVwbqHgMRh2RlxqMDvOtjrhIYyFXm2PfubIUi3i0Jsboduv+NaARS4fh4Np 2QjL9kXhz1II9l/qfO4YBdFw7QpGPjOjBVyKlKOboLGz5o2oUodMNoQGqMf+X4Tm2E1JVStJIHkXs ugOA1z/RxdafcveGwqK3nES3mc9ePo2WuvcsRYMc1eJa5piIyXqmwgdF5+HkPbWMWqF7YAnjcRM+6 n9KNVsSpXCw6LtmYalnPCekORmg1dUh2r1YQ2IU8J0iSUCbsOleEMbJJTN13ygyXzu95x7kEAmF0Z tp9ZiJsy1yKS0a7ODXV42Q==; Date: Tue, 06 Aug 2024 21:07:02 +0300 Message-Id: <86v80do795.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 06 Aug 2024 12:42:09 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@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 (---) > From: Spencer Baugh > Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org > Date: Tue, 06 Aug 2024 12:42:09 -0400 > > --- a/lisp/startup.el > +++ b/lisp/startup.el > @@ -854,6 +854,10 @@ normal-top-level > ;; 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") > + ;; Likewise, subprocesses should not use a pager unless told > + ;; otherwise, since it generally won't work. > + (when (executable-find "cat") > + (setenv "PAGER" "cat")) We need to work on the comment, because it doesn't explain any of what it needs to. Worse, it says something very confusing and at least inaccurate. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 14:50:18 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 18:50:18 +0000 Received: from localhost ([127.0.0.1]:33060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbPGE-0006bc-DZ for submit@debbugs.gnu.org; Tue, 06 Aug 2024 14:50:18 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:32895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbPGB-0006bH-Gv for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 14:50:16 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <86v80do795.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Aug 2024 21:07:02 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> Date: Tue, 06 Aug 2024 14:49:45 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722970185; bh=TEJU/XG8DaIrvfjj9ZCyz+nURtjnWjDw+rF1ldyYfM4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=fHSBTRQs6QrJXtvuZUuPpRPwwEv6dsSpp+dwc5k3RqMgv1L0NhWfZe4DD/7UKB5RI 9yupOI8INRbMw72phtWkSVCCxkAX66DPkUReG0px2gpYjAqREnzA3EgtdLEsoJHyMw 5rbMY/xobb+mMTsyvFthGcrCygeiOVbto7RiNN2wYNzPKxIx24p9/iqHTfEOtG4QT2 CrrBcnVsKNCfkCT/ZWKDDr09lRU5HY52TWedpaQy31OFjBgqDMwBei395c/CMNuvT3 tD9LUMjTd+3UxXcbykSX2ksPshvxbq05lVwXji0xpA560epX9svCGkgmc29sUrBQWs Y5NaCFP1SHLUg== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org >> Date: Tue, 06 Aug 2024 12:42:09 -0400 >> >> --- a/lisp/startup.el >> +++ b/lisp/startup.el >> @@ -854,6 +854,10 @@ normal-top-level >> ;; 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") >> + ;; Likewise, subprocesses should not use a pager unless told >> + ;; otherwise, since it generally won't work. >> + (when (executable-find "cat") >> + (setenv "PAGER" "cat")) > > We need to work on the comment, because it doesn't explain any of what > it needs to. Worse, it says something very confusing and at least > inaccurate. Could you just say what you'd prefer the comment to be? I'm not sure what exactly you'd like it to explain. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 15:08:02 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 19:08:02 +0000 Received: from localhost ([127.0.0.1]:33073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbPXN-000745-Ru for submit@debbugs.gnu.org; Tue, 06 Aug 2024 15:08:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbPXM-00073j-8J for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 15:08:00 -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 1sbPWr-0003Dz-TP; Tue, 06 Aug 2024 15:07:29 -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=YmwabjwbAJBG1xLHKSWXLja1yYGRFOYqwLDwT0yIWkI=; b=AIQ1WnLIVX/a 7CYgJNhWcuKD0Tu02+Rk3xJoEEXTborjvHvMo1ajeiiXaYKafi7Z1v387sO+SiXnnW1qj9mnAgGz5 zJmzgXDswEiHRC/5HF+5OIbc/ZRDkYU2r8IniWr+4asyDDmQxUxT2jFZqc8DUIPsWV9IzsB66Yr64 eY0HGLjLhxjP6DU5xeML9NLrvCHdFtt3NnRImAhS8sk6V7OfGTrQfR5zkzRMz15gOikeRStmVLezt CrjOhFR3drsOx6X8IGQtfGhhL64STzFH8Wosm1rW/C3MsC6nPW2UXVVjVtjxobpjSqxGc8OOhGPKr a792O20tdpCmhaRaMSrkPA==; Date: Tue, 06 Aug 2024 22:07:27 +0300 Message-Id: <86o765o4gg.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 06 Aug 2024 14:49:45 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@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 (---) > From: Spencer Baugh > Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org > Date: Tue, 06 Aug 2024 14:49:45 -0400 > > Eli Zaretskii writes: > > >> From: Spencer Baugh > >> Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org > >> Date: Tue, 06 Aug 2024 12:42:09 -0400 > >> > >> --- a/lisp/startup.el > >> +++ b/lisp/startup.el > >> @@ -854,6 +854,10 @@ normal-top-level > >> ;; 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") > >> + ;; Likewise, subprocesses should not use a pager unless told > >> + ;; otherwise, since it generally won't work. > >> + (when (executable-find "cat") > >> + (setenv "PAGER" "cat")) > > > > We need to work on the comment, because it doesn't explain any of what > > it needs to. Worse, it says something very confusing and at least > > inaccurate. > > Could you just say what you'd prefer the comment to be? I'm not sure > what exactly you'd like it to explain. I don't have a clear enough idea; I hoped you did, since you initiated this change to begin with. I just know that the text you wrote cannot be it, because it didn't explain to me anything about the reasons we should be doing this. The comment should explain why PAGER=cat is a good idea to go with TERM=dumb, for example. Maybe begin by saying why Emacs needs to set the variable at all, why not leave it unset? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 15:23:58 2024 Received: (at 72426) by debbugs.gnu.org; 6 Aug 2024 19:23:58 +0000 Received: from localhost ([127.0.0.1]:33092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbPmn-0007SR-Iy for submit@debbugs.gnu.org; Tue, 06 Aug 2024 15:23:57 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:45333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbPml-0007SC-LZ for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 15:23:56 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <86o765o4gg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 06 Aug 2024 22:07:27 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> Date: Tue, 06 Aug 2024 15:23:25 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722972205; bh=5/Zko128byxUbvxidY6/33ykjde/8D2TwQYuPmJLkx8=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=eOYljSXuTJsVbA/JLi3ZBA1lIkB+8suNo70i/WIWL4FzWhGQnhTFE42AbTYeWFnxc ln/xpHUcl6UjhvOo42E6CHW8grpP/1G/cqlGSuyGSOOoYuidx4A5ohlycrOfqfgjWh 45/EC/j4JwLVud+I1vAvPz3BXl1dSxX8FmB+L1bH45Ve/dQDRgJJ3HrP+E83qO31aV tBG7JkJ3BBzfWu8c58+UU8VMV7Ja53dJ7uOakl/CmmlHsNtpUk0Th+oVezsi+k4Hi9 cRerfiCpNnLvNOUITTYq6oLthnOQEnDDW56k0Ms0Pj2pZVkH5DADDzAm0+qXbPUule aN0hNMixlndQQ== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org >> Date: Tue, 06 Aug 2024 14:49:45 -0400 >> >> Eli Zaretskii writes: >> >> >> From: Spencer Baugh >> >> Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org >> >> Date: Tue, 06 Aug 2024 12:42:09 -0400 >> >> >> >> --- a/lisp/startup.el >> >> +++ b/lisp/startup.el >> >> @@ -854,6 +854,10 @@ normal-top-level >> >> ;; 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") >> >> + ;; Likewise, subprocesses should not use a pager unless told >> >> + ;; otherwise, since it generally won't work. >> >> + (when (executable-find "cat") >> >> + (setenv "PAGER" "cat")) >> > >> > We need to work on the comment, because it doesn't explain any of what >> > it needs to. Worse, it says something very confusing and at least >> > inaccurate. >> >> Could you just say what you'd prefer the comment to be? I'm not sure >> what exactly you'd like it to explain. > > I don't have a clear enough idea; I hoped you did, since you initiated > this change to begin with. I just know that the text you wrote cannot > be it, because it didn't explain to me anything about the reasons we > should be doing this. The comment should explain why PAGER=cat is a > good idea to go with TERM=dumb, for example. Maybe begin by saying > why Emacs needs to set the variable at all, why not leave it unset? OK, how about this? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Stop-subprocesses-from-using-inherited-or-default-PA.patch >From b50a5ef015280a585330d4fcfc1265d65ce1dd88 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 6 Aug 2024 12:39:37 -0400 Subject: [PATCH] Stop subprocesses from using inherited or default PAGER At startup, set PAGER to cat so that any inherited or default value of PAGER does not affect subprocesses of Emacs. Pagers generally won't work when a subprocess runs under Emacs. A user can use comint-pager (or other customizations) to tell subprocesses to use a different specific pager. * lisp/startup.el (normal-top-level): Set PAGER to cat, if cat is available. (bug#72426) --- lisp/startup.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/startup.el b/lisp/startup.el index f18795ae6ac..738eec772ec 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -854,6 +854,12 @@ normal-top-level ;; 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") + ;; Similarly, a subprocess should not try to invoke a pager, as most + ;; pagers will fail in a dumb terminal. Many programs default to + ;; using "less" when PAGER is unset, so set PAGER to "cat"; using cat + ;; as a pager is equivalent to not using a pager at all. + (when (executable-find "cat") + (setenv "PAGER" "cat")) ;; Remove DISPLAY from the process-environment as well. This allows ;; `callproc.c' to give it a useful adaptive default which is either ;; the value of the `display' frame-parameter or the DISPLAY value -- 2.39.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 22:37:50 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 02:37:50 +0000 Received: from localhost ([127.0.0.1]:33408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbWYf-00025y-LE for submit@debbugs.gnu.org; Tue, 06 Aug 2024 22:37:50 -0400 Received: from mail-pl1-f170.google.com ([209.85.214.170]:42053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbWYd-00025i-2E for 72426@debbugs.gnu.org; Tue, 06 Aug 2024 22:37:48 -0400 Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1fc56fd4de1so3332235ad.0 for <72426@debbugs.gnu.org>; Tue, 06 Aug 2024 19:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722998176; x=1723602976; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=CTuIzHjBs6IL6nleHc83/3qvfhiJQRdAGZPtAH60NJ4=; b=arTPKIaa2RLSWfNpR5mAefJa5IossDSG16FsgsM14wNqW9K6BCBiIOFOqPkmheE4dz ONDIcyK1ilUaQq2oMkJCNLpIKHegOV7yLeK6ZspRXf8IkFk8SdV2be6VvXLZLeHkBjWc FzFFHCBDIUTdSQ/0j5NYh9ve+18ez3m2kiVd1vAok3Yb696yHUlWIyUmiGN2k3g7v7bN S2Lf7Whxs2R9//XuawrVS6N4Lgn9u9mUj6/lH2rhdqF73bgJsl3ISuWiUBehXu/Adt/g EQMI1U+qv35MoGa+AiZpLslw6DmuH3RZjyUHJgRJdABTNDImX73pRftt07Vqjn/O6ZtJ NfKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722998176; x=1723602976; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CTuIzHjBs6IL6nleHc83/3qvfhiJQRdAGZPtAH60NJ4=; b=MJpGFNqHid2XUnCAt0A/76I5TWxhujm50Wca66GjIk7YUd/ka10GWIx4EdZC9XZaW7 R+hrBm98w6lViVRH1hnohHUZeYskXqkE/LT/zt4A6U10SMTYr8EvSbyjP7awBFQuqq00 QPaFc8TeWUOOAWXI1FkCrATymrowTmqqgZzkDxjM6octyDD5QrckU2LLZ2z039p2GAUm jGUoAgx2i6mzVSoJNppXvj3qxccdvXvZLEJib18sqWS2gUXe2Smp4umvOxj1kLmGxLK3 L71Cf5x7DxvDHXo+lTXz7EtXsCQ6y6oXm6TcJDz+PtKUJYUJPE4NZx6V+5kUy2er+WFY ssKA== X-Gm-Message-State: AOJu0Yzh7wI4XVwS4aDAC/JKK4Od8UIxBd7HJ0v9OhBOZrCxcTduBBZ4 DaoiFkkxzmb+HEoDNqV62DNy1PWj9G/5I5llg6y4pUkv9i2uGNF2 X-Google-Smtp-Source: AGHT+IFZCD0hkVSumdK89XwogHkcW2dgZ91xEkcQnoVmAlV+jYj3CrGjw2Ecl2MAKiaxEpHb2lmjBA== X-Received: by 2002:a17:903:22c1:b0:1fd:7ff5:c673 with SMTP id d9443c01a7336-200853a50b2mr13426255ad.2.1722998175873; Tue, 06 Aug 2024 19:36:15 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1ff5905f85csm94655005ad.160.2024.08.06.19.36.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Aug 2024 19:36:15 -0700 (PDT) Message-ID: Date: Tue, 6 Aug 2024 19:36:15 -0700 MIME-Version: 1.0 Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Content-Language: en-US To: Spencer Baugh , Eli Zaretskii References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 8/6/2024 12:23 PM, Spencer Baugh wrote: > OK, how about this? [snip] > + ;; Similarly, a subprocess should not try to invoke a pager, as most > + ;; pagers will fail in a dumb terminal. Many programs default to > + ;; using "less" when PAGER is unset, so set PAGER to "cat"; using cat > + ;; as a pager is equivalent to not using a pager at all. > + (when (executable-find "cat") > + (setenv "PAGER" "cat")) This makes sense to me. Just to be extra-sure, I tried using 'async-shell-command' to run "git log" with PAGER unset, and sure enough it tried to use "less" for paging, which didn't go very well. "PAGER=cat" was much better. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 07:19:17 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 11:19:17 +0000 Received: from localhost ([127.0.0.1]:33821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbehI-0001o0-MY for submit@debbugs.gnu.org; Wed, 07 Aug 2024 07:19:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbehH-0001nm-8Q for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 07:19:15 -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 1sbegm-00005F-9y; Wed, 07 Aug 2024 07:18:44 -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=IjHIz2DAzwuNiv/hHNt44o9vvRG3q5HEDD/7upiCxz8=; b=UJky7ZQyAN5h oqFpTTTxJVpvdu08Tc9UFbWxnF9RWJ1Fm5zY4XqzX+cMHQYRnlhSAqcuH3gtQGqqLhctQrF+FbbYN /+GT4+2ECmUpYplLBnscNGyAmJSFWQYrgV0dUnRxGshLjH9QJ0wWoeRzeDi44clM+qf4I+M1Eo3rG yV12hdEDI4q/IYQLJxeZp9WaCVikcDK+3DyQHUjKpCFvxCBSUu8yDizSjyeKfn+F7D2cCAYJ1xzXU WEYOLGz4Yq14qSyD11DGEy9hxZFFKnMDH4CZboZ/T4TJo6uAsY0xaHGostR1sDHLKmZmu0DgCP5GZ uRBqjB5rIxxlGmC2cusYDw==; Date: Wed, 07 Aug 2024 14:18:38 +0300 Message-Id: <86frrgoa29.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 06 Aug 2024 15:23:25 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@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 (---) > From: Spencer Baugh > Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org > Date: Tue, 06 Aug 2024 15:23:25 -0400 > > > I don't have a clear enough idea; I hoped you did, since you initiated > > this change to begin with. I just know that the text you wrote cannot > > be it, because it didn't explain to me anything about the reasons we > > should be doing this. The comment should explain why PAGER=cat is a > > good idea to go with TERM=dumb, for example. Maybe begin by saying > > why Emacs needs to set the variable at all, why not leave it unset? > > OK, how about this? Much better, thanks. Do we care about platforms which don't have 'cat'? Also, is it true that this issue is only relevant to sub-processes that communicate via PTYs? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 07:52:01 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 11:52:01 +0000 Received: from localhost ([127.0.0.1]:33865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbfCy-0002v1-Th for submit@debbugs.gnu.org; Wed, 07 Aug 2024 07:52:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbfCx-0002ub-7Q for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 07:51:59 -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 1sbfCS-0004wc-4x; Wed, 07 Aug 2024 07:51:28 -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=BK9hqoQ4vjGelprNXkfht0dxz2orsawGFdm7dSW3K3U=; b=Up5lf+d4/p9x bBCJ6r0Ca3P6eRvKSWoHXUqo/0q/xn2TObcNPvUL6lJaWlxE7qw568660A41IDvgRf2fA+dD3Bxx8 WahI7CsU5InSgdzqrYyAT4+Xin3gC/JkhElshscLugzbS3q7asoLAtOJWl2I8lS+D6bYhHTKECQCN 6q92DKxg9V2BaIsJDtFQl+rW4lAfr+LF+NMmCQRnT1e3UoctYgbEaVEHxIk6NV4Z38F8Y5T2bv2vb +EcfT5gGKMpjqVwvKk18Tv+PqPS67njbkg5/IPSHq/6ZSGKv1c6jJA77HLvDB+2WM56vvOBo/gw+G CGLBt3UdtJxgCPxgrPRRnQ==; Date: Wed, 07 Aug 2024 14:51:24 +0300 Message-Id: <86bk24o8jn.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter In-Reply-To: (message from Jim Porter on Tue, 6 Aug 2024 19:36:15 -0700) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: sbaugh@janestreet.com, 72426@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 (---) > Date: Tue, 6 Aug 2024 19:36:15 -0700 > Cc: 72426@debbugs.gnu.org > From: Jim Porter > > Just to be extra-sure, I tried using 'async-shell-command' to run "git > log" with PAGER unset, and sure enough it tried to use "less" for > paging, which didn't go very well. "PAGER=cat" was much better. Did you try with process-connection-type nil? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 11:06:21 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 15:06:21 +0000 Received: from localhost ([127.0.0.1]:34908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbiF3-0001J4-7F for submit@debbugs.gnu.org; Wed, 07 Aug 2024 11:06:21 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:57041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbiF0-0001Io-QC for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 11:06:19 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <86bk24o8jn.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 07 Aug 2024 14:51:24 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> <86bk24o8jn.fsf@gnu.org> Date: Wed, 07 Aug 2024 11:05:47 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1723043148; bh=+onlbStnRjADStYozG9gratoGq2DCWDpI81tLC/hNto=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=FNSDRBLIDkh6X5HchFY7Gpk/W4g5zgl5wPe5RsvGv11L7vYUw0qFbpFSZ6gi9h2eP XWCx+QbCeaNP9l5P+8pZxASrIxx+bmEbxKogYfZSEEjVUK7kN7tuIE7FogLHJp6s3j 8a5L7rbp6FGJMVh3n7nMa1P9JrJnSE2BnHVV0wNXzCY27D2Via0kSITx99iczftg38 FSVO+6CXM8bnK0hoit6gz/kgvQ8N1xXpg4/hGb346qLOFgRVFqygcb+fSKUVXLlUu5 IjVSHrVnLw3fNIIdYarD9m0eexBis4j51GvKqlIjL/6Cm/Agjy54e6avzR8ndjdFFL LVR3QAyKRaMBw== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: Jim Porter , 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Date: Tue, 6 Aug 2024 19:36:15 -0700 >> Cc: 72426@debbugs.gnu.org >> From: Jim Porter >> >> Just to be extra-sure, I tried using 'async-shell-command' to run "git >> log" with PAGER unset, and sure enough it tried to use "less" for >> paging, which didn't go very well. "PAGER=cat" was much better. > > Did you try with process-connection-type nil? With process-connection-type nil, git will never run a pager (since like many programs it checks whether stdout is a terminal before doing so). So both: (let ((process-connection-type nil) (process-environment (cons '("PAGER" "less") process-environment))) (async-shell-command "git log")) and (let ((process-connection-type nil) (process-environment (cons "PAGER" process-environment))) (async-shell-command "git log")) behave identically. Setting PAGER=cat is only necessary for process-connection-type=t. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 11:09:50 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 15:09:50 +0000 Received: from localhost ([127.0.0.1]:34913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbiIQ-0001Vx-0V for submit@debbugs.gnu.org; Wed, 07 Aug 2024 11:09:50 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:58017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbiIO-0001Vi-9j for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 11:09:48 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <86frrgoa29.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 07 Aug 2024 14:18:38 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> <86frrgoa29.fsf@gnu.org> Date: Wed, 07 Aug 2024 11:09:17 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1723043357; bh=C7DNKVVqPxIAmnj06oBegtASRSysWUvXuJf7hYnficQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=dc3VsVx0beF5twqRDnghYZWqDGIXP+E+r9o8luHnhw8dn1CuahX4pL6zi9u7GU1y0 VMhloc/adllAITyvyMehomN8q3cvFHtyqsCdB+VK5I1reXkfjB6FKXytPEXZzpenM6 RmKOKycGLJeFasK9RFpzqQCLI1CJpuivFMoM4mH/xbe8eBaupsBoPGfJFBZnnfWzh7 5EAdRpSdKIUAPVjh9IxQW6QbALXm8CUY40HOP2R7EzZxHBBT9h43baiyFdQG5mveXh lAVQq4Pfyx4GA9ZQ63TYNKXW6VMR7mZq5wH4msbf2U5nERx4AW5yrwdAr6euIR7+Bd BdRTIuQuy3aHQ== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org >> Date: Tue, 06 Aug 2024 15:23:25 -0400 >> >> > I don't have a clear enough idea; I hoped you did, since you initiated >> > this change to begin with. I just know that the text you wrote cannot >> > be it, because it didn't explain to me anything about the reasons we >> > should be doing this. The comment should explain why PAGER=cat is a >> > good idea to go with TERM=dumb, for example. Maybe begin by saying >> > why Emacs needs to set the variable at all, why not leave it unset? >> >> OK, how about this? > > Much better, thanks. > > Do we care about platforms which don't have 'cat'? No - those platforms don't have less either, and don't respect PAGER. > Also, is it true that this issue is only relevant to sub-processes > that communicate via PTYs? Yes - that's also the case for the TERM environment variable; when communicating via a pipe, programs don't check TERM anyway. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 11:29:35 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 15:29:35 +0000 Received: from localhost ([127.0.0.1]:34926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbibX-00028s-8j for submit@debbugs.gnu.org; Wed, 07 Aug 2024 11:29:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbibU-00028Z-De for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 11:29:33 -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 1sbiYs-0003zL-0Y; Wed, 07 Aug 2024 11:26:50 -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=TKvUm0F3VIExYLE5FdaP8NvmKH606O5Q416jvYTcLsY=; b=NzWTwrRmZexP NreTGnhK3qxFfIwSpoVw08sQsHtUpeqofvPpiwry4E4EqGI1w9ZZ/zpUGrWGFPACrX+VKCdyvAi+x 4UeYEtXKBKwZnqR4AtHIEaENZOacp5I2TZ4l6k44Rj+pbJk56ReCAWfomW3QKaggGrzhWxle5uaYi Q+Hfnh1nLx5mw/jN4s19gPheNeIi6OxKlpe0v48qIE2Kaf2FKwn/RuK47cf0tkERRMAxai5K7Zy68 qaVzlWAREJ+Jmhrs7w8bz/cDcCdVFEZp71kQR8gFg0zChLgmvCgQp/2W+VShG3fhp/MmvxYEbCUk2 mJfnetx/Khnrhrd5ZSm8TQ==; Date: Wed, 07 Aug 2024 18:26:47 +0300 Message-Id: <86y158mk08.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Wed, 07 Aug 2024 11:05:47 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> <86bk24o8jn.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@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 (---) > From: Spencer Baugh > Cc: Jim Porter , 72426@debbugs.gnu.org > Date: Wed, 07 Aug 2024 11:05:47 -0400 > > Eli Zaretskii writes: > >> Date: Tue, 6 Aug 2024 19:36:15 -0700 > >> Cc: 72426@debbugs.gnu.org > >> From: Jim Porter > >> > >> Just to be extra-sure, I tried using 'async-shell-command' to run "git > >> log" with PAGER unset, and sure enough it tried to use "less" for > >> paging, which didn't go very well. "PAGER=cat" was much better. > > > > Did you try with process-connection-type nil? > > With process-connection-type nil, git will never run a pager (since like > many programs it checks whether stdout is a terminal before doing so). > > So both: > > (let ((process-connection-type nil) > (process-environment (cons '("PAGER" "less") process-environment))) > (async-shell-command "git log")) > > and > > (let ((process-connection-type nil) > (process-environment (cons "PAGER" process-environment))) > (async-shell-command "git log")) > > behave identically. > > Setting PAGER=cat is only necessary for process-connection-type=t. As expected. The problem is that a Lisp program could let-bind this variable around a call to async-shell-command (or some other similar API), in which case a setting in startup.el will not catch that. But maybe we don't care, since a program whose stdout is not a console device will ignore PAGER anyway. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 11:31:56 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 15:31:56 +0000 Received: from localhost ([127.0.0.1]:34935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbido-0002Fa-4R for submit@debbugs.gnu.org; Wed, 07 Aug 2024 11:31:56 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:55273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbidm-0002FJ-4O for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 11:31:54 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command In-Reply-To: <86y158mk08.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 07 Aug 2024 18:26:47 +0300") References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> <86bk24o8jn.fsf@gnu.org> <86y158mk08.fsf@gnu.org> Date: Wed, 07 Aug 2024 11:31:22 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1723044683; bh=Gy2+bxZDtRGSTJ/0r8RXLFN7HekX3OggPWXnMrQdiDk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=CB3GES9d1uOIfuTqhCiDq1U2MPcr8jz0NeriEdwKwSlh4UXjpxH3FrRMZrXYVRRay 2g5DkcfCD3M8arDK8v0VixuKt3crybWVi4UTlCy9XDVSxHCEH5zp4w781LxnXybFk8 7sy+UmtqUqNqGYwG14tYlsM3vck4LjzEXv4ApQI/1/WQS1sFHLc9k+8polBLMtRu56 8c5AWJUowkvSgCXPR54Y7vZwp2mid6bFL8XSw8w6u74a29M0b+utq4KYbpU6+aTL5m nDjeXxJKasbruSu+/aO5WFJ4++xgLigzc7pE8upPIFH6EWpJ94Q5ISOaxu4O63ocuo pFHaXSVFOXjMg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: Jim Porter , 72426@debbugs.gnu.org >> Date: Wed, 07 Aug 2024 11:05:47 -0400 >> >> Eli Zaretskii writes: >> >> Date: Tue, 6 Aug 2024 19:36:15 -0700 >> >> Cc: 72426@debbugs.gnu.org >> >> From: Jim Porter >> >> >> >> Just to be extra-sure, I tried using 'async-shell-command' to run "git >> >> log" with PAGER unset, and sure enough it tried to use "less" for >> >> paging, which didn't go very well. "PAGER=cat" was much better. >> > >> > Did you try with process-connection-type nil? >> >> With process-connection-type nil, git will never run a pager (since like >> many programs it checks whether stdout is a terminal before doing so). >> >> So both: >> >> (let ((process-connection-type nil) >> (process-environment (cons '("PAGER" "less") process-environment))) >> (async-shell-command "git log")) >> >> and >> >> (let ((process-connection-type nil) >> (process-environment (cons "PAGER" process-environment))) >> (async-shell-command "git log")) >> >> behave identically. >> >> Setting PAGER=cat is only necessary for process-connection-type=t. > > As expected. The problem is that a Lisp program could let-bind this > variable around a call to async-shell-command (or some other similar > API), in which case a setting in startup.el will not catch that. But > maybe we don't care, since a program whose stdout is not a console > device will ignore PAGER anyway. Yep - I think it's fine for the same reason it's fine to have TERM set by default, even though it's ignored by programs whose stdout is a pipe. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 12:09:45 2024 Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 16:09:45 +0000 Received: from localhost ([127.0.0.1]:35007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbjEP-0003Td-4i for submit@debbugs.gnu.org; Wed, 07 Aug 2024 12:09:45 -0400 Received: from mail-pf1-f170.google.com ([209.85.210.170]:48625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbjEN-0003TO-EJ for 72426@debbugs.gnu.org; Wed, 07 Aug 2024 12:09:44 -0400 Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-70cec4aa1e4so31712b3a.1 for <72426@debbugs.gnu.org>; Wed, 07 Aug 2024 09:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723046892; x=1723651692; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=GaiI1WqgnptNQOvzHCQa1tQIyG6fb7u/V3vSfMNVCdk=; b=UymMR6G8++rdr2m1oewMZvUL4HbQVX3kMgwgLzfnKBJzdSzvIgQLz7owDZwtH4V0rR EikPE54lvxbipX2IGDeXVOCYvYaVVdmDAHLjU3Fw3aWAOJDrcvdf6Vi/AfJQ6gpc7U+m 3VJ2cehLWBjtTs7wDaXlC+RGw0Z0k3kQNZV5CSye5sriE5Vn2n3iXw3SieQn9X8DzQDD o3W9VNXlNeZiTVx98rSxNg66YNiAf3qRtzv38a+KrkQ14YEcWmHfYmDb+bk9uoC/uHYl RE790duS3ss9jtk+UeUyM5xQa3JjBINr6Jjn/GJcmd9FMUT7kKlJyjLbNTpICKF7hOCb r9sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723046892; x=1723651692; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GaiI1WqgnptNQOvzHCQa1tQIyG6fb7u/V3vSfMNVCdk=; b=lWSGSpO3+iSKxewy9CLXAEwi0FOD4IcBS8spLFkUc2vfP7Mg9/kmi3e+HjwFX1A8w5 nRch7oMph3CKIZlyIQbd+RM4NWYdW4jjyOGxY72vmNWXuBEF20KNxKzQTcIQ8EItM7wn YVlbl9e8TXH/46RwIaYNlG4N18LjYRpsUATN4xh5dveDJpABoQgNDQZr7jdN/x5hU5Dd CDIz1OB/GL6xpfSlmtY3WgzyUq33Th7OzciS/KcC40i58EgG+8krG4X6UUsfNpkylhSM 7ADj00C7S6ORTkrWViuTe8GQxGD4Sp/oYs/NHckCw9/6uyGrFD/JHe1t6D1g0hzdXl2a RUOQ== X-Gm-Message-State: AOJu0YxCb9UtwlkXdGCbUmkBwzMHZM3hHnpvHdxbtAW0pVkbm7sfvsjU DaDA4gxyfiEcWanYlRgwC43NfqfPvhEsTertf+Us7m9nUO290+1S X-Google-Smtp-Source: AGHT+IExVAd71fbXWIcIbnLITzSwfNVNKg9FfnMalIokUHwnS/qopBmsuz5Jn7kLJWOPBlHKE31z5Q== X-Received: by 2002:a05:6a00:240f:b0:705:6a0a:de14 with SMTP id d2e1a72fcca58-7106cf8bf93mr23578743b3a.1.1723046892032; Wed, 07 Aug 2024 09:08:12 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-7106ecfd057sm8549267b3a.160.2024.08.07.09.08.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Aug 2024 09:08:11 -0700 (PDT) Message-ID: <54634c92-f7d2-e242-95fe-bc8db7c5f820@gmail.com> Date: Wed, 7 Aug 2024 09:08:12 -0700 MIME-Version: 1.0 Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Content-Language: en-US To: Spencer Baugh , Eli Zaretskii References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> <86bk24o8jn.fsf@gnu.org> <86y158mk08.fsf@gnu.org> From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 8/7/2024 8:31 AM, Spencer Baugh wrote: > Eli Zaretskii writes: > >> As expected. The problem is that a Lisp program could let-bind this >> variable around a call to async-shell-command (or some other similar >> API), in which case a setting in startup.el will not catch that. But >> maybe we don't care, since a program whose stdout is not a console >> device will ignore PAGER anyway. > > Yep - I think it's fine for the same reason it's fine to have TERM set > by default, even though it's ignored by programs whose stdout is a pipe. Git, at least, ignores PAGER entirely when stdout isn't a PTY. (I tested by setting PAGER to "rev" and trying with and without a PTY. I get reversed lines with a PTY, but everything is non-reversed without.) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 05:26:17 2024 Received: (at 72426-done) by debbugs.gnu.org; 17 Aug 2024 09:26:17 +0000 Received: from localhost ([127.0.0.1]:53487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfFhR-0002Sn-HY for submit@debbugs.gnu.org; Sat, 17 Aug 2024 05:26:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfFhP-0002Sa-Or for 72426-done@debbugs.gnu.org; Sat, 17 Aug 2024 05:26: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 1sfFgg-00045R-3N; Sat, 17 Aug 2024 05:25:30 -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=uOf6e8xYZ1Cgi7D4pN+CxdYa0It7qJPwHAw2l+/g2fc=; b=acOnMIudYqsW wZgx/pEMgXj7RqvpxASba7hUdltPYHD7Q7eqKdvGsac0gmh0pm9wzyuD9UBlmD7vPIsSSwXgD5wMA rIJ7oL9Z0jRM3B4O3GhpJ5WBBEPGI/amvBdyEEMcu6Ev45yo/cC9drjIM+60sMNBYzPgNlHU4uaa7 Gfps+SS/1CYm2MIRdhLsfEB616p1Xmg4fDMp9lDQRxDBr2p0CyJlSjTXyqslQM9I3Zb+QwKk6RQGO tmaYnp8a+mfB0cu57jAUVtq0nVedfm6AkvPVSjwxXKFl41dKV2DiNfZqvykWzBKWvv8VixyYeNC7d GZFDW3+wg2A5FtCXwgRhtQ==; Date: Sat, 17 Aug 2024 12:25:25 +0300 Message-Id: <8634n34i2i.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 06 Aug 2024 15:23:25 -0400) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> <8634nhps4t.fsf@gnu.org> <86v80do795.fsf@gnu.org> <86o765o4gg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426-done Cc: jporterbugs@gmail.com, 72426-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 (---) > From: Spencer Baugh > Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org > Date: Tue, 06 Aug 2024 15:23:25 -0400 > > >> Could you just say what you'd prefer the comment to be? I'm not sure > >> what exactly you'd like it to explain. > > > > I don't have a clear enough idea; I hoped you did, since you initiated > > this change to begin with. I just know that the text you wrote cannot > > be it, because it didn't explain to me anything about the reasons we > > should be doing this. The comment should explain why PAGER=cat is a > > good idea to go with TERM=dumb, for example. Maybe begin by saying > > why Emacs needs to set the variable at all, why not leave it unset? > > OK, how about this? Thanks, installed on master, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 21:17:31 2024 Received: (at 72426) by debbugs.gnu.org; 13 Sep 2024 01:17:31 +0000 Received: from localhost ([127.0.0.1]:42127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1souwE-000731-TZ for submit@debbugs.gnu.org; Thu, 12 Sep 2024 21:17:31 -0400 Received: from fhigh7-smtp.messagingengine.com ([103.168.172.158]:56943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1souwC-00072h-Dy for 72426@debbugs.gnu.org; Thu, 12 Sep 2024 21:17:29 -0400 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 70D1A11400A9; Thu, 12 Sep 2024 21:17:14 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Thu, 12 Sep 2024 21:17:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1726190234; x=1726276634; bh=UJGo9gj71oEsWfU0B/0hlYMdqn2cwq7ugR6reOCoZL4=; b= GpAIZUT4aVgN1J10i76JXNyOd0AzX/OxeDL/VBFcYOZOfWRc77vD2MyMsn/Foybl TYeNNJyn/hKuPJ4oQAca/AANdoD++50qhOMA+/dhaM0StkFzAKpeCIK+TZd79zr+ L3bikYw/bTXaLCt2wiyk6nLJGlCbICB7PLmBVaJqPcDWfuy2e3//fXP4zARxNNo7 GTKi+sDZ1vOxp9rAWbdmLDlpJ1HImmRGxiUF+i8xnSO2WWP8t5QKdRxN/lyO2qvL P4teGvjMNa5E+ESj7Rdo4/JQtORRlqPOQV/pKc0ojFvIk7c5e8fRp7c8GInmhk/S 6enkQM8xPPDXz8US8E/IWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1726190234; x= 1726276634; bh=UJGo9gj71oEsWfU0B/0hlYMdqn2cwq7ugR6reOCoZL4=; b=F AFPrYuwfWgeaTZOXtXaPuPvSJS9ChynZDguVMNr9ZOBEYNJ7snaM7Ld+vVwuSCm6 Cs54i84ygAw2pIhZ6Y0Ug62MRuU3REMJEeH8J/3BTH+51xEaTic2bhUEGzCqpSM8 s3ytg8OotILS391JUF3xFuB7TTsmPcyl/T3LsvJM6FgrUVNjOzOF0Ty87igCRcXe We2z6xhUj8ogSFCDFoHUo0J/zPoMeov4sPrvVS2gCZUIb7UtlwMqR4SHeUjTRj7Z 5IasGo1J4S9hPbj8QXrzvl7ty8MB1Le7BRxKlUWEq45D0ZjeVzqOj4BdVu+CTn0C sdOwfHCCIH2S+Yar7pw2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejgedggeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh dprhgtphhtthhopehssggruhhghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtghpthht ohepjedvgedvieesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Sep 2024 21:17:12 -0400 (EDT) Message-ID: Date: Fri, 13 Sep 2024 04:17:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command To: Eli Zaretskii , Spencer Baugh References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86bk29vcof.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72426 Cc: 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 03/08/2024 18:38, Eli Zaretskii wrote: >> 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. FWIW async-shell-command's behavior is affected by a bunch of other comint-* variables as well because it uses a major mode which inherits from comint-mode (previously it was shell-mode, now shell-command-mode, but that aspect didn't change). From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 02:11:25 2024 Received: (at 72426) by debbugs.gnu.org; 13 Sep 2024 06:11:25 +0000 Received: from localhost ([127.0.0.1]:42227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sozWe-0006ce-Ul for submit@debbugs.gnu.org; Fri, 13 Sep 2024 02:11:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sozWc-0006cJ-9C for 72426@debbugs.gnu.org; Fri, 13 Sep 2024 02:11: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 1sozUG-0006kQ-4H; Fri, 13 Sep 2024 02:08:57 -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=pUtFn/5FF9kuIx5Q9+8w2YJSt5oMcvXmjeJAhU8Mc6k=; b=lDgALO4y7jNt HBmOASZKsReBDBR0FGGp8qD7YOF+WS0vyBCdb/p8Ir7TtOxxw5LWY8+NNQ0CQSC3L5E4I8Bjz3pXk as2hPXz6mnDPhtLa7MVTIHIAJU+AkRYRLJBggbhmSV+ejPwTCr+JYCnMSGiEBUwUVstUWIJ2VYViM PedchCmqOdLOCPBpmfiflrwJRhULC66XK7utWPRYHAbydKrBD5RbRhtGYvgCQkaahNShSTuGb4bHS S3oWZgfmy4c+zLwflxHs8v/tZS+uJUj1Me/20/KOOeebbEeqR80kH/Ax6wU6wWN1SMFyFriYukhN7 BhozY4uj4HL1u4GggtYi8g==; Date: Fri, 13 Sep 2024 09:08:54 +0300 Message-Id: <86zfocjdah.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Fri, 13 Sep 2024 04:17:11 +0300) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: sbaugh@janestreet.com, 72426@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 (---) > Date: Fri, 13 Sep 2024 04:17:11 +0300 > Cc: 72426@debbugs.gnu.org > From: Dmitry Gutov > > On 03/08/2024 18:38, Eli Zaretskii wrote: > >> 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. > > FWIW async-shell-command's behavior is affected by a bunch of other > comint-* variables as well because it uses a major mode which inherits > from comint-mode (previously it was shell-mode, now shell-command-mode, > but that aspect didn't change). Yes, and that is baaad! From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 19:45:22 2024 Received: (at 72426) by debbugs.gnu.org; 13 Sep 2024 23:45:22 +0000 Received: from localhost ([127.0.0.1]:44438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spFyb-0001fm-Iu for submit@debbugs.gnu.org; Fri, 13 Sep 2024 19:45:21 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:34197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spFyZ-0001Za-LW for 72426@debbugs.gnu.org; Fri, 13 Sep 2024 19:45:20 -0400 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 4FED613801F4; Fri, 13 Sep 2024 19:45:04 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 13 Sep 2024 19:45:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1726271104; x=1726357504; bh=PQP2E+GuWlfc2HjOjHYaEJSCMOMvO0Yq4o6nkKM9uFo=; b= TrZ+IPUEV2bqtXdqTZlMSBot4QLHeejf9idpwdXi4NxzqTk9J27vgiiXNyqBdSkE jwz6YgP9Pw2klNwAGqBr810vldixHMjigNVez5En84yPnfR01IxMn0Z6Qj2JsGvQ lqQv2yFvNov5hIy3ZWXpBsvh7ShPi0yR5UrDt1+eLp7xiKslHmM5sI/NBrVA+pdC SWEJJrZwPAJVczxjxwO3GV9MJX3rFVjDz3zSMjjBYjTvAZlYMvoZfCL8B8wHzIa4 R74gIvcTIacgFXQk4tIbzDlFUlXvhtHS+XG1yFjnXIMqCvp1f2Lzxlb4S0+xf5H6 GRCuXGXcUxlXWsGXXW6GnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1726271104; x= 1726357504; bh=PQP2E+GuWlfc2HjOjHYaEJSCMOMvO0Yq4o6nkKM9uFo=; b=J CsFBAKlBtiYDPbYcjzJ/GvZ7GXd8Z0iXSatELYdNIuGox5y7Sg3az5fY17bj1iY2 VDcTyS/wn8aAd/Js7bnyJF6XOCuz+m85B0BdsdAxsYYVsXxe1eLNT/vYNgcSlN1M vdS/tfx2WyoZEFn7NtG11mrESZQf5W2wJtXIyPOnwHRWYa6tA6Qu+KWCA0B2FwGd 5eEb4JlRMByr8xtiBa8i8ekz2VBhIMdmQx0KWNydReqsJS1i1MjgOzPH09yCFUmY H3VVh3+z8DG/fku3pPduakrTHQPHjEb1CWBSSEquPCbvpdSlFUbM3skaPjD/73bW f3f/agtFf7eV5tXru6WTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejledgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh dprhgtphhtthhopehssggruhhghhesjhgrnhgvshhtrhgvvghtrdgtohhmpdhrtghpthht ohepjedvgedvieesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 13 Sep 2024 19:45:02 -0400 (EDT) Message-ID: Date: Sat, 14 Sep 2024 02:45:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command To: Eli Zaretskii References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <86zfocjdah.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86zfocjdah.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72426 Cc: sbaugh@janestreet.com, 72426@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 13/09/2024 09:08, Eli Zaretskii wrote: >> FWIW async-shell-command's behavior is affected by a bunch of other >> comint-* variables as well because it uses a major mode which inherits >> from comint-mode (previously it was shell-mode, now shell-command-mode, >> but that aspect didn't change). > Yes, and that is baaad! It might be non-obvious, but I don't see how else it would work: comint is the only built-in subsystem we have that implement a general read-evel-print-loop. So we have 'M-x shell' and 'M-x ielm', for example, both using it as well (not to mention inf-python, inf-ruby, etc). And since we wanted, apparently, to have async-shell-command support user input (the command can be 'sh', for example), it uses parts of comint for its work too (comint-output-filter and the major mode with all its local bindings -- not sure if something else too, but this is already a lot). An alternative would be to have separate user options for each of the above features which would bind comint's options under the cover. But that's not very economical. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 02:28:10 2024 Received: (at 72426) by debbugs.gnu.org; 14 Sep 2024 06:28:10 +0000 Received: from localhost ([127.0.0.1]:44556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spMGQ-0007GR-0j for submit@debbugs.gnu.org; Sat, 14 Sep 2024 02:28:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spMGO-0007GC-KG for 72426@debbugs.gnu.org; Sat, 14 Sep 2024 02:28:09 -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 1spMG7-0002PP-Ae; Sat, 14 Sep 2024 02:27:52 -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=J+g/DN7eRzwioYnnCzpfph88BPFYTY9z1iTUaSm6AVg=; b=dahQBvXE29d2 Ano3m6Ro2w7TkKIYKAOAyZcQeGC2xEIK9CShlhaX+ge6cToWReFS3a7tp0X1ld1TJSFhrPYpY1nNw 82y4zZ7oQpQER5Jxcdz3TW299yoZgdJ+qTkufafTwXtFg0Qry7CqVqipqDtSHhINp74YNyFxglDq6 BLcuE2bDwIy2+S3bW5a7/7NU4qX2IR9an53tmJi2sBkLmB25cZxu5sdmAcL+tWS9CGc9tRmkT0ugB YG4/Rmawt6/uRp+l1YsUTlqlVEdNWS2PUrvTznD/oalPD4lFMlJdeX0bMqDMxUZTTWazbExbHNLG+ 6y7t76g2SCgt84IsXV03/w==; Date: Sat, 14 Sep 2024 09:27:46 +0300 Message-Id: <86wmjeiwbh.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Sat, 14 Sep 2024 02:45:00 +0300) Subject: Re: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> <86zfocjdah.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72426 Cc: sbaugh@janestreet.com, 72426@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 (---) > Date: Sat, 14 Sep 2024 02:45:00 +0300 > Cc: sbaugh@janestreet.com, 72426@debbugs.gnu.org > From: Dmitry Gutov > > On 13/09/2024 09:08, Eli Zaretskii wrote: > >> FWIW async-shell-command's behavior is affected by a bunch of other > >> comint-* variables as well because it uses a major mode which inherits > >> from comint-mode (previously it was shell-mode, now shell-command-mode, > >> but that aspect didn't change). > > Yes, and that is baaad! > > It might be non-obvious, but I don't see how else it would work: comint > is the only built-in subsystem we have that implement a general > read-evel-print-loop. So we have 'M-x shell' and 'M-x ielm', for > example, both using it as well (not to mention inf-python, inf-ruby, etc). Very simply: such options should be specific to applications (shell-command, inf-python, etc.), not to comint. Comint should have _variables_ that applications could bind depending on the application-level user options. > An alternative would be to have separate user options for each of the > above features which would bind comint's options under the cover. Exactly! > But that's not very economical. I don't see why. It would certainly be much cleaner and more flexible: users could have different behaviors in different callers of comint. But all of this is academical at this point, so why are we still arguing? From unknown Mon Jun 16 23:47:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 12 Oct 2024 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator