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: Fri, 31 May 2024 03:24:49 +0300 Message-ID: <9685d486-46fe-4947-8bb2-fb436f09048b@gutov.dev> References: <3a497741-2ad0-4919-b7c9-cdb36b0eb455@gutov.dev> <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> <7989cd21-7808-4416-ab0a-92e5da869a36@gutov.dev> <861q5ku956.fsf@gnu.org> <86wmncss4i.fsf@gnu.org> <0ebb5a51-8634-4f65-a384-79f82592e339@gutov.dev> <87h6egecqn.fsf@gmx.de> <727a50c7-0e50-429e-9f9a-78b5b29ff405@gutov.dev> <875xuwea52.fsf@gmx.de> <87jzjbr8ek.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------Gh4v0NRHA8JJMAwembPrYihI" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26296"; 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 Fri May 31 02:26:21 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 1sCq68-0006fY-9L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 May 2024 02:26:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCq5k-00071Z-Ia; Thu, 30 May 2024 20:25:56 -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 1sCq5h-00071F-UZ for bug-gnu-emacs@gnu.org; Thu, 30 May 2024 20:25: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 1sCq5g-0003t2-As for bug-gnu-emacs@gnu.org; Thu, 30 May 2024 20:25:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sCq5q-0006pW-Kp for bug-gnu-emacs@gnu.org; Thu, 30 May 2024 20:26: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: Fri, 31 May 2024 00:26: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.171711511626203 (code B ref 71049); Fri, 31 May 2024 00:26:02 +0000 Original-Received: (at 71049) by debbugs.gnu.org; 31 May 2024 00:25:16 +0000 Original-Received: from localhost ([127.0.0.1]:52853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCq56-0006oZ-4E for submit@debbugs.gnu.org; Thu, 30 May 2024 20:25:16 -0400 Original-Received: from wfout2-smtp.messagingengine.com ([64.147.123.145]:52203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCq50-0006oF-Sl for 71049@debbugs.gnu.org; Thu, 30 May 2024 20:25:14 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 1E30E1C000FE; Thu, 30 May 2024 20:24:54 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 30 May 2024 20:24:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc: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=1717115093; x=1717201493; bh=dL6FqUqjHL eHZb7qHQoIpLVsWY7aSlCTpwrbN78YN6w=; b=OIYT14CflrLTVRbJHLcGC03gUg xZ0RT7K778DZmg3mShi/jU/Yv6pUFmN3fO16VnfCmlae5OpcPBtXDliPxExAdQWn qsJP1rwOitDoGHX9xShuVOpwNhNmP1aIy3gxwnfCc8aPpKOAEZ/npUOY6LTpA6ZW YYnszfRBW98uzYZsK/d6AYVshq5oAVWJDk19FIQnEZ0OAgSFSfqVS6L9cd1UVSg1 4mY+m9F+LUOCGlAsyFeEooYWJwjaqFAprAJYdLNDBmpzAidGWrIqZAg3Qy/MjgAA /Jsif7Eap98EqqfZMT9392YPwW3BcWJoTUDDp+7ftlkSIcUdqV3nQx+9TwNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1717115093; x=1717201493; bh=dL6FqUqjHLeHZb7qHQoIpLVsWY7a SlCTpwrbN78YN6w=; b=COUQrspp/FidmJAqmetA9MNXSQlM/IiYk/gMYs+sIWr/ vdQIAtwW3i4D8Pf9mF65tJO3IXufqZysKhZUJ6nFQPb6RyraUWyRJ2WEaS0eXEeJ Ru2aUc8eZ0TSgWHzo+nbex4vu/4jbL6tI75bmKqfMmRrHlsKTozZyVmDPpajYjf0 N+AV7KUyv4JRKqXDsx576Bih9FhO+9C1RXKOR//sI5SyDLMJ5xEB5y5EKQS4YCNj G5BRdDuECSwyw0xky6Ckury7R3R9h/NDQBvhQpLoj8oPICQLKK9TWCrsChjagVf1 dlTLHwdtHkxaW3PUrq+VBi0nY/Y7QgErecPk5mOyZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfgfuvfevfhfhjgesmhdtreertddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeehleefudekudduveekieelgfeiffdvkefhkeeljeeujeegueekveffkeejjeev heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 May 2024 20:24:52 -0400 (EDT) Content-Language: en-US In-Reply-To: <87jzjbr8ek.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:286249 Archived-At: This is a multi-part message in MIME format. --------------Gh4v0NRHA8JJMAwembPrYihI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michael, On 30/05/2024 11:49, Michael Albinus wrote: >> Thank you. I haven't tested this personally either, but it seems like >> this is the behavior we will want by default. >> >> So the proposed solution should include it, I think. > In order to not misunderstand: you agree the solution based on > tramp-histfile-override now, don't you? Just to be frank: I don't like the approach, but I do think it's better than the status quo. In that sense, I agree with it, if none other is accepted. But, well, in the meantime I came up with a couple of new solutions: 1) [first patch] We can add a new major mode, for 'M-&' to use instead of the full-blown 'shell-mode' - it could be very simple: just apply font-lock keywords and maybe set list-buffers-directory. Problems? I suppose someone might be using shell-mode-hook to do something in the async-shell-command output buffer, and it won't fire anymore. Seemingly very minor concern. 2) [second patch] async-shell-command could set shell--start-prog (it's permanent-local) to `none', and then shell-mode will check for that value, and if set to this value, skip the input ring setup. Downsides? Pretty ad-hoc approach. And any external code looking up this (private) variable could be surprised by the new value. --------------Gh4v0NRHA8JJMAwembPrYihI Content-Type: text/x-patch; charset=UTF-8; name="shell-command-mode.diff" Content-Disposition: attachment; filename="shell-command-mode.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvbmV0L3RyYW1wLmVsIGIvbGlzcC9uZXQvdHJhbXAuZWwKaW5k ZXggOTM4NWIwMjMzOTIuLmYwYzY0YTdhOTBmIDEwMDY0NAotLS0gYS9saXNwL25ldC90cmFt cC5lbAorKysgYi9saXNwL25ldC90cmFtcC5lbApAQCAtNTI0Nyw4ICs1MjQ3LDggQEAgdHJh bXAtaGFuZGxlLXNoZWxsLWNvbW1hbmQKIAkgICAgICA7OyBEaXNwbGF5IG91dHB1dC4KIAkg ICAgICAod2l0aC1jdXJyZW50LW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KSkpCiAJCShz ZXRxIG1vZGUtbGluZS1wcm9jZXNzICcoIjolcyIpKQotICAgICAgICAgICAgICAgIChzaGVs bC1tb2RlKQorICAgICAgICAgICAgICAgIChzaGVsbC1jb21tYW5kLW1vZGUpCiAgICAgICAg ICAgICAgICAgKHNldHEtbG9jYWwgcmV2ZXJ0LWJ1ZmZlci1mdW5jdGlvbgogICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKCZyZXN0IF8pCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoYXN5bmMtc2hlbGwtY29tbWFuZCBjb21tYW5kIGJ1ZmZlcikpKQo= --------------Gh4v0NRHA8JJMAwembPrYihI Content-Type: text/x-patch; charset=UTF-8; name="shell-start-prog-none.diff" Content-Disposition: attachment; filename="shell-start-prog-none.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3Avc2hlbGwuZWwgYi9saXNwL3NoZWxsLmVsCmluZGV4IGU2YjMx NWVlNWMwLi4wNzAzODgzMjQzNyAxMDA2NDQKLS0tIGEvbGlzcC9zaGVsbC5lbAorKysgYi9s aXNwL3NoZWxsLmVsCkBAIC03MDIsNyArNzAyLDcgQEAgc2hlbGwtbW9kZQogICAoYWRkLWhv b2sgJ2NvbWludC1pbmRpcmVjdC1zZXR1cC1ob29rCiAgICAgICAgICAgICAjJ3NoZWxsLWlu ZGlyZWN0LXNldHVwLWhvb2sgJ2FwcGVuZCB0KQogICAoc2V0cSBjb21pbnQtaW5kaXJlY3Qt c2V0dXAtZnVuY3Rpb24KLSAgICAgICAgKGxldCAoKHNoZWxsIHNoZWxsLS1zdGFydC1wcm9n KSkKKyAgICAgICAgKGxldCAoKHNoZWxsIChhbmQgKHN0cmluZ3Agc2hlbGwtLXN0YXJ0LXBy b2cpIHNoZWxsLS1zdGFydC1wcm9nKSkpCiAgICAgICAgICAgKGxhbWJkYSAoKQogICAgICAg ICAgICAgKHJlcXVpcmUgJ3NoLXNjcmlwdCkKICA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