GNU bug report logs - #35769
Local .bash_history cleared when tramp-histfile-override is set to t

Previous Next

Package: emacs;

Reported by: Wanrong Lin <wrglin <at> gmail.com>

Date: Fri, 17 May 2019 01:18:02 UTC

Severity: normal

To reply to this bug, email your comments to 35769 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Fri, 17 May 2019 01:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wanrong Lin <wrglin <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 17 May 2019 01:18:04 GMT) Full text and rfc822 format available.

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

From: Wanrong Lin <wrglin <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Local .bash_history cleared when tramp-histfile-override is set to t
Date: Thu, 16 May 2019 21:11:33 -0400
Emacs 26.1, Linux
When I have this
(setq tramp-histfile-override t)
and use tramp to open a remote directory via scp, the *local*
~/.bash_history is wiped out (i.e. it becomes an empty file). I don't
think that is the desired behavior for this setting.

Thanks for looking into it.

W. Lin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Sat, 18 May 2019 16:19:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Wanrong Lin <wrglin <at> gmail.com>
Cc: 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Sat, 18 May 2019 18:18:01 +0200
Wanrong Lin <wrglin <at> gmail.com> writes:

Hi,

> Emacs 26.1, Linux
> When I have this
> (setq tramp-histfile-override t)
> and use tramp to open a remote directory via scp, the *local*
> ~/.bash_history is wiped out (i.e. it becomes an empty file). I don't
> think that is the desired behavior for this setting.

Thanks for the bug report. I've pushed a patch to the Tramp and Emacs
repositories which should fix it. Do you have a chance to test a recent
checkout of Tramp or Emacs?

> W. Lin

Best regards, Michael.




bug Marked as fixed in versions 27.1. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Sat, 18 May 2019 16:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Sun, 26 May 2019 19:51:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Wanrong Lin <wrglin <at> gmail.com>
Cc: 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Sun, 26 May 2019 21:50:13 +0200
[Message part 1 (text/plain, inline)]
Wanrong Lin <wrglin <at> gmail.com> writes:

> Hi Michael:

Hi Wanrong,

[Pls keep the Cc, for the archives]

> I just tested your patch (on Emacs 26.1 as I don't yet have a working
> Emacs 26.2 set up) , and unfortunately it did not seem to fix the
> issue. Would you mind taking a look at it again? Thanks.

Well, I have hard times to reproduce your problem. Anyway, could you try
the appended patch instead?

> Wanrong

Best regards, Michael.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Mon, 03 Jun 2019 18:42:01 GMT) Full text and rfc822 format available.

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

From: Wanrong Lin <wrglin <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Mon, 3 Jun 2019 14:41:48 -0400
[Message part 1 (text/plain, inline)]
Sorry to reply late.

I could not patch your patch file on my Emacs 26.1 tramp.el. I guess I 
will wait until I get time to have Emacs 26.2 installed and test your 
change again.

Wanrong

