aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/eshell/em-unix.el4
-rw-r--r--lisp/net/tramp-sh.el6
3 files changed, 16 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 735ddd25369..7d7e62e8141 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12013-02-18 Michael Albinus <michael.albinus@gmx.de>
2
3 * eshell/em-unix.el (eshell/su): Require tramp.
4 (eshell/sudo): Require tramp. Remove now unnecessary check.
5
6 * net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
7 `tramp-current-connection' in order to avoid an error when several
8 commands are invoked in a short time in eshell and friends.
9
12013-02-16 Didier Verna <didier@didierverna.net> 102013-02-16 Didier Verna <didier@didierverna.net>
2 11
3 * net/network-stream.el (network-stream-open-starttls): 12 * net/network-stream.el (network-stream-open-starttls):
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 9e061b64504..b387a8ba974 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -1039,6 +1039,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
1039 1039
1040(defun eshell/su (&rest args) 1040(defun eshell/su (&rest args)
1041 "Alias \"su\" to call Tramp." 1041 "Alias \"su\" to call Tramp."
1042 (require 'tramp)
1042 (setq args (eshell-stringify-list (eshell-flatten-list args))) 1043 (setq args (eshell-stringify-list (eshell-flatten-list args)))
1043 (let ((orig-args (copy-tree args))) 1044 (let ((orig-args (copy-tree args)))
1044 (eshell-eval-using-options 1045 (eshell-eval-using-options
@@ -1076,6 +1077,7 @@ Become another USER during a login session.")
1076 1077
1077(defun eshell/sudo (&rest args) 1078(defun eshell/sudo (&rest args)
1078 "Alias \"sudo\" to call Tramp." 1079 "Alias \"sudo\" to call Tramp."
1080 (require 'tramp)
1079 (setq args (eshell-stringify-list (eshell-flatten-list args))) 1081 (setq args (eshell-stringify-list (eshell-flatten-list args)))
1080 (let ((orig-args (copy-tree args))) 1082 (let ((orig-args (copy-tree args)))
1081 (eshell-eval-using-options 1083 (eshell-eval-using-options
@@ -1110,8 +1112,6 @@ Execute a COMMAND as the superuser or another USER.")
1110 (format "%s|sudo:%s@%s:%s" 1112 (format "%s|sudo:%s@%s:%s"
1111 (substring prefix 0 -1) user host dir) 1113 (substring prefix 0 -1) user host dir)
1112 (format "/sudo:%s@%s:%s" user host dir)))) 1114 (format "/sudo:%s@%s:%s" user host dir))))
1113 ;; Ensure, that Tramp has connected to that construct already.
1114 (ignore (file-exists-p default-directory))
1115 (eshell-named-command (car orig-args) (cdr orig-args)))))))) 1115 (eshell-named-command (car orig-args) (cdr orig-args))))))))
1116 1116
1117(put 'eshell/sudo 'eshell-no-numeric-conversions t) 1117(put 'eshell/sudo 'eshell-no-numeric-conversions t)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 2152ba1e270..29a6344734f 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2739,7 +2739,11 @@ the result will be a local, non-Tramp, filename."
2739 (or (null program) tramp-process-connection-type)) 2739 (or (null program) tramp-process-connection-type))
2740 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) 2740 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
2741 (name1 name) 2741 (name1 name)
2742 (i 0)) 2742 (i 0)
2743 ;; We do not want to raise an error when
2744 ;; `start-file-process' has been started several time in
2745 ;; `eshell' and friends.
2746 (tramp-current-connection nil))
2743 2747
2744 (unless buffer 2748 (unless buffer
2745 ;; BUFFER can be nil. We use a temporary buffer. 2749 ;; BUFFER can be nil. We use a temporary buffer.