[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117666: * net/tramp-sh.el (tramp-do-copy-or-rena
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-24 r117666: * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Don't use |
Date: |
Tue, 04 Nov 2014 09:03:02 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117666
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18751
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-11-04 10:02:56 +0100
message:
* net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Don't use
a local copy; setting `inhibit-file-name-handlers' proper might be
more performant.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-11-04 07:07:04 +0000
+++ b/lisp/ChangeLog 2014-11-04 09:02:56 +0000
@@ -1,3 +1,9 @@
+2014-11-04 Michael Albinus <address@hidden>
+
+ * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Don't use
+ a local copy; setting `inhibit-file-name-handlers' proper might be
+ more performant. (Bug#18751)
+
2014-11-04 Glenn Morris <address@hidden>
* mail/emacsbug.el (report-emacs-bug): No longer include
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2014-11-03 14:29:51 +0000
+++ b/lisp/net/tramp-sh.el 2014-11-04 09:02:56 +0000
@@ -2061,15 +2061,16 @@
KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
(with-temp-buffer
;; We must disable multibyte, because binary data shall not be
- ;; converted. `insert-file-contents-literally' does not support
- ;; file name handlers for GNU Emacs; we must create a local copy
- ;; therefore.
+ ;; converted. 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.
(set-buffer-multibyte nil)
(let ((coding-system-for-read 'binary)
(jka-compr-inhibit t)
- (tmpfile (file-local-copy filename)))
- (insert-file-contents-literally (or tmpfile filename))
- (when tmpfile (delete-file tmpfile)))
+ (inhibit-file-name-handlers
+ (remq 'tramp-file-name-handler inhibit-file-name-handlers)))
+ (insert-file-contents-literally filename))
;; We don't want the target file to be compressed, so we let-bind
;; `jka-compr-inhibit' to t.
(let ((coding-system-for-write 'binary)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117666: * net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Don't use,
Michael Albinus <=