emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117229: * lisp/net/tramp.el (tramp-call-process): A


From: Michael Albinus
Subject: [Emacs-diffs] trunk r117229: * lisp/net/tramp.el (tramp-call-process): Add traces.
Date: Mon, 02 Jun 2014 09:58:58 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117229
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2014-06-02 11:58:50 +0200
message:
  * lisp/net/tramp.el (tramp-call-process): Add traces.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp.el              tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-02 06:45:11 +0000
+++ b/lisp/ChangeLog    2014-06-02 09:58:50 +0000
@@ -1,3 +1,7 @@
+2014-06-02  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-call-process): Add traces.
+
 2014-06-02  Wilson Snyder  <address@hidden>
 
        Sync with upstream verilog-mode revision 3cd8144.

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2014-04-18 18:57:04 +0000
+++ b/lisp/net/tramp.el 2014-06-02 09:58:50 +0000
@@ -4122,12 +4122,21 @@
 defadvised `call-process' to behave like `process-file'.  The
 Lisp error raised when PROGRAM is nil is trapped also, returning 1.
 Furthermore, traces are written with verbosity of 6."
-  (tramp-message
-   (vector tramp-current-method tramp-current-user tramp-current-host nil nil)
-   6 "`%s %s' %s %s" program (mapconcat 'identity args " ") infile destination)
-  (if (executable-find program)
-      (apply 'call-process program infile destination display args)
-    1))
+  (let ((v (vector tramp-current-method tramp-current-user tramp-current-host
+                  nil nil))
+       (result 1))
+    (tramp-message
+     v 6 "`%s %s' %s %s"
+     program (mapconcat 'identity args " ") infile destination)
+    (when (executable-find program)
+      (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)))))
+    result))
 
 ;;;###tramp-autoload
 (defun tramp-read-passwd (proc &optional prompt)


reply via email to

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