* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
@ 2019-05-17 1:11 Wanrong Lin
2019-05-18 16:18 ` Michael Albinus
2022-05-27 22:56 ` bug#35769: issue persists for su, sudo, chained ssh connections Tom Gillespie
0 siblings, 2 replies; 14+ messages in thread
From: Wanrong Lin @ 2019-05-17 1:11 UTC (permalink / raw)
To: 35769
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2019-05-17 1:11 bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t Wanrong Lin
@ 2019-05-18 16:18 ` Michael Albinus
[not found] ` <fb923e49-354a-2443-621e-9210560fe322@gmail.com>
2022-05-27 22:56 ` bug#35769: issue persists for su, sudo, chained ssh connections Tom Gillespie
1 sibling, 1 reply; 14+ messages in thread
From: Michael Albinus @ 2019-05-18 16:18 UTC (permalink / raw)
To: Wanrong Lin; +Cc: 35769
Wanrong Lin <wrglin@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
[not found] ` <206e5640-86c3-4815-d28b-86ac584ee5e5@gmail.com>
@ 2019-05-26 19:50 ` Michael Albinus
2019-06-03 18:41 ` Wanrong Lin
0 siblings, 1 reply; 14+ messages in thread
From: Michael Albinus @ 2019-05-26 19:50 UTC (permalink / raw)
To: Wanrong Lin; +Cc: 35769
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
Wanrong Lin <wrglin@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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1319 bytes --]
*** /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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2019-05-26 19:50 ` Michael Albinus
@ 2019-06-03 18:41 ` Wanrong Lin
2019-06-03 18:49 ` Michael Albinus
0 siblings, 1 reply; 14+ messages in thread
From: Wanrong Lin @ 2019-06-03 18:41 UTC (permalink / raw)
To: Michael Albinus; +Cc: 35769
[-- Attachment #1: Type: text/plain, Size: 2100 bytes --]
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@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
[-- Attachment #2: Type: text/html, Size: 3263 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2019-06-03 18:41 ` Wanrong Lin
@ 2019-06-03 18:49 ` Michael Albinus
2019-06-03 18:53 ` Wanrong Lin
0 siblings, 1 reply; 14+ messages in thread
From: Michael Albinus @ 2019-06-03 18:49 UTC (permalink / raw)
To: Wanrong Lin; +Cc: 35769
Wanrong Lin <wrglin@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2019-06-03 18:49 ` Michael Albinus
@ 2019-06-03 18:53 ` Wanrong Lin
2019-06-05 8:08 ` Michael Albinus
0 siblings, 1 reply; 14+ messages in thread
From: Wanrong Lin @ 2019-06-03 18:53 UTC (permalink / raw)
To: Michael Albinus; +Cc: 35769
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@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2019-06-03 18:53 ` Wanrong Lin
@ 2019-06-05 8:08 ` Michael Albinus
2020-08-18 11:31 ` Stefan Kangas
0 siblings, 1 reply; 14+ messages in thread
From: Michael Albinus @ 2019-06-05 8:08 UTC (permalink / raw)
To: Wanrong Lin; +Cc: 35769
Wanrong Lin <wrglin@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2019-06-05 8:08 ` Michael Albinus
@ 2020-08-18 11:31 ` Stefan Kangas
2020-08-18 13:36 ` Michael Albinus
0 siblings, 1 reply; 14+ messages in thread
From: Stefan Kangas @ 2020-08-18 11:31 UTC (permalink / raw)
To: Michael Albinus; +Cc: 35769, Wanrong Lin
tags 35769 + moreinfo
thanks
Michael Albinus <michael.albinus@gmx.de> writes:
> Wanrong Lin <wrglin@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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2020-08-18 11:31 ` Stefan Kangas
@ 2020-08-18 13:36 ` Michael Albinus
2020-08-18 15:41 ` Wanrong Lin
0 siblings, 1 reply; 14+ messages in thread
From: Michael Albinus @ 2020-08-18 13:36 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Wanrong Lin, 35769-done
Stefan Kangas <stefan@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2020-08-18 13:36 ` Michael Albinus
@ 2020-08-18 15:41 ` Wanrong Lin
2020-08-18 16:05 ` Michael Albinus
0 siblings, 1 reply; 14+ messages in thread
From: Wanrong Lin @ 2020-08-18 15:41 UTC (permalink / raw)
To: Michael Albinus, Stefan Kangas; +Cc: 35769-done
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@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2020-08-18 15:41 ` Wanrong Lin
@ 2020-08-18 16:05 ` Michael Albinus
0 siblings, 0 replies; 14+ messages in thread
From: Michael Albinus @ 2020-08-18 16:05 UTC (permalink / raw)
To: Wanrong Lin; +Cc: 35769, Stefan Kangas
Wanrong Lin <wrglin@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: issue persists for su, sudo, chained ssh connections
2019-05-17 1:11 bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t Wanrong Lin
2019-05-18 16:18 ` Michael Albinus
@ 2022-05-27 22:56 ` Tom Gillespie
2022-06-09 13:42 ` bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t Lars Ingebrigtsen
1 sibling, 1 reply; 14+ messages in thread
From: Tom Gillespie @ 2022-05-27 22:56 UTC (permalink / raw)
To: 35769
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2022-05-27 22:56 ` bug#35769: issue persists for su, sudo, chained ssh connections Tom Gillespie
@ 2022-06-09 13:42 ` Lars Ingebrigtsen
2022-06-09 14:30 ` Michael Albinus
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 13:42 UTC (permalink / raw)
To: Tom Gillespie; +Cc: 35769, Michael Albinus
Tom Gillespie <tgbugs@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
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t
2022-06-09 13:42 ` bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t Lars Ingebrigtsen
@ 2022-06-09 14:30 ` Michael Albinus
0 siblings, 0 replies; 14+ messages in thread
From: Michael Albinus @ 2022-06-09 14:30 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Tom Gillespie, 35769
Lars Ingebrigtsen <larsi@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.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-06-09 14:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-17 1:11 bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t Wanrong Lin
2019-05-18 16:18 ` Michael Albinus
[not found] ` <fb923e49-354a-2443-621e-9210560fe322@gmail.com>
[not found] ` <87ef4t5fyk.fsf@gmx.de>
[not found] ` <206e5640-86c3-4815-d28b-86ac584ee5e5@gmail.com>
2019-05-26 19:50 ` Michael Albinus
2019-06-03 18:41 ` Wanrong Lin
2019-06-03 18:49 ` Michael Albinus
2019-06-03 18:53 ` Wanrong Lin
2019-06-05 8:08 ` Michael Albinus
2020-08-18 11:31 ` Stefan Kangas
2020-08-18 13:36 ` Michael Albinus
2020-08-18 15:41 ` Wanrong Lin
2020-08-18 16:05 ` Michael Albinus
2022-05-27 22:56 ` bug#35769: issue persists for su, sudo, chained ssh connections Tom Gillespie
2022-06-09 13:42 ` bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t Lars Ingebrigtsen
2022-06-09 14:30 ` Michael Albinus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).