From c8291a36aaa6f4e7bce388f32bc7f724d826bd8a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 2 Jun 2014 11:58:50 +0200 Subject: [PATCH] * lisp/net/tramp.el (tramp-call-process): Add traces. --- lisp/ChangeLog | 4 ++++ lisp/net/tramp.el | 21 +++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6999abd68c..54ecd84e08b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-06-02 Michael Albinus + + * net/tramp.el (tramp-call-process): Add traces. + 2014-06-02 Wilson Snyder Sync with upstream verilog-mode revision 3cd8144. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6cc8275b327..29a7b95357c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4122,12 +4122,21 @@ This is needed because for some Emacs flavors Tramp has 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) -- 2.39.2