]> git.eshelyaron.com Git - emacs.git/commitdiff
Inhibit `epa-file-handler' in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 25 May 2015 08:44:51 +0000 (10:44 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 25 May 2015 08:44:51 +0000 (10:44 +0200)
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'.

lisp/net/tramp-cmds.el
lisp/net/tramp-sh.el
lisp/net/tramp.el

index 89baaa444a77aea11d00039e3e395b87e51e51a3..fee74eedec2d8156ca6c99658fc2b9d20ce88663 100644 (file)
@@ -158,7 +158,7 @@ This includes password cache, file cache, connection cache, buffers."
   (if arg (insert tramp-version) (message tramp-version)))
 
 ;; Make the "reporter" functionality available for making bug reports about
-;; the package. A most useful piece of code.
+;; the package.  A most useful piece of code.
 
 (autoload 'reporter-submit-bug-report "reporter")
 
index acb97e880b42660743b03578cd6407c384207e52..55ac778858cb21edf72d6c14da76653779409e6e 100644 (file)
@@ -2122,15 +2122,16 @@ FILENAME is the source file, NEWNAME the target file.
 KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
   ;; We must disable multibyte, because binary data shall not be
   ;; converted.  We don't want the target file to be compressed, so we
-  ;; let-bind `jka-compr-inhibit' to t.
-  ;; We remove `tramp-file-name-handler' from
+  ;; let-bind `jka-compr-inhibit' to t.  `epa-file-handler' shall not
+  ;; be called either.  We remove `tramp-file-name-handler' from
   ;; `inhibit-file-name-handlers'; otherwise the file name handler for
   ;; `insert-file-contents' might be deactivated in some corner cases.
   (let ((coding-system-for-read 'binary)
        (coding-system-for-write 'binary)
        (jka-compr-inhibit t)
        (inhibit-file-name-handlers
-        (remq 'tramp-file-name-handler inhibit-file-name-handlers)))
+        (cons epa-file-handler
+              . (remq 'tramp-file-name-handler inhibit-file-name-handlers))))
     (with-temp-file newname
       (set-buffer-multibyte nil)
       (insert-file-contents-literally filename)))
@@ -3205,7 +3206,8 @@ the result will be a local, non-Tramp, file name."
         (if (fboundp 'find-buffer-file-type)
             (symbol-function 'find-buffer-file-type)
           nil))
-       (inhibit-file-name-handlers '(jka-compr-handler image-file-handler))
+       (inhibit-file-name-handlers
+        '(epa-file-handler image-file-handler jka-compr-handler))
        (inhibit-file-name-operation 'insert-file-contents))
     (unwind-protect
        (progn
index 95f54490cac597788fec48b5a508b97b3cdcd1da..22adbd9b474b30071a4d2e32bf52f45faff4e7c0 100644 (file)
@@ -3103,9 +3103,10 @@ User is always nil."
                      (setq tramp-temp-buffer-file-name nil beg nil end nil))
 
                    ;; `insert-file-contents-literally' takes care to
-                   ;; avoid calling jka-compr.  By let-binding
-                   ;; `inhibit-file-name-operation', we propagate that
-                   ;; care to the `file-local-copy' operation.
+                   ;; avoid calling jka-compr.el and epa.el.  By
+                   ;; let-binding `inhibit-file-name-operation', we
+                   ;; propagate that care to the `file-local-copy'
+                   ;; operation.
                    (setq local-copy
                          (let ((inhibit-file-name-operation
                                 (when (eq inhibit-file-name-operation