From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command Date: Sat, 3 Aug 2024 11:38:35 -0700 Message-ID: <26b6e3e6-7eee-686d-013b-0fc02c4125fe@gmail.com> References: <86sevmupgo.fsf@gnu.org> <86bk29vcof.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5248"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72426@debbugs.gnu.org To: Eli Zaretskii , Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 03 20:41:17 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 1saJgq-0001CY-VA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Aug 2024 20:41:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saJgV-00076Q-R7; Sat, 03 Aug 2024 14:40:55 -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 1saJgL-00075k-4c for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2024 14:40:46 -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 1saJgI-0006oS-Hp for bug-gnu-emacs@gnu.org; Sat, 03 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=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=MY+6rp5RpBxa3sGsYI7ci4IXiHsWHVKrTD2XVGPQMX8=; b=rixXtFb8FUR0pNI9fHakbPxo1CManh3cEstdjbRB98V1/2FjIJrSAuZuXIbyvnF9BBBKaqLdw/p81EqSnU27m5gJYP9DylSTDQEhSVyHCENuvyLH5pyBV/isy2/cJW8CSdnSHgeRxBZ+yR7nJ8b98FxxzJqTo9xE7lTBUbFKxuUALRu0WNjy5GZizkBj9bWfQRyfyiJF9nYhaPZGpubvGO5R591tmyS6fv0K/Ss00bssyBe+glZiTpq50BmoQ9WRv++0pC2Ivc3kIZ2RjaXfZU/mtYTSgysIDWnjJqWKAckU0NigYB2a63ScKzUJM8LYYqmTvAMKMXcOe3Tqk/NPcA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1saJgc-0008SR-Gv for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2024 14:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 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.172271040332333 (code B ref 72426); Sat, 03 Aug 2024 18:41:02 +0000 Original-Received: (at 72426) by debbugs.gnu.org; 3 Aug 2024 18:40:03 +0000 Original-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 Original-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 Original-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) Original-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) Content-Language: en-US In-Reply-To: <86bk29vcof.fsf@gnu.org> 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:289693 Archived-At: 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.