[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 a1c26b1: Some error message improvements in tramp
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-25 a1c26b1: Some error message improvements in tramp-sh.el |
Date: |
Thu, 03 Dec 2015 19:32:00 +0000 |
branch: emacs-25
commit a1c26b19fc779a9d796873fd7415c4f1bf1e7e4f
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
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.
---
lisp/net/tramp-sh.el | 37 +++++++++++++++++++++----------------
1 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index f5ff6a7..a215341 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."
(tramp-find-shell vec)
;; Disable unexpected output.
- (tramp-send-command vec "mesg n; biff n" t)
+ (tramp-send-command vec "mesg n 2>/dev/null; biff n 2>/dev/null" t)
;; IRIX64 bash expands "!" even when in single quotes. This
;; destroys our shell functions, we must disable it. See
@@ -5295,21 +5295,26 @@ Return ATTR."
;; The login shell could return more than just the $PATH
;; string. So we use `tramp-end-of-heredoc' as marker.
(when elt2
- (tramp-send-command-and-read
- vec
- (format
- "%s %s %s 'echo %s \\\"$PATH\\\"'"
- (tramp-get-method-parameter vec 'tramp-remote-shell)
- (mapconcat
- 'identity
- (tramp-get-method-parameter vec 'tramp-remote-shell-login)
- " ")
- (mapconcat
- 'identity
- (tramp-get-method-parameter vec 'tramp-remote-shell-args)
- " ")
- (tramp-shell-quote-argument tramp-end-of-heredoc))
- nil (regexp-quote tramp-end-of-heredoc)))))
+ (or
+ (tramp-send-command-and-read
+ vec
+ (format
+ "%s %s %s 'echo %s \\\"$PATH\\\"'"
+ (tramp-get-method-parameter vec 'tramp-remote-shell)
+ (mapconcat
+ 'identity
+ (tramp-get-method-parameter vec 'tramp-remote-shell-login)
+ " ")
+ (mapconcat
+ 'identity
+ (tramp-get-method-parameter vec 'tramp-remote-shell-args)
+ " ")
+ (tramp-shell-quote-argument tramp-end-of-heredoc))
+ 'noerror (regexp-quote tramp-end-of-heredoc))
+ (progn
+ (tramp-message
+ vec 2 "Could not retrieve `tramp-own-remote-path'")
+ nil)))))
;; Replace place holder `tramp-default-remote-path'.
(when elt1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 a1c26b1: Some error message improvements in tramp-sh.el,
Michael Albinus <=