]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (with-tramp-progress-reporter, tramp-call-process):
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 2 Jun 2014 13:51:35 +0000 (15:51 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 2 Jun 2014 13:51:35 +0000 (15:51 +0200)
Add traces.

lisp/ChangeLog
lisp/net/tramp.el

index 54ecd84e08bcd5eebc623028979590aebed9dc39..10de84b3c4131250331f892f9b31ad816103c475 100644 (file)
@@ -1,6 +1,7 @@
 2014-06-02  Michael Albinus  <michael.albinus@gmx.de>
 
-       * net/tramp.el (tramp-call-process): Add traces.
+       * net/tramp.el (with-tramp-progress-reporter, tramp-call-process):
+       Add traces.
 
 2014-06-02  Wilson Snyder  <wsnyder@wsnyder.org>
 
index 5164c4b32bb5a76471610495206ec7deacd1db9c..9be0cbe10a97eff3055f1055c8068aa3b55f410b 100644 (file)
@@ -1676,7 +1676,8 @@ without a visible progress reporter."
            (prog1 (progn ,@body) (setq cookie "done"))
          ;; Stop progress reporter.
          (if tm (tramp-compat-funcall 'cancel-timer tm))
-         (tramp-message ,vec ,level "%s...%s" ,message cookie)))))
+         (tramp-message ,vec ,level "%s...%s" ,message cookie)
+        (when (string-equal "failed" cookie) (tramp-backtrace ,vec))))))
 
 (tramp-compat-font-lock-add-keywords
  'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>"))
@@ -4128,13 +4129,17 @@ Furthermore, traces are written with verbosity of 6."
     (tramp-message
      v 6 "`%s %s' %s %s"
      program (mapconcat 'identity args " ") infile destination)
-    (with-temp-buffer
-      (setq result
-           (apply
-            'call-process program infile (or destination t) display args))
-      (with-current-buffer
-         (if (bufferp destination) destination (current-buffer))
-       (tramp-message v 6 "%d\n%s" result (buffer-string))))
+    (condition-case err
+       (with-temp-buffer
+         (setq result
+               (apply
+                'call-process program infile (or destination t) display args))
+         (with-current-buffer
+             (if (bufferp destination) destination (current-buffer))
+           (tramp-message v 6 "%d\n%s" result (buffer-string))))
+      (error
+       (setq result 1)
+       (tramp-message v 6 "%d\n%s" result (error-message-string err))))
     result))
 
 ;;;###tramp-autoload