all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Vasilij Schneidermann <v.schneidermann@gmail.com>
Cc: 17295@debbugs.gnu.org
Subject: bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest
Date: Wed, 23 Apr 2014 10:23:37 +0200	[thread overview]
Message-ID: <8761m078ty.fsf@gmx.de> (raw)
In-Reply-To: <87tx9q1x35.fsf@gmail.com>

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	other threads:[~2014-04-23  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18 15:22 bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest Vasilij Schneidermann
2014-04-23  8:23 ` Michael Albinus [this message]
     [not found]   ` <20140428074632.GA799@odonien.bg.bib.de>
2014-04-28 10:07     ` Michael Albinus
2014-05-06  8:53       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761m078ty.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=17295@debbugs.gnu.org \
    --cc=v.schneidermann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.