Mercurial > emacs
changeset 108702:a0b236a315d5
* net/tramp.el (tramp-methods): Add `tramp-async-args' attribute
where appropriate.
(tramp-maybe-open-connection): Use it.
author | Michael Albinus <albinus@detlef> |
---|---|
date | Wed, 19 May 2010 20:56:18 +0200 |
parents | 126aa20e97d5 |
children | 665253a7d3f6 |
files | lisp/ChangeLog lisp/net/tramp.el |
diffstat | 2 files changed, 32 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed May 19 20:16:07 2010 +0300 +++ b/lisp/ChangeLog Wed May 19 20:56:18 2010 +0200 @@ -1,3 +1,9 @@ +2010-05-19 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-methods): Add `tramp-async-args' attribute + where appropriate. + (tramp-maybe-open-connection): Use it. + 2010-05-19 Eli Zaretskii <eliz@gnu.org> * simple.el (move-end-of-line): Make sure we are at line beginning
--- a/lisp/net/tramp.el Wed May 19 20:16:07 2010 +0300 +++ b/lisp/net/tramp.el Wed May 19 20:56:18 2010 +0200 @@ -334,6 +334,7 @@ ("scp" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") (tramp-copy-args (("-P" "%p") ("-p" "%k") @@ -349,6 +350,7 @@ ("scp1" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-1" "-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") (tramp-copy-args (("-1") ("-P" "%p") ("-p" "%k") @@ -364,6 +366,7 @@ ("scp2" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-2" "-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") (tramp-copy-args (("-2") ("-P" "%p") ("-p" "%k") @@ -399,6 +402,7 @@ ("sftp" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "sftp") (tramp-copy-args nil) @@ -407,6 +411,7 @@ ("rsync" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "rsync") (tramp-copy-args (("-e" "ssh") ("-t" "%k") ("-r"))) @@ -420,6 +425,7 @@ ("-o" "ControlPath=%t.%%r@%%h:%%p") ("-o" "ControlMaster=yes") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "rsync") (tramp-copy-args (("-t" "%k") ("-r"))) @@ -449,6 +455,7 @@ ("ssh" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) @@ -462,6 +469,7 @@ ("ssh1" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-1" "-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) @@ -475,6 +483,7 @@ ("ssh2" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-2" "-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) @@ -489,6 +498,7 @@ (tramp-login-program "ssh1") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) @@ -539,6 +549,7 @@ ("-o" "ControlPath=%t.%%r@%%h:%%p") ("-o" "ControlMaster=yes") ("-e" "none"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") @@ -554,6 +565,7 @@ ("scpx" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none" "-t" "-t" "/bin/sh"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") (tramp-copy-args (("-p" "%k"))) @@ -567,6 +579,7 @@ ("sshx" (tramp-login-program "ssh") (tramp-login-args (("%h") ("-l" "%u") ("-p" "%p") ("-e" "none" "-t" "-t" "/bin/sh"))) + (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program nil) (tramp-copy-args nil) @@ -672,6 +685,11 @@ \"%t\" is replaced by the temporary file name produced with `tramp-make-tramp-temp-file'. \"%k\" indicates the keep-date parameter of a program, if exists. + * `tramp-async-args' + When an asynchronous process is started, we know already that + the connection works. Therefore, we can pass additional + parameters to suppress diagnostic messages, in order not to + tamper the process output. * `tramp-copy-program' This specifies the name of the program to use for remotely copying the file; this might be the absolute filename of rcp or the name of @@ -7380,6 +7398,7 @@ connection if a previous connection has died for some reason." (catch 'uname-changed (let ((p (tramp-get-connection-process vec)) + (process-name (tramp-get-connection-property vec "process-name" nil)) (process-environment (copy-sequence process-environment))) ;; If too much time has passed since last command was sent, look @@ -7439,8 +7458,7 @@ (p (let ((default-directory (tramp-compat-temporary-file-directory))) (start-process - (or (tramp-get-connection-property vec "process-name" nil) - (tramp-buffer-name vec)) + (or process-name (tramp-buffer-name vec)) (tramp-get-connection-buffer vec) tramp-encoding-shell)))) @@ -7464,6 +7482,8 @@ (tramp-get-method-parameter l-method 'tramp-login-program)) (login-args (tramp-get-method-parameter l-method 'tramp-login-args)) + (async-args + (tramp-get-method-parameter l-method 'tramp-async-args)) (gw-args (tramp-get-method-parameter l-method 'tramp-gw-args)) (gw (tramp-get-file-property hop "" "gateway" nil)) @@ -7485,6 +7505,10 @@ (tramp-compat-temporary-file-directory))))) spec) + ;; Add arguments for asynchrononous processes. + (when (and process-name async-args) + (setq login-args (append login-args async-args))) + ;; Add gateway arguments if necessary. (when (and gw gw-args) (setq login-args (append login-args gw-args)))