bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest


From: Michael Albinus
Subject: bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest
Date: Wed, 23 Apr 2014 10:23:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Vasilij Schneidermann <v.schneidermann@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]