aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2013-02-03 17:49:37 +0100
committerMichael Albinus2013-02-03 17:49:37 +0100
commit5870b2b1d3dbb3e9322b4cf01136af860cf49763 (patch)
tree4b8eee310715480abd333ddcf3a4e1814f6d7ed6
parent37a56656369c5c60f1eb5de14b6f693dff0027a6 (diff)
downloademacs-5870b2b1d3dbb3e9322b4cf01136af860cf49763.tar.gz
emacs-5870b2b1d3dbb3e9322b4cf01136af860cf49763.zip
* net/tramp.el (tramp-debug-message): Extend function exclude list.
(tramp-backtrace): New defun. (tramp-handle-insert-file-contents): Use `visit' when inserting the local copy. * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use `remote-file-name-inhibit-cache'.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/net/tramp-sh.el3
-rw-r--r--lisp/net/tramp.el15
3 files changed, 24 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d0c1ae7c5e7..b676835bfef 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12013-02-03 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-debug-message): Extend function exclude list.
4 (tramp-backtrace): New defun.
5 (tramp-handle-insert-file-contents): Use `visit' when inserting
6 the local copy.
7
8 * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use
9 `remote-file-name-inhibit-cache'.
10
12013-02-03 Stefan Monnier <monnier@iro.umontreal.ca> 112013-02-03 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile warning 13 * progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile warning
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 345da7b958f..bfa145ac780 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1330,7 +1330,8 @@ target of the symlink differ."
1330 (let ((f (buffer-file-name)) 1330 (let ((f (buffer-file-name))
1331 coding-system-used) 1331 coding-system-used)
1332 (with-parsed-tramp-file-name f nil 1332 (with-parsed-tramp-file-name f nil
1333 (let* ((attr (file-attributes f)) 1333 (let* ((remote-file-name-inhibit-cache t)
1334 (attr (file-attributes f))
1334 ;; '(-1 65535) means file doesn't exists yet. 1335 ;; '(-1 65535) means file doesn't exists yet.
1335 (modtime (or (nth 5 attr) '(-1 65535)))) 1336 (modtime (or (nth 5 attr) '(-1 65535))))
1336 (when (boundp 'last-coding-system-used) 1337 (when (boundp 'last-coding-system-used)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1dee9e89676..7743e10c8d4 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1391,7 +1391,9 @@ ARGS to actually emit the message (if applicable)."
1391 (concat 1391 (concat
1392 "^" 1392 "^"
1393 (regexp-opt 1393 (regexp-opt
1394 '("tramp-compat-funcall" 1394 '("tramp-backtrace"
1395 "tramp-compat-condition-case-unless-debug"
1396 "tramp-compat-funcall"
1395 "tramp-compat-with-temp-message" 1397 "tramp-compat-with-temp-message"
1396 "tramp-debug-message" 1398 "tramp-debug-message"
1397 "tramp-error" 1399 "tramp-error"
@@ -1505,6 +1507,11 @@ an input event arrives. The other arguments are passed to `tramp-error'."
1505 "`M-x tramp-cleanup-this-connection'")) 1507 "`M-x tramp-cleanup-this-connection'"))
1506 (sit-for 30)))))) 1508 (sit-for 30))))))
1507 1509
1510(defsubst tramp-backtrace (vec-or-proc)
1511 "Dump a backtrace into the debug buffer.
1512This function is meant for debugging purposes."
1513 (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
1514
1508(defmacro with-parsed-tramp-file-name (filename var &rest body) 1515(defmacro with-parsed-tramp-file-name (filename var &rest body)
1509 "Parse a Tramp filename and make components available in the body. 1516 "Parse a Tramp filename and make components available in the body.
1510 1517
@@ -3023,13 +3030,15 @@ User is always nil."
3023 (setq tramp-temp-buffer-file-name local-copy)) 3030 (setq tramp-temp-buffer-file-name local-copy))
3024 3031
3025 ;; We must ensure that `file-coding-system-alist' 3032 ;; We must ensure that `file-coding-system-alist'
3026 ;; matches `local-copy'. 3033 ;; matches `local-copy'. We must also use `visit',
3034 ;; otherwise there might be an error in the
3035 ;; `revert-buffer' function under XEmacs.
3027 (let ((file-coding-system-alist 3036 (let ((file-coding-system-alist
3028 (tramp-find-file-name-coding-system-alist 3037 (tramp-find-file-name-coding-system-alist
3029 filename local-copy))) 3038 filename local-copy)))
3030 (setq result 3039 (setq result
3031 (insert-file-contents 3040 (insert-file-contents
3032 local-copy nil nil nil replace))))) 3041 local-copy visit nil nil replace)))))
3033 3042
3034 ;; Save exit. 3043 ;; Save exit.
3035 (progn 3044 (progn