From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Date: Fri, 02 Aug 2024 14:39:41 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4165"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 72426@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 02 20:40:54 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sZxCu-0000nL-Aw for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Aug 2024 20:40:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZxCn-0008Sy-49; Fri, 02 Aug 2024 14:40:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZxCl-0008Sh-RZ for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 14:40:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZxCl-0007AL-I8 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 14:40:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=IosTL35D243TRNBNgzyFp/52pdNegxItBYVPkATHK+Y=; b=jfUdapYk/am42ygM1XmGSITIs7ARUjVGRZJVkzGkjrO9AujqXoi3kwQb6r9+gsr+s8nFokyPqK1A/IT2u23DXBEdfzJidIA9JryyXZBW4oN8192CorF0j3b8caXnxm5xjLY5P6hGwnnGg3kaa720nks6LyRyQUCg126XJaW7KVywhJyaB5dtxXjwQbgpETcGXJdkCswV+vbdJ+4mXBzbq2ijwEWAYDgDW6H+jl6GUPVRjvThzPNphq0Atyj3IQJAd1yc354fwXYxvuXBVwja7rW3lxQ4Np0mXlz+Ewl42tkCeTIuTj0it4BuVYIeOfwXSbudWwvQ10BA2JEtCOHZ9A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZxD4-0000hC-2R for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 14:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2024 18:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72426 X-GNU-PR-Package: emacs Original-Received: via spool by 72426-submit@debbugs.gnu.org id=B72426.17226240072559 (code B ref 72426); Fri, 02 Aug 2024 18:41:02 +0000 Original-Received: (at 72426) by debbugs.gnu.org; 2 Aug 2024 18:40:07 +0000 Original-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 Original-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 In-Reply-To: (Spencer Baugh's message of "Fri, 02 Aug 2024 14:35:25 -0400") 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289649 Archived-At: --=-=-= 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 --=-=-=--