From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Date: Wed, 07 Aug 2024 18:26:47 +0300 Message-ID: <86y158mk08.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4696"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, 72426@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 07 17:30:04 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 1sbiby-00012j-AC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Aug 2024 17:30:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbibb-0005IY-L7; Wed, 07 Aug 2024 11:29:39 -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 1sbibZ-0005I4-IB for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 11:29:37 -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 1sbibZ-0004N7-9G for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 11:29:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=TKvUm0F3VIExYLE5FdaP8NvmKH606O5Q416jvYTcLsY=; b=GyPeuexuT2kKUQPllj0lhgD8/yidoCIvutilgMDaBziuN9T+Bdy5WIuVyzgeqVXp6thNRM5CFh7ySLBhjEUY1VhUsuCHKSPkcp6WAvVPJmmUW4DApOLenqfhjK6dWIbn136KvO5ih8JfXkcR42LTYiC5rqAo+h616IbJQ1/wQVliJpggnB5oobNF3yy8/ieiXmaIpGaGZ4ZcVBeWMNi+bd5QOLs1O3HctwMjIXRV+1yNSAUo6vTdYLwtUi22OkXiQSlNXIyTEwxUR4euAAUCIfm0UaHSaIPKTqZ3F442R/4X+vtohHmcrZsnZwWB2Bxfc+XV7VOERNnI8WX52R86Gw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sbiby-0002AF-8Q for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 11:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Aug 2024 15:30: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.17230445758242 (code B ref 72426); Wed, 07 Aug 2024 15:30:02 +0000 Original-Received: (at 72426) by debbugs.gnu.org; 7 Aug 2024 15:29:35 +0000 Original-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 Original-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 Original-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==; In-Reply-To: (message from Spencer Baugh on Wed, 07 Aug 2024 11:05:47 -0400) 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:289895 Archived-At: > 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.