GNU bug report logs - #17295
24.3; Add TRAMP fixes for history clobbering to pretest

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <v.schneidermann <at> gmail.com>

Date: Fri, 18 Apr 2014 16:36:01 UTC

Severity: normal

Found in version 24.3

Fixed in version 24.4

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

Bug is archived. No further changes may be made.

Full log


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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Cc: 17295 <at> debbugs.gnu.org
Subject: Re: bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest
Date: Wed, 23 Apr 2014 10:23:37 +0200
Vasilij Schneidermann <v.schneidermann <at> gmail.com> writes:

Hi Vasilij,

> According to Michael Albinus recent TRAMP versions have a bugfix that
> prevents TRAMP from clobbering history files on both local and remote
> hosts.  It would be nice to incorporate them into the current Emacs
> pretest, simply because it's a relevant bug affecting people and another
> patch for a less common issue has already been applied.

This has been fixed in Tramp 2.2.10-pre, indeed. Could you, please,
check the following patch, which is a backport of this for the Emacs
24.4 pretest?

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-24/lisp/net/tramp-sh.el.~117003~	2014-04-23 10:17:34.876086596 +0200
--- /home/albinus/src/emacs-24/lisp/net/tramp-sh.el	2014-04-23 10:17:34.996088675 +0200
***************
*** 425,431 ****

  ;;;###tramp-autoload
  (defcustom tramp-remote-process-environment
!   `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_CTYPE=''"
      ,(format "TERM=%s" tramp-terminal-type)
      "EMACS=t" ;; Deprecated.
      ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
--- 425,431 ----

  ;;;###tramp-autoload
  (defcustom tramp-remote-process-environment
!   `("TMOUT=0" "LC_CTYPE=''"
      ,(format "TERM=%s" tramp-terminal-type)
      "EMACS=t" ;; Deprecated.
      ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
***************
*** 440,445 ****
--- 440,446 ----
  Special handling is applied to the PATH environment, which should
  not be set here. Instead, it should be set via `tramp-remote-path'."
    :group 'tramp
+   :version "24.4"
    :type '(repeat string))

  (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
***************
*** 3735,3752 ****
  	  (setq extra-args (cdr item))))
        (tramp-send-command
         vec (format
! 	    "exec env ENV='' PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
  	    (tramp-shell-quote-argument tramp-end-of-output)
  	    shell (or extra-args ""))
         t))
      (tramp-set-connection-property
!      (tramp-get-connection-process vec) "remote-shell" shell)
!     ;; Setting prompts.
!     (tramp-send-command
!      vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t)
!     (tramp-send-command vec "PS2=''" t)
!     (tramp-send-command vec "PS3=''" t)
!     (tramp-send-command vec "PROMPT_COMMAND=''" t)))

  (defun tramp-find-shell (vec)
    "Opens a shell on the remote host which groks tilde expansion."
--- 3736,3747 ----
  	  (setq extra-args (cdr item))))
        (tramp-send-command
         vec (format
! 	    "exec env ENV='' HISTFILE=/dev/null PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
  	    (tramp-shell-quote-argument tramp-end-of-output)
  	    shell (or extra-args ""))
         t))
      (tramp-set-connection-property
!      (tramp-get-connection-process vec) "remote-shell" shell)))

  (defun tramp-find-shell (vec)
    "Opens a shell on the remote host which groks tilde expansion."
***************
*** 4456,4461 ****
--- 4451,4457 ----
  		(delete-process p))
  	      (setenv "TERM" tramp-terminal-type)
  	      (setenv "LC_ALL" "en_US.utf8")
+ 	      (setenv "HISTFILE" "/dev/null")
  	      (setenv "PROMPT_COMMAND")
  	      (setenv "PS1" tramp-initial-end-of-output)
  	      (let* ((target-alist (tramp-compute-multi-hops vec))
--8<---------------cut here---------------end--------------->8---

Thanks, and best regards, Michael.




This bug report was last modified 11 years and 44 days ago.

Previous Next


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