emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111669: * net/tramp.el (tramp-debug-


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111669: * net/tramp.el (tramp-debug-message): Extend function exclude list.
Date: Sun, 03 Feb 2013 17:49:37 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111669
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sun 2013-02-03 17:49:37 +0100
message:
  * 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'.
modified:
  lisp/ChangeLog
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-03 15:47:12 +0000
+++ b/lisp/ChangeLog    2013-02-03 16:49:37 +0000
@@ -1,3 +1,13 @@
+2013-02-03  Michael Albinus  <address@hidden>
+
+       * 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'.
+
 2013-02-03  Stefan Monnier  <address@hidden>
 
        * progmodes/cperl-mode.el (cperl-mode): Avoid byte-compile warning

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2013-01-31 08:33:03 +0000
+++ b/lisp/net/tramp-sh.el      2013-02-03 16:49:37 +0000
@@ -1330,7 +1330,8 @@
     (let ((f (buffer-file-name))
          coding-system-used)
       (with-parsed-tramp-file-name f nil
-       (let* ((attr (file-attributes f))
+       (let* ((remote-file-name-inhibit-cache t)
+              (attr (file-attributes f))
               ;; '(-1 65535) means file doesn't exists yet.
               (modtime (or (nth 5 attr) '(-1 65535))))
          (when (boundp 'last-coding-system-used)

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-02-02 03:38:21 +0000
+++ b/lisp/net/tramp.el 2013-02-03 16:49:37 +0000
@@ -1391,7 +1391,9 @@
                     (concat
                      "^"
                      (regexp-opt
-                      '("tramp-compat-funcall"
+                      '("tramp-backtrace"
+                        "tramp-compat-condition-case-unless-debug"
+                        "tramp-compat-funcall"
                         "tramp-compat-with-temp-message"
                         "tramp-debug-message"
                         "tramp-error"
@@ -1505,6 +1507,11 @@
             "`M-x tramp-cleanup-this-connection'"))
          (sit-for 30))))))
 
+(defsubst tramp-backtrace (vec-or-proc)
+  "Dump a backtrace into the debug buffer.
+This function is meant for debugging purposes."
+  (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
+
 (defmacro with-parsed-tramp-file-name (filename var &rest body)
   "Parse a Tramp filename and make components available in the body.
 
@@ -3023,13 +3030,15 @@
                  (setq tramp-temp-buffer-file-name local-copy))
 
                ;; We must ensure that `file-coding-system-alist'
-               ;; matches `local-copy'.
+               ;; matches `local-copy'.  We must also use `visit',
+               ;; otherwise there might be an error in the
+               ;; `revert-buffer' function under XEmacs.
                (let ((file-coding-system-alist
                       (tramp-find-file-name-coding-system-alist
                        filename local-copy)))
                  (setq result
                        (insert-file-contents
-                        local-copy nil nil nil replace)))))
+                        local-copy visit nil nil replace)))))
 
          ;; Save exit.
          (progn


reply via email to

[Prev in Thread] Current Thread [Next in Thread]