GNU bug report logs - #36742
25.2; shell-mode over TRAMP does not read remote history file as comint input ring

Previous Next

Package: emacs;

Reported by: Fan Yang <fan_yang <at> sjtu.edu.cn>

Date: Sat, 20 Jul 2019 14:42:01 UTC

Severity: normal

Found in version 25.2

Fixed in version 27.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 36742 <at> debbugs.gnu.org (full text, mbox):

From: Fan_Yang <Fan_Yang <at> sjtu.edu.cn>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 36742 <at> debbugs.gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
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


> 在 2019年7月22日,19:11,Michael Albinus <michael.albinus <at> gmx.de> 写道:
> 
> Fan Yang <fan_yang <at> sjtu.edu.cn <mailto:fan_yang <at> sjtu.edu.cn>> writes:
> 
> Hi Fan,
> 
>> * Bug description:
>> 
>> When using "M-x shell" on a remote file (say "/scp:yf <at> 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 <at> val17:~/.bash_history") into comint input ring.
>> 
>> * What is expected:
>> 
>> When using "M-x shell" on a remote file (say "/scp:yf <at> val17:"), a bash
>> is started at the server "val17" as the user "yf".  The "*shell*"
>> 1. has the content of "/scp:yf <at> 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 <at> 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.

[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.