diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2012-09-02 11:57:19 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2012-09-02 11:57:19 +0200 |
commit | 73406194024fcb6877db0618300b63916ebf466d (patch) | |
tree | d2aef45b1a57bc0ee06222ee819028bdbdaa4edb /lisp/eshell/em-unix.el | |
parent | 63dd1c6fa45357d312e1d3076e15adacf5ed6291 (diff) | |
download | emacs-73406194024fcb6877db0618300b63916ebf466d.tar.gz |
* eshell/em-unix.el (eshell/sudo): When we have an ad-hoc
remote definition of `default-directory', ensure we can connect.
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r-- | lisp/eshell/em-unix.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 35f7a0a9e3d..58402e37508 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1110,6 +1110,8 @@ Execute a COMMAND as the superuser or another USER.") (format "%s|sudo:%s@%s:%s" (substring prefix 0 -1) user host dir) (format "/sudo:%s@%s:%s" user host dir)))) + ;; Ensure, that Tramp has connected to that construct already. + (file-exists-p default-directory) (eshell-named-command (car orig-args) (cdr orig-args)))))))) (put 'eshell/sudo 'eshell-no-numeric-conversions t) |