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: Sun, 2 Jun 2024 17:10:17 +0300 Message-ID: <9d30a868-0c42-43c8-b75f-730ead56bb92@gutov.dev> References: <3a497741-2ad0-4919-b7c9-cdb36b0eb455@gutov.dev> <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> <9685d486-46fe-4947-8bb2-fb436f09048b@gutov.dev> <86zfs6plwj.fsf@gnu.org> <86h6edq2kz.fsf@gnu.org> <864jadp55n.fsf@gnu.org> <87ikysvf5o.fsf@gmx.de> <87a5k3vj07.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="13266"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , 71049-done@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 02 16:11:15 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 1sDlvV-0003Br-Je for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jun 2024 16:11:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDlv9-0001Bi-65; Sun, 02 Jun 2024 10:10:51 -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 1sDlv7-0001B0-Kf for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 10:10:49 -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 1sDlv7-0004hr-CT for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 10:10:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDlvJ-0005ts-KU for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 10:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jun 2024 14:11:01 +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-done@debbugs.gnu.org id=D71049.171733744222653 (code D ref 71049); Sun, 02 Jun 2024 14:11:01 +0000 Original-Received: (at 71049-done) by debbugs.gnu.org; 2 Jun 2024 14:10:42 +0000 Original-Received: from localhost ([127.0.0.1]:60094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDluz-0005tI-R9 for submit@debbugs.gnu.org; Sun, 02 Jun 2024 10:10:42 -0400 Original-Received: from wfhigh3-smtp.messagingengine.com ([64.147.123.154]:59995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDlux-0005st-Id for 71049-done@debbugs.gnu.org; Sun, 02 Jun 2024 10:10:40 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 2AB8B18000F0; Sun, 2 Jun 2024 10:10:21 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 02 Jun 2024 10:10:21 -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=1717337420; x=1717423820; bh=iZZ1zKpEu1nGX6LpHfuopwIuw2coO0LEp++2DFeZIag=; b= Tse/v77m1OD7FQiH9NTdKNYdQwfieXPgV9ryMxmRf2wtg7wJDgYMJ43jAf8vq94G SHPjqt8JsfG3J1RTFDh3Ai/uSVlIpld+FXYBI8GC0e9SpP9g+QoFJKviWGLw16CY eX2vwz1tW0JBgjxn8B+IXrWsp8RTvKwfK1la5hGtBdYxhMfUx1xClHnilxRMe7H2 0yfa5s8KorkgRh4kSq6lPtLxx1TowYZEqX8cUZRui5RvA08/hhfBVaT30ABlCo2Y bHdmhIPjG3gM5/iS5BVSXV7ZCnjL8laIU8YNWEgyis+307/i4x+a3q96diUU+SO2 Dvy4AgLetkDGqiHBxA/IOA== 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=1717337420; x= 1717423820; bh=iZZ1zKpEu1nGX6LpHfuopwIuw2coO0LEp++2DFeZIag=; b=Y Jte+KHTTmjNo8p0jX7iD18gitVIh3K3O/dQiJ95rYAX1mGnw6kN245afDPyvhSIi 0yMEmqWSmVH948efiGj6wGTCXDsEf+/XEgFI938h+/ly+JPeXLuUV5SmleSXWV14 a8LGwHD56u2h0ncR08XMHpml2APA9tNCAZodfJjd3T5wCzuG6JbloGDMXr8YVEdi frPvfBYvuk2LRILUMQ/gimpbXf8B0O6ZNV5ploqeXc557YMIo+NyJQN7++xJXIkK x5zwQ5U+u9ERTNsiUiFILaeZ2DKPSNc17HoaWqvIWpWQn7dv/Jg4RbP4WsAaKcCe MVFHEjPHDo34o59qeReGg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeltddgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 2 Jun 2024 10:10:19 -0400 (EDT) Content-Language: en-US In-Reply-To: <87a5k3vj07.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:286394 Archived-At: Hi Michael, On 02/06/2024 11:36, Michael Albinus wrote: >> Looking at it again, it does seem like it could still be useful to >> override or disable the remote history file (right?). >> >> But with your patch, what happens when tramp-history-override is a >> string? Both Tramp and shell will write to it its commands, and upon >> loading shell will also read history from it, including all of the >> commands that Tramp had sent to the remote host. Am I reading it >> correctly? >> >> Perhaps instead we could have a connection-local variable like >> shell-history-file-name, which could be customized by the user to t to >> disable history - and that could even work per-connection. > > Good idea. Something like this? Pretty much, thanks. > diff --git a/lisp/shell.el b/lisp/shell.el > index 4352811912a..6fb5768c056 100644 > --- a/lisp/shell.el > +++ b/lisp/shell.el > @@ -419,6 +419,21 @@ shell--start-prog > "Shell file name started in `shell'.") > (put 'shell--start-prog 'permanent-local t) > > +(defcustom shell-history-file-name nil > + "The history file name used in `shell-mode'. > +When it is a string, this file name will be used. > +When it is nil, the environment variable HISTFILE is used. > +When it is t, no history file name is used in `shell-mode'. > + > +The settings obey whether `shell-mode' is invoked in a remote buffer. > +In that case, HISTFILE is taken from the remote host, and the string is > +interpreted as local file name on the remote host. I think it could be used in the local case, too? If the user sets a global value for this variable. That could probably simplify the implementation.