aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-05-25 10:44:51 +0200
committerMichael Albinus2015-05-25 10:44:51 +0200
commit89035e247591c8d688fce922b7079881aa110f33 (patch)
tree560cc60539d856c89670c667f4179e707d0dd596
parentdde09cdbce0239bba0248a8ed5c1f4d85c5e8476 (diff)
downloademacs-89035e247591c8d688fce922b7079881aa110f33.tar.gz
emacs-89035e247591c8d688fce922b7079881aa110f33.zip
Inhibit `epa-file-handler' in Tramp
Fixes: debbugs:20634 * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-insert-file-contents-literally): Inhibit also `epa-file-handler'.
-rw-r--r--lisp/net/tramp-cmds.el2
-rw-r--r--lisp/net/tramp-sh.el10
-rw-r--r--lisp/net/tramp.el7
3 files changed, 11 insertions, 8 deletions
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 89baaa444a7..fee74eedec2 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -158,7 +158,7 @@ This includes password cache, file cache, connection cache, buffers."
158 (if arg (insert tramp-version) (message tramp-version))) 158 (if arg (insert tramp-version) (message tramp-version)))
159 159
160;; Make the "reporter" functionality available for making bug reports about 160;; Make the "reporter" functionality available for making bug reports about
161;; the package. A most useful piece of code. 161;; the package. A most useful piece of code.
162 162
163(autoload 'reporter-submit-bug-report "reporter") 163(autoload 'reporter-submit-bug-report "reporter")
164 164
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index acb97e880b4..55ac778858c 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2122,15 +2122,16 @@ FILENAME is the source file, NEWNAME the target file.
2122KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." 2122KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
2123 ;; We must disable multibyte, because binary data shall not be 2123 ;; We must disable multibyte, because binary data shall not be
2124 ;; converted. We don't want the target file to be compressed, so we 2124 ;; converted. We don't want the target file to be compressed, so we
2125 ;; let-bind `jka-compr-inhibit' to t. 2125 ;; let-bind `jka-compr-inhibit' to t. `epa-file-handler' shall not
2126 ;; We remove `tramp-file-name-handler' from 2126 ;; be called either. We remove `tramp-file-name-handler' from
2127 ;; `inhibit-file-name-handlers'; otherwise the file name handler for 2127 ;; `inhibit-file-name-handlers'; otherwise the file name handler for
2128 ;; `insert-file-contents' might be deactivated in some corner cases. 2128 ;; `insert-file-contents' might be deactivated in some corner cases.
2129 (let ((coding-system-for-read 'binary) 2129 (let ((coding-system-for-read 'binary)
2130 (coding-system-for-write 'binary) 2130 (coding-system-for-write 'binary)
2131 (jka-compr-inhibit t) 2131 (jka-compr-inhibit t)
2132 (inhibit-file-name-handlers 2132 (inhibit-file-name-handlers
2133 (remq 'tramp-file-name-handler inhibit-file-name-handlers))) 2133 (cons epa-file-handler
2134 . (remq 'tramp-file-name-handler inhibit-file-name-handlers))))
2134 (with-temp-file newname 2135 (with-temp-file newname
2135 (set-buffer-multibyte nil) 2136 (set-buffer-multibyte nil)
2136 (insert-file-contents-literally filename))) 2137 (insert-file-contents-literally filename)))
@@ -3205,7 +3206,8 @@ the result will be a local, non-Tramp, file name."
3205 (if (fboundp 'find-buffer-file-type) 3206 (if (fboundp 'find-buffer-file-type)
3206 (symbol-function 'find-buffer-file-type) 3207 (symbol-function 'find-buffer-file-type)
3207 nil)) 3208 nil))
3208 (inhibit-file-name-handlers '(jka-compr-handler image-file-handler)) 3209 (inhibit-file-name-handlers
3210 '(epa-file-handler image-file-handler jka-compr-handler))
3209 (inhibit-file-name-operation 'insert-file-contents)) 3211 (inhibit-file-name-operation 'insert-file-contents))
3210 (unwind-protect 3212 (unwind-protect
3211 (progn 3213 (progn
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 95f54490cac..22adbd9b474 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3103,9 +3103,10 @@ User is always nil."
3103 (setq tramp-temp-buffer-file-name nil beg nil end nil)) 3103 (setq tramp-temp-buffer-file-name nil beg nil end nil))
3104 3104
3105 ;; `insert-file-contents-literally' takes care to 3105 ;; `insert-file-contents-literally' takes care to
3106 ;; avoid calling jka-compr. By let-binding 3106 ;; avoid calling jka-compr.el and epa.el. By
3107 ;; `inhibit-file-name-operation', we propagate that 3107 ;; let-binding `inhibit-file-name-operation', we
3108 ;; care to the `file-local-copy' operation. 3108 ;; propagate that care to the `file-local-copy'
3109 ;; operation.
3109 (setq local-copy 3110 (setq local-copy
3110 (let ((inhibit-file-name-operation 3111 (let ((inhibit-file-name-operation
3111 (when (eq inhibit-file-name-operation 3112 (when (eq inhibit-file-name-operation