Subject: Re: bug#35769: Local .bash_history cleared when tramp-histfile-override is set to t

From: Michael Albinus <[email-masked]>
Date: Sun, 26 May 2019 21:50:13 +0200

Wanrong Lin <[email-masked]> 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