emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111277: * eshell/em-unix.el (eshe


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111277: * eshell/em-unix.el (eshell/su): Require tramp.
Date: Mon, 18 Feb 2013 20:13:21 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111277
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Mon 2013-02-18 20:13:21 +0100
message:
  * eshell/em-unix.el (eshell/su): Require tramp.
  (eshell/sudo): Require tramp.  Remove now unnecessary check.
  
  * net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
  `tramp-current-connection' in order to avoid an error when several
  commands are invoked in a short time in eshell and friends.
modified:
  lisp/ChangeLog
  lisp/eshell/em-unix.el
  lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-16 02:45:24 +0000
+++ b/lisp/ChangeLog    2013-02-18 19:13:21 +0000
@@ -1,3 +1,12 @@
+2013-02-18  Michael Albinus  <address@hidden>
+
+       * eshell/em-unix.el (eshell/su): Require tramp.
+       (eshell/sudo): Require tramp.  Remove now unnecessary check.
+
+       * net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
+       `tramp-current-connection' in order to avoid an error when several
+       commands are invoked in a short time in eshell and friends.
+
 2013-02-16  Didier Verna  <address@hidden>
 
        * net/network-stream.el (network-stream-open-starttls):

=== modified file 'lisp/eshell/em-unix.el'
--- a/lisp/eshell/em-unix.el    2013-01-01 09:11:05 +0000
+++ b/lisp/eshell/em-unix.el    2013-02-18 19:13:21 +0000
@@ -1039,6 +1039,7 @@
 
 (defun eshell/su (&rest args)
   "Alias \"su\" to call Tramp."
+  (require 'tramp)
   (setq args (eshell-stringify-list (eshell-flatten-list args)))
   (let ((orig-args (copy-tree args)))
     (eshell-eval-using-options
@@ -1076,6 +1077,7 @@
 
 (defun eshell/sudo (&rest args)
   "Alias \"sudo\" to call Tramp."
+  (require 'tramp)
   (setq args (eshell-stringify-list (eshell-flatten-list args)))
   (let ((orig-args (copy-tree args)))
     (eshell-eval-using-options
@@ -1110,8 +1112,6 @@
                          (format "%s|sudo:address@hidden:%s"
                                  (substring prefix 0 -1) user host dir)
                        (format "/sudo:address@hidden:%s" user host dir))))
-               ;; Ensure, that Tramp has connected to that construct already.
-               (ignore (file-exists-p default-directory))
                (eshell-named-command (car orig-args) (cdr orig-args))))))))
 
 (put 'eshell/sudo 'eshell-no-numeric-conversions t)

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2013-01-04 09:41:23 +0000
+++ b/lisp/net/tramp-sh.el      2013-02-18 19:13:21 +0000
@@ -2739,7 +2739,11 @@
           (or (null program) tramp-process-connection-type))
          (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
          (name1 name)
-         (i 0))
+         (i 0)
+         ;; We do not want to raise an error when
+         ;; `start-file-process' has been started several time in
+         ;; `eshell' and friends.
+         (tramp-current-connection nil))
 
       (unless buffer
        ;; BUFFER can be nil.  We use a temporary buffer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]