From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71049: async-shell-command ends with "Process *Async Shell Command* finished" when remote "direct-async-process" Date: Fri, 24 May 2024 16:06:13 +0200 Message-ID: <87ttinfgoa.fsf@gmx.de> References: <3a497741-2ad0-4919-b7c9-cdb36b0eb455@gutov.dev> <8734q7h35d.fsf@gmx.de> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16655"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 71049@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 24 16:07:23 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 1sAVZr-000482-DV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 May 2024 16:07:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAVZR-0007vo-CV; Fri, 24 May 2024 10:06:57 -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 1sAVZP-0007vU-Tw for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 10:06:55 -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 1sAVZP-0006e7-MF for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 10:06:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAVZW-00005s-Do for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 10:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 May 2024 14:07: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.1716559594354 (code B ref 71049); Fri, 24 May 2024 14:07:02 +0000 Original-Received: (at 71049) by debbugs.gnu.org; 24 May 2024 14:06:34 +0000 Original-Received: from localhost ([127.0.0.1]:37336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAVZ4-00005e-0J for submit@debbugs.gnu.org; Fri, 24 May 2024 10:06:34 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:55499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAVZ0-00005X-UL for 71049@debbugs.gnu.org; Fri, 24 May 2024 10:06:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1716559575; x=1717164375; i=michael.albinus@gmx.de; bh=3NUg+qR1xI2kBgnvTOoWPVs5fbWEXZQk4m68rSynvPg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=X/7xPiyZdQ7HkFgR994ypRL1+9L2bf91ekQoy+WSR+GvPBakePaxljVjCfZddwCB BRe/L2GgQY5LZth4nLkwiVzVW+Qbc/DETk60iixqWV42RwVxdv5/PGZdWmX2O/Mnu v/Qg3YnICkhpstok9AwaEf2Q1KBwUSrjYCfZux+Ad9Sc2KH2F96QsEfc5Eu0Jt5wU 3y4RbO/AwDUIwzUehRof3Dmq3v+Vod5h8oV9TG/NqH1ZFFI/LsOJ9UsHNms0y9nDg Fjct/JJlY8z0a02emY6DHGew5q7gjnn0Kw6WSl3r2iNe4C1t8zXS5T73j1Ym+ToPA u38xClCTXsxpYVIq9A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.151]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N8obG-1sY67c1HBG-017Fge; Fri, 24 May 2024 16:06:14 +0200 In-Reply-To: <8734q7h35d.fsf@gmx.de> (Michael Albinus's message of "Fri, 24 May 2024 13:15:26 +0200") X-Provags-ID: V03:K1:gYSdg1w7WJKzdIjXJ3Cg7io38+JrnFyMJmH6RnRaJwkh3MWDVL4 oCv3hBwhK/624HAel0ogKzAgyxqrTQalOnjXxPwj0KJ2IBsSLRf1NGSEhvhF2NSa4B5V3jQ ellyWCw35YOGaPeqWnXhw8wET7V7Y5QFS+RdwKlso4cKoJ4SEchfzQhhDVIqVEAIcUq2AGb 9OClrJPvReEPuBuNsGCIQ== UI-OutboundReport: notjunk:1;M01:P0:fK4W2BXZwrU=;zpOKi9fJf5KhR1KErltNePnxVkX W5s0C7l2z3XHlHzuKJAdASoRw7NpdaD9Yha4uUhzoWPBhMn1VWeCZoamWUtEmUGQ59paB4ICl Ggc4YE35QbPsIAtAQxkpnTlyIOS/SDXaej5TMoorgGwDy1C7BynSqtNUbRCnhZIca+BohY8xZ NxaNoBDf5anTPLud6+A8TzvFlKyvighbArwoZaP8Var4Cl/Qw6fxl+cm0APalhnJYbOop2wvq Pq7+AQX7gpYmen7hpClDSynEOaJcWss0iodu8PE5BqMZtptKRbwogk1uYSOFDAl2e1UHKl7ji PdlaNHpj/H4Q0oyTPEujK9v/vi9O5dbxUT5oD90vNwF99QUyR1Z6mgEleHKc8ywGROeJ2RPyu WsbGdrF7p10qh7Yal2QM4mqYvyzt6UagKe3YRaywcgjCVfE9XJtAl+yHPPdgyhh/Uhf0TBnNx PxotGv0xppyllRacsI4Ymb8DE3p+A2LB1cMIdmGuawn+gzAKNM0P7uEqeG0sX4+qvCBZqpFt9 LK3RxmASLWg8xU+4ji2mcotm3stdy2J0TSazOsdrLqOBzhVqJNuuBnxRIgCnNCL2lnR527C01 cWUsVO1P4z+aPR1Vhs20T+5x+ig7kNqWI4ICea8ivNVf5yONc6g52NGi53vo/t1dFzmUfl0Vg JJjhqBwspwKaTUNe0YYdk8UHFeWKLGRiNF4o1kwR9ppqiX08TTrAyUnx68BdHR060Vo+GiQHa eFewwDjnzejJ3GOquMaFeR01KqAoO1AuPHj3F7j85jZyd2I+0f4wzJbXvR1ty8BrOhbhUALS 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:285773 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Michael Albinus writes: Hi Dmitry, >> The command can be simple, like 'ls' or 'echo 123'. I also see this >> added to *Messages*: >> >> Tramp: Inserting >> =E2=80=98/ssh:dgutov@fencepost.gnu.org:/home/d/dgutov/.tramp_history= =E2=80=99...done > > According to reading .tramp_history: this is performed in > comint-read-input-ring, called from shell-mode. comint-input-ring-file-na= me > is set in shell-mode, I don't see a trivial solution to suppress > this. Likely, we must extend shell-mode for this case. We could add a user option remote-file-name-inhibit-input-ring which suppresses reading the remote histfile, when set to non-nil. See appended patch. Eli? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/comint.el b/lisp/comint.el index 3804932e01c..2415435546e 100644 =2D-- a/lisp/comint.el +++ b/lisp/comint.el @@ -249,6 +249,11 @@ comint-input-ignoredups :type 'boolean :group 'comint) +(defcustom remote-file-name-inhibit-input-ring nil + "If non-nil, inhibit `comint-input-ring'." + :type 'boolean + :version "30.1") + (defcustom comint-input-ring-file-name nil "If non-nil, name of the file to read/write input history. See also `comint-read-input-ring' and `comint-write-input-ring'. diff --git a/lisp/shell.el b/lisp/shell.el index e6b315ee5c0..1ed04c46cf9 100644 =2D-- a/lisp/shell.el +++ b/lisp/shell.el @@ -726,9 +726,13 @@ shell-mode (hsize (getenv "HISTSIZE")) (hfile (getenv "HISTFILE"))) (when remote - ;; `shell-snarf-envar' does not work trustworthy. - (setq hsize (shell-command-to-string "echo -n $HISTSIZE") - hfile (shell-command-to-string "echo -n $HISTFILE"))) + (if remote-file-name-inhibit-input-ring + (setq remote nil + hsize nil + hfile nil) + ;; `shell-snarf-envar' does not work trustworthy. + (setq hsize (shell-command-to-string "echo -n $HISTSIZE") + hfile (shell-command-to-string "echo -n $HISTFILE")))) (and (string-equal hfile "") (setq hfile nil)) (and (stringp hsize) (integerp (setq hsize (string-to-number hsize))) --=-=-=--