aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-12-03 20:31:49 +0100
committerMichael Albinus2015-12-03 20:31:49 +0100
commita1c26b19fc779a9d796873fd7415c4f1bf1e7e4f (patch)
tree7c348b8c81f791aef7d1210e8abe5a179acef306
parent0cec548152811f3e650b4f09e5c523f2989fe40e (diff)
downloademacs-a1c26b19fc779a9d796873fd7415c4f1bf1e7e4f.tar.gz
emacs-a1c26b19fc779a9d796873fd7415c4f1bf1e7e4f.zip
Some error message improvements in tramp-sh.el
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Suppress error messages for "mesg" and "biff" calls. (tramp-get-remote-path): Ignore errors when expanding `tramp-own-remote-path'. Raise a warning instead.
-rw-r--r--lisp/net/tramp-sh.el37
1 files changed, 21 insertions, 16 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f5ff6a7adec..a2153415f4d 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4264,7 +4264,7 @@ process to set up. VEC specifies the connection."
4264 (tramp-find-shell vec) 4264 (tramp-find-shell vec)
4265 4265
4266 ;; Disable unexpected output. 4266 ;; Disable unexpected output.
4267 (tramp-send-command vec "mesg n; biff n" t) 4267 (tramp-send-command vec "mesg n 2>/dev/null; biff n 2>/dev/null" t)
4268 4268
4269 ;; IRIX64 bash expands "!" even when in single quotes. This 4269 ;; IRIX64 bash expands "!" even when in single quotes. This
4270 ;; destroys our shell functions, we must disable it. See 4270 ;; destroys our shell functions, we must disable it. See
@@ -5295,21 +5295,26 @@ Return ATTR."
5295 ;; The login shell could return more than just the $PATH 5295 ;; The login shell could return more than just the $PATH
5296 ;; string. So we use `tramp-end-of-heredoc' as marker. 5296 ;; string. So we use `tramp-end-of-heredoc' as marker.
5297 (when elt2 5297 (when elt2
5298 (tramp-send-command-and-read 5298 (or
5299 vec 5299 (tramp-send-command-and-read
5300 (format 5300 vec
5301 "%s %s %s 'echo %s \\\"$PATH\\\"'" 5301 (format
5302 (tramp-get-method-parameter vec 'tramp-remote-shell) 5302 "%s %s %s 'echo %s \\\"$PATH\\\"'"
5303 (mapconcat 5303 (tramp-get-method-parameter vec 'tramp-remote-shell)
5304 'identity 5304 (mapconcat
5305 (tramp-get-method-parameter vec 'tramp-remote-shell-login) 5305 'identity
5306 " ") 5306 (tramp-get-method-parameter vec 'tramp-remote-shell-login)
5307 (mapconcat 5307 " ")
5308 'identity 5308 (mapconcat
5309 (tramp-get-method-parameter vec 'tramp-remote-shell-args) 5309 'identity
5310 " ") 5310 (tramp-get-method-parameter vec 'tramp-remote-shell-args)
5311 (tramp-shell-quote-argument tramp-end-of-heredoc)) 5311 " ")
5312 nil (regexp-quote tramp-end-of-heredoc))))) 5312 (tramp-shell-quote-argument tramp-end-of-heredoc))
5313 'noerror (regexp-quote tramp-end-of-heredoc))
5314 (progn
5315 (tramp-message
5316 vec 2 "Could not retrieve `tramp-own-remote-path'")
5317 nil)))))
5313 5318
5314 ;; Replace place holder `tramp-default-remote-path'. 5319 ;; Replace place holder `tramp-default-remote-path'.
5315 (when elt1 5320 (when elt1