From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Fan_Yang Newsgroups: gmane.emacs.bugs Subject: bug#36742: 25.2; shell-mode over TRAMP does not read remote history file as comint input ring Date: Tue, 23 Jul 2019 09:55:35 +0800 Message-ID: <5B22982A-F6D3-4615-B3C9-C63019B27D99@sjtu.edu.cn> References: <788003112.20729758.1563633042446.JavaMail.zimbra@sjtu.edu.cn> <87h87egw86.fsf@gmx.de> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_D0E91928-957C-4FE5-B699-748CB1CD6728" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221622"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36742@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 23 04:03:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpk8y-000vWJ-S6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2019 04:03:09 +0200 Original-Received: from localhost ([::1]:38592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpk8x-0003vn-UV for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jul 2019 22:03:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46924) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpk8t-0003r1-T6 for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 22:03:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpk8s-0003MV-Ko for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 22:03:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpk8s-0003MG-Gi for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 22:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpk8s-00084l-BV for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 22:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Fan_Yang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2019 02:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36742 X-GNU-PR-Package: emacs Original-Received: via spool by 36742-submit@debbugs.gnu.org id=B36742.156384733930957 (code B ref 36742); Tue, 23 Jul 2019 02:03:02 +0000 Original-Received: (at 36742) by debbugs.gnu.org; 23 Jul 2019 02:02:19 +0000 Original-Received: from localhost ([127.0.0.1]:33792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpk8A-00083F-Ha for submit@debbugs.gnu.org; Mon, 22 Jul 2019 22:02:18 -0400 Original-Received: from smtp180.sjtu.edu.cn ([202.120.2.180]:44316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpk1k-0007rp-To for 36742@debbugs.gnu.org; Mon, 22 Jul 2019 21:55:42 -0400 Original-Received: from proxy01.sjtu.edu.cn (unknown [202.112.26.54]) by smtp180.sjtu.edu.cn (Postfix) with ESMTPS id 2D1C11008CBC1; Tue, 23 Jul 2019 09:55:36 +0800 (CST) Original-Received: from localhost (localhost [127.0.0.1]) by proxy01.sjtu.edu.cn (Postfix) with ESMTP id 1E7A32042423F; Tue, 23 Jul 2019 09:55:36 +0800 (CST) X-Virus-Scanned: amavisd-new at proxy01.sjtu.edu.cn Original-Received: from proxy01.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy01.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AbSJHVSxjLGl; Tue, 23 Jul 2019 09:55:35 +0800 (CST) Original-Received: from fans-air.ipads-lab.se.sjtu.edu.cn (unknown [202.120.40.82]) (Authenticated sender: Fan_Yang@sjtu.edu.cn) by proxy01.sjtu.edu.cn (Postfix) with ESMTPSA id E2FBC2042423E; Tue, 23 Jul 2019 09:55:35 +0800 (CST) In-Reply-To: <87h87egw86.fsf@gmx.de> X-Mailer: Apple Mail (2.3445.104.11) X-Mailman-Approved-At: Mon, 22 Jul 2019 22:02:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163614 Archived-At: --Apple-Mail=_D0E91928-957C-4FE5-B699-748CB1CD6728 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=gb2312 Hi Michael! I have cloned the git repo and tested your commit. It works well in my=20= environment! > ...but you shall be aware that the history file contains also the > commands Tramp has sent in the background. I see. It is reasonable and acceptable. > You shall also set tramp-histfile-override to nil in order to get the > expected history file. OK, thanks for reminding~ Fan > =D4=DA 2019=C4=EA7=D4=C222=C8=D5=A3=AC19:11=A3=ACMichael Albinus = =D0=B4=B5=C0=A3=BA >=20 > Fan Yang > writes: >=20 > Hi Fan, >=20 >> * Bug description: >>=20 >> When using "M-x shell" on a remote file (say "/scp:yf@val17:"), a = bash >> is started at the server "val17" as the user "yf". But the "*shell*" >> buffer is started with an empty input ring. It does not read bash >> history file ("/scp:yf@val17:~/.bash_history") into comint input = ring. >>=20 >> * What is expected: >>=20 >> When using "M-x shell" on a remote file (say "/scp:yf@val17:"), a = bash >> is started at the server "val17" as the user "yf". The "*shell*" >> 1. has the content of "/scp:yf@val17:~/.bash_history" as comint input >> ring. And I can use "M-p" to insert previous command, use "M-r" to >> isearch previous comamnd, etc. >> 2. the commands I have input in this "*shell*" will be appended to >> "/scp:yf@val17:~/.bash_history" after shell exit. >> Just like what "shell-mode" does for local shell. >=20 > I've fixed this in the Emacs repository, commit 7f95d2d407. It works = as > expected, but you shall be aware that the history file contains also = the > commands Tramp has sent in the background. >=20 > You shall also set tramp-histfile-override to nil in order to get the > expected history file. >=20 > Do you have a chance to test with a recent Emacs 27.0.50? >=20 >> Best Regards, >> Fan >=20 > Best regards, Michael. --Apple-Mail=_D0E91928-957C-4FE5-B699-748CB1CD6728 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=gb2312 Hi = Michael!

I have = cloned the git repo and tested your commit.  It works well in = my 
environment!

...but you shall be aware that the history file contains also = the
commands Tramp has sent in the = background.

I see. =  It is reasonable and acceptable.

You = shall also set tramp-histfile-override to nil in order to get the
expected history file.

OK, thanks for reminding~

Fan


=D4=DA 2019=C4=EA7=D4=C222=C8=D5=A3=AC19:11=A3=AC= Michael Albinus <michael.albinus@gmx.de> =D0=B4=B5=C0=A3=BA

Fan Yang <fan_yang@sjtu.edu.cn> writes:

Hi Fan,

* Bug = description:

When using "M-x shell" on a = remote file (say "/scp:yf@val17:"), a bash
is started at = the server "val17" as the user "yf".  But the "*shell*"
buffer is started with an empty input ring.  It does not = read bash
history file ("/scp:yf@val17:~/.bash_history") = into comint input ring.

* What is = expected:

When using "M-x shell" on a = remote file (say "/scp:yf@val17:"), a bash
is started at = the server "val17" as the user "yf".  The "*shell*"
1. = has the content of "/scp:yf@val17:~/.bash_history" as comint input
  ring.  And I can use "M-p" to insert = previous command, use "M-r" to
  isearch = previous comamnd, etc.
2. the commands I have input in = this "*shell*" will be appended to
  "/scp:yf@val17:~/.bash_history" after shell = exit.
Just like what "shell-mode" does for local shell.

I've fixed this in the Emacs repository, commit 7f95d2d407. = It works as
expected, but = you shall be aware that the history file contains also the
commands Tramp has sent in the = background.

You shall = also set tramp-histfile-override to nil in order to get the
expected history file.

Do you have a chance to test = with a recent Emacs 27.0.50?

Best Regards,
Fan

Best regards, Michael.

= --Apple-Mail=_D0E91928-957C-4FE5-B699-748CB1CD6728--