On 5/26/2019 3:50 PM, Michael Albinus wrote:
> Wanrong Lin <wrglin <at> gmail.com> writes:
>
>> Hi Michael:
> Hi Wanrong,
>
> [Pls keep the Cc, for the archives]
>
>> I just tested your patch (on Emacs 26.1 as I don't yet have a working
>> Emacs 26.2 set up) , and unfortunately it did not seem to fix the
>> issue. Would you mind taking a look at it again? Thanks.
> Well, I have hard times to reproduce your problem. Anyway, could you try
> the appended patch instead?
>
>> Wanrong
> Best regards, Michael.
>
>
> *** /tmp/ediff16zXeN	2019-05-26 21:45:35.446178244 +0200
> --- /net/ford/albinus/src/tramp/lisp/tramp.el	2019-05-26 21:44:57.446575193 +0200
> ***************
> *** 4676,4681 ****
> --- 4676,4682 ----
>    PROGRAM is nil is trapped also, returning 1.  Furthermore, traces
>    are written with verbosity of 6."
>      (let ((default-directory (tramp-compat-temporary-file-directory))
> + 	(process-environment (default-toplevel-value 'process-environment))
>    	(destination (if (eq destination t) (current-buffer) destination))
>    	(vec (or vec (car tramp-current-connection)))
>    	output error result)
> ***************
> *** 4709,4714 ****
> --- 4710,4716 ----
>    PROGRAM is nil is trapped also, returning 1.  Furthermore, traces
>    are written with verbosity of 6."
>      (let ((default-directory (tramp-compat-temporary-file-directory))
> + 	(process-environment (default-toplevel-value 'process-environment))
>    	(buffer (if (eq buffer t) (current-buffer) buffer))
>    	result)
>        (tramp-message
> ***************
> *** 4738,4743 ****
> --- 4740,4746 ----
>    If an error occurs, it returns nil.  Traces are written with
>    verbosity of 6."
>      (let ((default-directory (tramp-compat-temporary-file-directory))
> + 	(process-environment (default-toplevel-value 'process-environment))
>    	(vec (or vec (car tramp-current-connection)))
>    	result)
>        (if args


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

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Mon, 03 Jun 2019 18:54:02 GMT) Full text and rfc822 format available.

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

From: Wanrong Lin <wrglin <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Mon, 3 Jun 2019 14:53:17 -0400
Yes, please commit your work.

I have never run tramp outside the stock Emacs, but I can certainly give 
the package-install a try on tramp after you code is in.

Thanks a lot!

Wanrong

On 6/3/2019 2:49 PM, Michael Albinus wrote:
> Wanrong Lin <wrglin <at> gmail.com> writes:
>
> Hi Wanrong
>
>> I could not patch your patch file on my Emacs 26.1 tramp.el. I guess I
>> will wait until I get time to have Emacs 26.2 installed and test your
>> change again.
> That's one way. The other one is that I'll commit it to the Tramp
> repository, and with the next Tramp release (2.4.2) you could install
> and check it via GNU ELPA. These days, I'm polishing the final bits for this.
>
> Would you like to test a prerelease of what will be Tramp 2.4.2 in GNU ELPA?
>
>> Wanrong
> Best regards, Michael.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Mon, 03 Jun 2019 18:55:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Wanrong Lin <wrglin <at> gmail.com>
Cc: 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Mon, 03 Jun 2019 20:49:30 +0200
Wanrong Lin <wrglin <at> gmail.com> writes:

Hi Wanrong

> I could not patch your patch file on my Emacs 26.1 tramp.el. I guess I
> will wait until I get time to have Emacs 26.2 installed and test your
> change again.

That's one way. The other one is that I'll commit it to the Tramp
repository, and with the next Tramp release (2.4.2) you could install
and check it via GNU ELPA. These days, I'm polishing the final bits for this.

Would you like to test a prerelease of what will be Tramp 2.4.2 in GNU ELPA?

> Wanrong

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Wed, 05 Jun 2019 08:10:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Wanrong Lin <wrglin <at> gmail.com>
Cc: 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Wed, 05 Jun 2019 10:08:54 +0200
Wanrong Lin <wrglin <at> gmail.com> writes:

Hi Wanrong,

> Yes, please commit your work.
>
> I have never run tramp outside the stock Emacs, but I can certainly
> give the package-install a try on tramp after you code is in.

I've prepared an intermediate ELPA package Tramp 2.4.1.50 for you. Tramp
as ELPA package will appear for the very first time end of June.

Next message (off-list) I will send two files to you, tramp-2.4.1.50.tar
and archive-contents. Pls copy them into any directory, let's say /tmp.

In your .emacs, add the following forms:

--8<---------------cut here---------------start------------->8---
(require 'package)
(add-to-list 'package-archives '("local" . "/tmp/"))
--8<---------------cut here---------------end--------------->8---

When you open your *Packages* buffer, you'll see an entry like

--8<---------------cut here---------------start------------->8---
  tramp              2.4.1.50      new        local      Transparent Remote Access, Multiple Protocol
--8<---------------cut here---------------end--------------->8---

Install it. Maybe you need to restart Emacs, don't know. When you run
your test, check variable `tramp-version'. It shall have the value "2.4.1.50".

> Wanrong

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Tue, 18 Aug 2020 11:32:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 35769 <at> debbugs.gnu.org, Wanrong Lin <wrglin <at> gmail.com>
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Tue, 18 Aug 2020 11:31:24 +0000
tags 35769 + moreinfo
thanks

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

> Wanrong Lin <wrglin <at> gmail.com> writes:
>
> Hi Wanrong,
>
>> Yes, please commit your work.
>>
>> I have never run tramp outside the stock Emacs, but I can certainly
>> give the package-install a try on tramp after you code is in.
>
> I've prepared an intermediate ELPA package Tramp 2.4.1.50 for you. Tramp
> as ELPA package will appear for the very first time end of June.
>
> Next message (off-list) I will send two files to you, tramp-2.4.1.50.tar
> and archive-contents. Pls copy them into any directory, let's say /tmp.
>
> In your .emacs, add the following forms:
>
> (require 'package)
> (add-to-list 'package-archives '("local" . "/tmp/"))
>
>
> When you open your *Packages* buffer, you'll see an entry like
>
>   tramp              2.4.1.50      new        local      Transparent Remote Access, Multiple Protocol
>
> Install it. Maybe you need to restart Emacs, don't know. When you run
> your test, check variable `tramp-version'. It shall have the value "2.4.1.50".
>
>> Wanrong
>
> Best regards, Michael.

It seems like the problem was fixed in a new version of Tramp?  So is
this still an issue or should it be closed?

Best regards,
Stefan Kangas




Added tag(s) moreinfo. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 18 Aug 2020 11:32:03 GMT) Full text and rfc822 format available.

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 18 Aug 2020 13:37:02 GMT) Full text and rfc822 format available.

Notification sent to Wanrong Lin <wrglin <at> gmail.com>:
bug acknowledged by developer. (Tue, 18 Aug 2020 13:37:02 GMT) Full text and rfc822 format available.

Message #35 received at 35769-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Wanrong Lin <wrglin <at> gmail.com>, 35769-done <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Tue, 18 Aug 2020 15:36:15 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

Hi Stefan,

>> Hi Wanrong,
>>
>>> Yes, please commit your work.
>>>
>>> I have never run tramp outside the stock Emacs, but I can certainly
>>> give the package-install a try on tramp after you code is in.
>>
>> I've prepared an intermediate ELPA package Tramp 2.4.1.50 for you. Tramp
>> as ELPA package will appear for the very first time end of June.
>>
>> Next message (off-list) I will send two files to you, tramp-2.4.1.50.tar
>> and archive-contents. Pls copy them into any directory, let's say /tmp.
>>
>> In your .emacs, add the following forms:
>>
>> (require 'package)
>> (add-to-list 'package-archives '("local" . "/tmp/"))
>>
>>
>> When you open your *Packages* buffer, you'll see an entry like
>>
>>   tramp 2.4.1.50 new local Transparent Remote Access, Multiple
>> Protocol
>>
>> Install it. Maybe you need to restart Emacs, don't know. When you run
>> your test, check variable `tramp-version'. It shall have the value "2.4.1.50".
>>
>>> Wanrong
>>
>> Best regards, Michael.
>
> It seems like the problem was fixed in a new version of Tramp?  So is
> this still an issue or should it be closed?

I believe this is fixed in recent Tramp. As you have said, there isn't
any confirmation for more than a year, so I'm closing the bug.

> Best regards,
> Stefan Kangas

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Tue, 18 Aug 2020 15:43:01 GMT) Full text and rfc822 format available.

Message #38 received at 35769-done <at> debbugs.gnu.org (full text, mbox):

From: Wanrong Lin <wrglin <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>, Stefan Kangas <stefan <at> marxist.se>
Cc: 35769-done <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Tue, 18 Aug 2020 11:41:52 -0400
I originally reported this bug. Sorry to respond late. I just checked 
with Emacs 26.3 and the bug is still there.

Wanrong

On 8/18/2020 9:36 AM, Michael Albinus wrote:
> Stefan Kangas <stefan <at> marxist.se> writes:
>
> Hi Stefan,
>
>>> Hi Wanrong,
>>>
>>>> Yes, please commit your work.
>>>>
>>>> I have never run tramp outside the stock Emacs, but I can certainly
>>>> give the package-install a try on tramp after you code is in.
>>> I've prepared an intermediate ELPA package Tramp 2.4.1.50 for you. Tramp
>>> as ELPA package will appear for the very first time end of June.
>>>
>>> Next message (off-list) I will send two files to you, tramp-2.4.1.50.tar
>>> and archive-contents. Pls copy them into any directory, let's say /tmp.
>>>
>>> In your .emacs, add the following forms:
>>>
>>> (require 'package)
>>> (add-to-list 'package-archives '("local" . "/tmp/"))
>>>
>>>
>>> When you open your *Packages* buffer, you'll see an entry like
>>>
>>>    tramp 2.4.1.50 new local Transparent Remote Access, Multiple
>>> Protocol
>>>
>>> Install it. Maybe you need to restart Emacs, don't know. When you run
>>> your test, check variable `tramp-version'. It shall have the value "2.4.1.50".
>>>
>>>> Wanrong
>>> Best regards, Michael.
>> It seems like the problem was fixed in a new version of Tramp?  So is
>> this still an issue or should it be closed?
> I believe this is fixed in recent Tramp. As you have said, there isn't
> any confirmation for more than a year, so I'm closing the bug.
>
>> Best regards,
>> Stefan Kangas
> Best regards, Michael.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Tue, 18 Aug 2020 16:07:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Wanrong Lin <wrglin <at> gmail.com>
Cc: 35769 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Tue, 18 Aug 2020 18:05:54 +0200
Wanrong Lin <wrglin <at> gmail.com> writes:

Hi Wanrong,

> I originally reported this bug. Sorry to respond late. I just checked
> with Emacs 26.3 and the bug is still there.

Sure. It is fixed in Emacs 27.1. Or you install the recent Tramp from
GNU ELPA.

> Wanrong

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Sep 2020 11:24:09 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Tom Gillespie <tgbugs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 27 May 2022 22:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Fri, 27 May 2022 22:57:02 GMT) Full text and rfc822 format available.

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

From: Tom Gillespie <tgbugs <at> gmail.com>
To: 35769 <at> debbugs.gnu.org
Subject: issue persists for su, sudo, chained ssh connections
Date: Fri, 27 May 2022 15:56:25 -0700
This bug has not been resolved for /su:, /sudo:, and chained
/ssh: connections as of emacs 28.1 tramp 2.5.2.28.1, and
emacs 29 tramp 2.6-pre.

The examples below WILL TRUNCATE YOUR HISTFILE!
So if you are going to run them back it up first!
#+begin_src elisp
;; XXX BACK UP YOUR .bash_history (or similar) BEFORE RUNNING
;; XXX IT WILL BE TRUNCATED

;; in a fresh emacs -Q -no-site-file
(require 'tramp-sh)
(let ((tramp-histfile-override t))
  (file-directory-p "/su::.emacs.d"))

;; in a fresh emacs -Q -no-site-file
(require 'tramp-sh)
(let ((tramp-histfile-override t))
  (file-directory-p "/ssh:|su::.emacs.d"))

;; in a fresh emacs -Q -no-site-file
(require 'tramp-sh)
(let ((tramp-histfile-override t))
  ;; change host1 and host2 to hosts that you can access sequentially
  (file-directory-p "/ssh:host1|ssh:host2:.emacs.d"))
#+end_src




bug No longer marked as fixed in versions 27.1 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 May 2022 23:19:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Thu, 09 Jun 2022 13:43:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tom Gillespie <tgbugs <at> gmail.com>
Cc: 35769 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Thu, 09 Jun 2022 15:42:31 +0200
Tom Gillespie <tgbugs <at> gmail.com> writes:

> This bug has not been resolved for /su:, /sudo:, and chained
> /ssh: connections as of emacs 28.1 tramp 2.5.2.28.1, and
> emacs 29 tramp 2.6-pre.

(Just responding to add Michael to the CCs.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 09 Jun 2022 13:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35769; Package emacs. (Thu, 09 Jun 2022 14:31:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Tom Gillespie <tgbugs <at> gmail.com>, 35769 <at> debbugs.gnu.org
Subject: Re: bug#35769: Local .bash_history cleared when
 tramp-histfile-override is set to t
Date: Thu, 09 Jun 2022 16:30:11 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

Hi Lars,

>> This bug has not been resolved for /su:, /sudo:, and chained
>> /ssh: connections as of emacs 28.1 tramp 2.5.2.28.1, and
>> emacs 29 tramp 2.6-pre.
>
> (Just responding to add Michael to the CCs.)

Thanks, I've seen this already. But I don't know yet what to say
about. At least, it is on my TODO list.

Best regards, Michael.




This bug report was last modified 3 years and 89 days ago.

Previous Next


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