From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#17295: 24.3; Add TRAMP fixes for history clobbering to pretest Date: Wed, 23 Apr 2014 10:23:37 +0200 Message-ID: <8761m078ty.fsf@gmx.de> References: <87tx9q1x35.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398241469 16214 80.91.229.3 (23 Apr 2014 08:24:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2014 08:24:29 +0000 (UTC) Cc: 17295@debbugs.gnu.org To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 23 10:24:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WcsTc-00059H-HH for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Apr 2014 10:24:20 +0200 Original-Received: from localhost ([::1]:59559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcsTb-0004WW-Uy for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Apr 2014 04:24:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcsTS-0004Ky-1l for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 04:24:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcsTK-00022L-6y for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 04:24:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcsTK-00022G-4J for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 04:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WcsTJ-0000r1-LA for bug-gnu-emacs@gnu.org; Wed, 23 Apr 2014 04:24:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87tx9q1x35.fsf@gmail.com> Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Apr 2014 08:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17295 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17295-submit@debbugs.gnu.org id=B17295.13982414273259 (code B ref 17295); Wed, 23 Apr 2014 08:24:01 +0000 Original-Received: (at 17295) by debbugs.gnu.org; 23 Apr 2014 08:23:47 +0000 Original-Received: from localhost ([127.0.0.1]:55682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcsT4-0000qQ-HP for submit@debbugs.gnu.org; Wed, 23 Apr 2014 04:23:46 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:55587) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcsT1-0000qD-9Z for 17295@debbugs.gnu.org; Wed, 23 Apr 2014 04:23:44 -0400 Original-Received: from detlef.gmx.de ([93.202.61.140]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MV6EP-1WQNdJ2OHF-00YPCp; Wed, 23 Apr 2014 10:23:41 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:55bGft8AWbfXNEX6oe0hQgFWemItU7wqQsDIohzYK7qJY9lpGp8 mZ8Z/4jUaUKV4LicNyM6fXwKs9tvC5N3HiY8pjF6losj6uk21EUi8LLsISxlhmxNpmkAOJr Y46xCdKfLsub/5YbgFPLdtFAt8yU+nAggbMyDYW41K87MhgV3YBqS/sKO7u4IDfJ43xQrjE R4H/1bOEAXjwRQkxLdIOQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88239 Archived-At: Vasilij Schneidermann 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.