From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71049: async-shell-command ends with "Process *Async Shell Command* finished" when remote "direct-async-process" Date: Wed, 29 May 2024 04:59:43 +0300 Message-ID: <7989cd21-7808-4416-ab0a-92e5da869a36@gutov.dev> References: <3a497741-2ad0-4919-b7c9-cdb36b0eb455@gutov.dev> <8734q7h35d.fsf@gmx.de> <87ttinfgoa.fsf@gmx.de> <861q5r2ric.fsf@gnu.org> <87o78vf9l2.fsf@gmx.de> <86sey711m6.fsf@gnu.org> <221919a1-950e-4ef3-975d-f86078d8e105@gutov.dev> <87wmnidv3u.fsf@gmx.de> <25dad14a-397c-4052-908c-121e40bbef51@gutov.dev> <877cfhubyd.fsf@gmx.de> <608acf89-a1f9-4151-9f53-99962af87688@gutov.dev> <87jzjhvnbw.fsf@gmx.de> <50900208-34b8-4b7c-90fc-8796da6bccd6@gutov.dev> <87cyp9vlb1.fsf@gmx.de> <87fru4u06a.fsf@gmx.de> 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="30356"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , 71049@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 29 04:01:13 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 1sC8cq-0007gY-LB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 May 2024 04:01:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sC8cY-0000qT-SL; Tue, 28 May 2024 22:00:54 -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 1sC8cX-0000qB-EQ for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 22:00:53 -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 1sC8cX-0005Nd-6V for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 22:00:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sC8cg-0007E3-FR for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 22:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 May 2024 02:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71049 X-GNU-PR-Package: emacs Original-Received: via spool by 71049-submit@debbugs.gnu.org id=B71049.171694800427587 (code B ref 71049); Wed, 29 May 2024 02:01:02 +0000 Original-Received: (at 71049) by debbugs.gnu.org; 29 May 2024 02:00:04 +0000 Original-Received: from localhost ([127.0.0.1]:39751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sC8bj-0007Ar-Nl for submit@debbugs.gnu.org; Tue, 28 May 2024 22:00:04 -0400 Original-Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]:47875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sC8bh-00079l-Ge for 71049@debbugs.gnu.org; Tue, 28 May 2024 22:00:02 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.west.internal (Postfix) with ESMTP id 33372180016D; Tue, 28 May 2024 21:59:46 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 28 May 2024 21:59:46 -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=1716947985; x=1717034385; bh=xbL33gThNqT1cnrv5xZEIMgqvcUYZ2rJeVbZsWTkdr0=; b= kAIG4rfSveNNeEHfrUg4TPqmFMpIl+bkM9m6GogA/3IMaN/0qs0xNTIs+7ywmDvt TS6jYFMlBfeCYhsp1JRfcfUqLEDnM8NN7Q6AbiiE3ji+B0yNj9EoqH4siq+hezNh 4ggFma5m5Q2bquVvIvSRe7WN3JtCnH0uzokKLweLJMI9hLoTlDnv9MS9/KNPvK4Z seVe8kufpeOb9k9IOhYOapPKCG66xriqCX6T0SPgVFidRXeDwZWHY8fZvfk6atIM PfabSZva8LClqcu5Ys32A78ri7g6jzYNDqRJagXu11zLx0DBOXw38PlRoZHJaNvl vANrA9ebB1BfwkUsjorBkg== 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=1716947985; x= 1717034385; bh=xbL33gThNqT1cnrv5xZEIMgqvcUYZ2rJeVbZsWTkdr0=; b=T fSRJ/NqefMbIrG41pTTYuNQFS4jC73LsGC/TB+JCVhg3qOi2R5q7201zTzNHZHQ1 PhlTe381N0DumEUhZjHxFtRAmGw5RZTeVbejv8RP2kfpQjSLP8XVmngxxa/s+OC2 P8Ti52mvkJB3hLkKukqk63Q6WecdyIgNI0kwtlzi0/OkG5TQOrlUfFc4tHPxVmRf K1f0Hb5EoYoC13jcuWnRUIrsh/PYJEdSvrMumuxpGLxHn0dKWRPgefGlm9bjSHn5 jjNcHfE576xcHTVoPvjD44kHQmEsnRUNKl3gxodbUQzSJ0Xngo6yCbOt/+/qir56 AwGkdG/DwCSbelT+vPKaA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejledgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 May 2024 21:59:44 -0400 (EDT) Content-Language: en-US In-Reply-To: <87fru4u06a.fsf@gmx.de> 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:286137 Archived-At: Hi Michael, On 26/05/2024 17:18, Michael Albinus wrote: >>> So it seems to me that fixing shell-mode would be good for the default >>> behavior, and then one could use tramp-histfile-override to add extra >>> performance on top. >> >> I'll see whether I could make it more fine-grained, for example by >> distinguishing the shell and shell-command cases. > > I've puzzled the appended patch together. It does the following: > > - Obey 'tramp-histfile-override' also for direct async processes. Thank you. > - Use 'tramp-histfile-override' in 'shell-mode', whether the remote > history file shall be read. A value of t suppresses this. > > - Support connection-local setting of 'tramp-histfile-override' in > 'shell'. Use something like > > --8<---------------cut here---------------start------------->8--- > (connection-local-set-profile-variables > 'remote-tramp-histfile-override '((tramp-histfile-override . nil))) > > (connection-local-set-profiles > '(:application tramp :machine "remotehost") > 'remote-tramp-histfile-override) > --8<---------------cut here---------------end--------------->8--- > > - Support connection-local setting of 'tramp-histfile-override' in > 'shell-command'. In order to distinguish this from the setting for > 'shell', another :application is used ('shell-command' instead of > 'tramp'). Use something like > > --8<---------------cut here---------------start------------->8--- > (connection-local-set-profile-variables > 'another-tramp-histfile-override '((tramp-histfile-override . t))) > > (connection-local-set-profiles > '(:application shell-command :machine "remotehost") > 'another-tramp-histfile-override) > --8<---------------cut here---------------end--------------->8--- > > It is recommended to set 'tramp-histfile-override' to t for > asynchronous processes. Comments? It seems like more work, and more code, to get to the same result. Also, it would not get the OOtB improvement for the "not M-x shell" case - IIUC the user would have to create a new profile to enact the distinction. That's a relatively complex thing to do. So... it's not up to me, and the problem doesn't touch me too deeply, but I think my solution for the second part is preferable. Maybe Eli will want to make that choice now. Thanks, Dmitry