[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108501: * net/tramp-compat.el (tr
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108501: * net/tramp-compat.el (tramp-compat-temporary-file-directory): |
Date: |
Fri, 02 Nov 2012 01:45:56 -0000 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108501
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2012-06-06 15:32:36 +0200
message:
* net/tramp-compat.el (tramp-compat-temporary-file-directory):
Ensure, that the temp directory is local.
* net/tramp-sh.el (tramp-sh-handle-write-region): Let-bind
`temporary-file-directory'.
modified:
lisp/ChangeLog
lisp/net/tramp-compat.el
lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-06-06 13:05:11 +0000
+++ b/lisp/ChangeLog 2012-06-06 13:32:36 +0000
@@ -8,6 +8,12 @@
* files.el (enable-remote-dir-locals): New option.
(hack-dir-local-variables): Use it. (Bug#1933, Bug#6731)
+ * net/tramp-compat.el (tramp-compat-temporary-file-directory):
+ Ensure, that the temp directory is local.
+
+ * net/tramp-sh.el (tramp-sh-handle-write-region): Let-bind
+ `temporary-file-directory'.
+
* progmodes/python.el (python-send-region): Ensure, that the
temporary file is created also in the remote case.
=== modified file 'lisp/net/tramp-compat.el'
--- a/lisp/net/tramp-compat.el 2012-01-19 07:21:25 +0000
+++ b/lisp/net/tramp-compat.el 2012-06-06 13:32:36 +0000
@@ -205,7 +205,9 @@
For Emacs, this is the variable `temporary-file-directory', for XEmacs
this is the function `temp-directory'."
(cond
- ((boundp 'temporary-file-directory) (symbol-value
'temporary-file-directory))
+ ((and (boundp 'temporary-file-directory)
+ (not (file-remote-p (symbol-value 'temporary-file-directory))))
+ (symbol-value 'temporary-file-directory))
((fboundp 'temp-directory) (tramp-compat-funcall 'temp-directory))
((let ((d (getenv "TEMP"))) (and d (file-directory-p d)))
(file-name-as-directory (getenv "TEMP")))
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2012-04-09 13:05:48 +0000
+++ b/lisp/net/tramp-sh.el 2012-06-06 13:32:36 +0000
@@ -3093,22 +3093,25 @@
'write-region
(list start end localname append 'no-message lockname confirm))
- (let ((modes (save-excursion (tramp-default-file-modes filename)))
- ;; We use this to save the value of
- ;; `last-coding-system-used' after writing the tmp
- ;; file. At the end of the function, we set
- ;; `last-coding-system-used' to this saved value. This
- ;; way, any intermediary coding systems used while
- ;; talking to the remote shell or suchlike won't hose
- ;; this variable. This approach was snarfed from
- ;; ange-ftp.el.
- coding-system-used
- ;; Write region into a tmp file. This isn't really
- ;; needed if we use an encoding function, but currently
- ;; we use it always because this makes the logic
- ;; simpler.
- (tmpfile (or tramp-temp-buffer-file-name
- (tramp-compat-make-temp-file filename))))
+ (let* ((modes (save-excursion (tramp-default-file-modes filename)))
+ ;; We use this to save the value of
+ ;; `last-coding-system-used' after writing the tmp
+ ;; file. At the end of the function, we set
+ ;; `last-coding-system-used' to this saved value. This
+ ;; way, any intermediary coding systems used while
+ ;; talking to the remote shell or suchlike won't hose
+ ;; this variable. This approach was snarfed from
+ ;; ange-ftp.el.
+ coding-system-used
+ ;; Write region into a tmp file. This isn't really
+ ;; needed if we use an encoding function, but currently
+ ;; we use it always because this makes the logic
+ ;; simpler. We must also set `temporary-file-directory',
+ ;; because it could point to a remote directory.
+ (temporary-file-directory
+ (tramp-compat-temporary-file-directory))
+ (tmpfile (or tramp-temp-buffer-file-name
+ (tramp-compat-make-temp-file filename))))
;; If `append' is non-nil, we copy the file locally, and let
;; the native `write-region' implementation do the job.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108501: * net/tramp-compat.el (tramp-compat-temporary-file-directory):,
Michael Albinus <=