Mercurial > emacs
changeset 46835:df25ef3d3237
Version 2.0.12 released.
(tramp-find-shell, tramp-open-connection-setup-interactive-shell):
Comment out possibly obsolete "echo hello" commands.
(tramp-run-real-handler): If operation is
`ange-ftp-hook-function', use first arg as the real operation.
(tramp-check-ls-commands): Use / instead of \ as directory
separator. (Relevant for XEmacs on Windows.)
(tramp-maybe-open-connection): Use tramp-wait-for-output when
waiting for the "are you awake" command. Use a different string
for the "are you awake" command.
(tramp-send-command): New optional arg NEVEROPEN means to never
invoke tramp-maybe-open-connection.
(tramp-maybe-open-connection): Use it
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Wed, 07 Aug 2002 14:54:05 +0000 |
parents | c8a846fe7940 |
children | cd975daf6365 |
files | lisp/ChangeLog lisp/net/tramp.el |
diffstat | 2 files changed, 58 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Aug 07 14:38:02 2002 +0000 +++ b/lisp/ChangeLog Wed Aug 07 14:54:05 2002 +0000 @@ -1,3 +1,19 @@ +2002-08-07 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> + + * net/tramp.el: Version 2.0.12 released. + (tramp-find-shell, tramp-open-connection-setup-interactive-shell): + Comment out possibly obsolete "echo hello" commands. + (tramp-run-real-handler): If operation is + `ange-ftp-hook-function', use first arg as the real operation. + (tramp-check-ls-commands): Use / instead of \ as directory + separator. (Relevant for XEmacs on Windows.) + (tramp-maybe-open-connection): Use tramp-wait-for-output when + waiting for the "are you awake" command. Use a different string + for the "are you awake" command. + (tramp-send-command): New optional arg NEVEROPEN means to never + invoke tramp-maybe-open-connection. + (tramp-maybe-open-connection): Use it + 2002-08-07 Richard M. Stallman <rms@gnu.org> * warnings.el (warning-prefix-function, warning-series)
--- a/lisp/net/tramp.el Wed Aug 07 14:38:02 2002 +0000 +++ b/lisp/net/tramp.el Wed Aug 07 14:54:05 2002 +0000 @@ -72,7 +72,7 @@ ;; In the Tramp CVS repository, the version numer is auto-frobbed from ;; the Makefile, so you should edit the top-level Makefile to change ;; the version number. -(defconst tramp-version "2.0.11" +(defconst tramp-version "2.0.12" "This version of tramp.") (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" @@ -3127,11 +3127,14 @@ "Invoke normal file name handler for OPERATION. First arg specifies the OPERATION, second arg is a list of arguments to pass to the OPERATION." - (let ((inhibit-file-name-handlers - (list 'tramp-file-name-handler - (and (eq inhibit-file-name-operation operation) - inhibit-file-name-handlers))) - (inhibit-file-name-operation operation)) + (let* ((op (if (eq operation 'ange-ftp-hook-function) + (car args) + operation)) + (inhibit-file-name-handlers + (list 'tramp-file-name-handler + (and (eq inhibit-file-name-operation op) + inhibit-file-name-handlers))) + (inhibit-file-name-operation op)) (apply operation args))) ;; Main function. @@ -3528,14 +3531,15 @@ (tramp-wait-for-output) (tramp-message 10 "Setting remote shell prompt...done") - (tramp-send-command multi-method method user host "echo hello") - (tramp-message 5 "Waiting for remote `%s' to start up..." shell) - (unless (tramp-wait-for-output 5) - (unless (tramp-wait-for-output 5) - (pop-to-buffer (buffer-name)) - (error "Couldn't start remote `%s', see buffer `%s' for details" - shell (buffer-name)))) - (tramp-message 5 "Waiting for remote `%s' to start up...done" shell)) +;; (tramp-send-command multi-method method user host "echo hello") +;; (tramp-message 5 "Waiting for remote `%s' to start up..." shell) +;; (unless (tramp-wait-for-output 5) +;; (unless (tramp-wait-for-output 5) +;; (pop-to-buffer (buffer-name)) +;; (error "Couldn't start remote `%s', see buffer `%s' for details" +;; shell (buffer-name)))) +;; (tramp-message 5 "Waiting for remote `%s' to start up...done" shell) + ) (t (tramp-message 5 "Remote `%s' groks tilde expansion, good" (tramp-get-remote-sh multi-method method)))))) @@ -3564,7 +3568,8 @@ "Checks whether the given `ls' executable in one of the dirs groks `-n'. Returns nil if none was found, else the command is returned." (let ((dl dirlist) - (result nil)) + (result nil) + (directory-sep-char ?/)) ;for XEmacs ;; It would be better to use the CL function `find', but ;; we don't want run-time dependencies on CL. (while (and dl (not result)) @@ -4417,16 +4422,17 @@ tramp-end-of-output tramp-rsh-end-of-line)) (tramp-wait-for-output) - (tramp-send-command multi-method method user host "echo hello") - (tramp-message 9 "Waiting for remote `%s' to come up..." - (tramp-get-remote-sh multi-method method)) - (unless (tramp-wait-for-output 5) - (unless (tramp-wait-for-output 5) - (pop-to-buffer (buffer-name)) - (error "Couldn't set remote shell prompt. See buffer `%s' for details" - (buffer-name)))) - (tramp-message 7 "Waiting for remote `%s' to come up...done" - (tramp-get-remote-sh multi-method method))) +;; (tramp-send-command multi-method method user host "echo hello") +;; (tramp-message 9 "Waiting for remote `%s' to come up..." +;; (tramp-get-remote-sh multi-method method)) +;; (unless (tramp-wait-for-output 5) +;; (unless (tramp-wait-for-output 5) +;; (pop-to-buffer (buffer-name)) +;; (error "Couldn't set remote shell prompt. See buffer `%s' for details" +;; (buffer-name)))) +;; (tramp-message 7 "Waiting for remote `%s' to come up...done" +;; (tramp-get-remote-sh multi-method method)) + ) (defun tramp-post-connection (multi-method method user host) "Prepare a remote shell before being able to work on it. @@ -4733,8 +4739,9 @@ (set-buffer (tramp-get-buffer multi-method method user host)) (when (and tramp-last-cmd-time (> (tramp-time-diff tramp-last-cmd-time (current-time)) 60)) - (process-send-string p (concat "echo hello" tramp-rsh-end-of-line)) - (unless (accept-process-output p 2) + (tramp-send-command + multi-method method user host "echo are you awake" nil t) + (unless (tramp-wait-for-output 10) (delete-process p) (setq p nil)) (erase-buffer))) @@ -4745,11 +4752,15 @@ multi-method method user host)))) (defun tramp-send-command - (multi-method method user host command &optional noerase) + (multi-method method user host command &optional noerase neveropen) "Send the COMMAND to USER at HOST (logged in using METHOD). Erases temporary buffer before sending the command (unless NOERASE -is true)." - (tramp-maybe-open-connection multi-method method user host) +is true). +If optional seventh arg NEVEROPEN is non-nil, never try to open the +connection. This is meant to be used from +`tramp-maybe-open-connection' only." + (or neveropen + (tramp-maybe-open-connection multi-method method user host)) (setq tramp-last-cmd-time (current-time)) (when tramp-debug-buffer (save-excursion @@ -5662,6 +5673,7 @@ tramp-coding-commands tramp-actions-before-shell tramp-multi-actions + tramp-terminal-type ;; Non-tramp variables of interest shell-prompt-pattern