diff options
| author | Kai Großjohann | 2002-08-07 14:54:05 +0000 |
|---|---|---|
| committer | Kai Großjohann | 2002-08-07 14:54:05 +0000 |
| commit | 685f58582f4da4624507cc88a995ccf4c68ff9b8 (patch) | |
| tree | 62f0f1af38a281980d5e913f4d110f7a5d38425a | |
| parent | 46e3984f37e2038d8c536942574f2363dc187c64 (diff) | |
| download | emacs-685f58582f4da4624507cc88a995ccf4c68ff9b8.tar.gz emacs-685f58582f4da4624507cc88a995ccf4c68ff9b8.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 72 |
2 files changed, 58 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f128498f59e..d091ebb16a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2002-08-07 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | ||
| 2 | |||
| 3 | * net/tramp.el: Version 2.0.12 released. | ||
| 4 | (tramp-find-shell, tramp-open-connection-setup-interactive-shell): | ||
| 5 | Comment out possibly obsolete "echo hello" commands. | ||
| 6 | (tramp-run-real-handler): If operation is | ||
| 7 | `ange-ftp-hook-function', use first arg as the real operation. | ||
| 8 | (tramp-check-ls-commands): Use / instead of \ as directory | ||
| 9 | separator. (Relevant for XEmacs on Windows.) | ||
| 10 | (tramp-maybe-open-connection): Use tramp-wait-for-output when | ||
| 11 | waiting for the "are you awake" command. Use a different string | ||
| 12 | for the "are you awake" command. | ||
| 13 | (tramp-send-command): New optional arg NEVEROPEN means to never | ||
| 14 | invoke tramp-maybe-open-connection. | ||
| 15 | (tramp-maybe-open-connection): Use it | ||
| 16 | |||
| 1 | 2002-08-07 Richard M. Stallman <rms@gnu.org> | 17 | 2002-08-07 Richard M. Stallman <rms@gnu.org> |
| 2 | 18 | ||
| 3 | * warnings.el (warning-prefix-function, warning-series) | 19 | * warnings.el (warning-prefix-function, warning-series) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 18c5e82a68b..16ee2902a6b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -72,7 +72,7 @@ | |||
| 72 | ;; In the Tramp CVS repository, the version numer is auto-frobbed from | 72 | ;; In the Tramp CVS repository, the version numer is auto-frobbed from |
| 73 | ;; the Makefile, so you should edit the top-level Makefile to change | 73 | ;; the Makefile, so you should edit the top-level Makefile to change |
| 74 | ;; the version number. | 74 | ;; the version number. |
| 75 | (defconst tramp-version "2.0.11" | 75 | (defconst tramp-version "2.0.12" |
| 76 | "This version of tramp.") | 76 | "This version of tramp.") |
| 77 | 77 | ||
| 78 | (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" | 78 | (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" |
| @@ -3127,11 +3127,14 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3127 | "Invoke normal file name handler for OPERATION. | 3127 | "Invoke normal file name handler for OPERATION. |
| 3128 | First arg specifies the OPERATION, second arg is a list of arguments to | 3128 | First arg specifies the OPERATION, second arg is a list of arguments to |
| 3129 | pass to the OPERATION." | 3129 | pass to the OPERATION." |
| 3130 | (let ((inhibit-file-name-handlers | 3130 | (let* ((op (if (eq operation 'ange-ftp-hook-function) |
| 3131 | (list 'tramp-file-name-handler | 3131 | (car args) |
| 3132 | (and (eq inhibit-file-name-operation operation) | 3132 | operation)) |
| 3133 | inhibit-file-name-handlers))) | 3133 | (inhibit-file-name-handlers |
| 3134 | (inhibit-file-name-operation operation)) | 3134 | (list 'tramp-file-name-handler |
| 3135 | (and (eq inhibit-file-name-operation op) | ||
| 3136 | inhibit-file-name-handlers))) | ||
| 3137 | (inhibit-file-name-operation op)) | ||
| 3135 | (apply operation args))) | 3138 | (apply operation args))) |
| 3136 | 3139 | ||
| 3137 | ;; Main function. | 3140 | ;; Main function. |
| @@ -3528,14 +3531,15 @@ file exists and nonzero exit status otherwise." | |||
| 3528 | (tramp-wait-for-output) | 3531 | (tramp-wait-for-output) |
| 3529 | (tramp-message | 3532 | (tramp-message |
| 3530 | 10 "Setting remote shell prompt...done") | 3533 | 10 "Setting remote shell prompt...done") |
| 3531 | (tramp-send-command multi-method method user host "echo hello") | 3534 | ;; (tramp-send-command multi-method method user host "echo hello") |
| 3532 | (tramp-message 5 "Waiting for remote `%s' to start up..." shell) | 3535 | ;; (tramp-message 5 "Waiting for remote `%s' to start up..." shell) |
| 3533 | (unless (tramp-wait-for-output 5) | 3536 | ;; (unless (tramp-wait-for-output 5) |
| 3534 | (unless (tramp-wait-for-output 5) | 3537 | ;; (unless (tramp-wait-for-output 5) |
| 3535 | (pop-to-buffer (buffer-name)) | 3538 | ;; (pop-to-buffer (buffer-name)) |
| 3536 | (error "Couldn't start remote `%s', see buffer `%s' for details" | 3539 | ;; (error "Couldn't start remote `%s', see buffer `%s' for details" |
| 3537 | shell (buffer-name)))) | 3540 | ;; shell (buffer-name)))) |
| 3538 | (tramp-message 5 "Waiting for remote `%s' to start up...done" shell)) | 3541 | ;; (tramp-message 5 "Waiting for remote `%s' to start up...done" shell) |
| 3542 | ) | ||
| 3539 | (t (tramp-message 5 "Remote `%s' groks tilde expansion, good" | 3543 | (t (tramp-message 5 "Remote `%s' groks tilde expansion, good" |
| 3540 | (tramp-get-remote-sh multi-method method)))))) | 3544 | (tramp-get-remote-sh multi-method method)))))) |
| 3541 | 3545 | ||
| @@ -3564,7 +3568,8 @@ otherwise." | |||
| 3564 | "Checks whether the given `ls' executable in one of the dirs groks `-n'. | 3568 | "Checks whether the given `ls' executable in one of the dirs groks `-n'. |
| 3565 | Returns nil if none was found, else the command is returned." | 3569 | Returns nil if none was found, else the command is returned." |
| 3566 | (let ((dl dirlist) | 3570 | (let ((dl dirlist) |
| 3567 | (result nil)) | 3571 | (result nil) |
| 3572 | (directory-sep-char ?/)) ;for XEmacs | ||
| 3568 | ;; It would be better to use the CL function `find', but | 3573 | ;; It would be better to use the CL function `find', but |
| 3569 | ;; we don't want run-time dependencies on CL. | 3574 | ;; we don't want run-time dependencies on CL. |
| 3570 | (while (and dl (not result)) | 3575 | (while (and dl (not result)) |
| @@ -4417,16 +4422,17 @@ to set up. METHOD, USER and HOST specify the connection." | |||
| 4417 | tramp-end-of-output | 4422 | tramp-end-of-output |
| 4418 | tramp-rsh-end-of-line)) | 4423 | tramp-rsh-end-of-line)) |
| 4419 | (tramp-wait-for-output) | 4424 | (tramp-wait-for-output) |
| 4420 | (tramp-send-command multi-method method user host "echo hello") | 4425 | ;; (tramp-send-command multi-method method user host "echo hello") |
| 4421 | (tramp-message 9 "Waiting for remote `%s' to come up..." | 4426 | ;; (tramp-message 9 "Waiting for remote `%s' to come up..." |
| 4422 | (tramp-get-remote-sh multi-method method)) | 4427 | ;; (tramp-get-remote-sh multi-method method)) |
| 4423 | (unless (tramp-wait-for-output 5) | 4428 | ;; (unless (tramp-wait-for-output 5) |
| 4424 | (unless (tramp-wait-for-output 5) | 4429 | ;; (unless (tramp-wait-for-output 5) |
| 4425 | (pop-to-buffer (buffer-name)) | 4430 | ;; (pop-to-buffer (buffer-name)) |
| 4426 | (error "Couldn't set remote shell prompt. See buffer `%s' for details" | 4431 | ;; (error "Couldn't set remote shell prompt. See buffer `%s' for details" |
| 4427 | (buffer-name)))) | 4432 | ;; (buffer-name)))) |
| 4428 | (tramp-message 7 "Waiting for remote `%s' to come up...done" | 4433 | ;; (tramp-message 7 "Waiting for remote `%s' to come up...done" |
| 4429 | (tramp-get-remote-sh multi-method method))) | 4434 | ;; (tramp-get-remote-sh multi-method method)) |
| 4435 | ) | ||
| 4430 | 4436 | ||
| 4431 | (defun tramp-post-connection (multi-method method user host) | 4437 | (defun tramp-post-connection (multi-method method user host) |
| 4432 | "Prepare a remote shell before being able to work on it. | 4438 | "Prepare a remote shell before being able to work on it. |
| @@ -4733,8 +4739,9 @@ connection if a previous connection has died for some reason." | |||
| 4733 | (set-buffer (tramp-get-buffer multi-method method user host)) | 4739 | (set-buffer (tramp-get-buffer multi-method method user host)) |
| 4734 | (when (and tramp-last-cmd-time | 4740 | (when (and tramp-last-cmd-time |
| 4735 | (> (tramp-time-diff tramp-last-cmd-time (current-time)) 60)) | 4741 | (> (tramp-time-diff tramp-last-cmd-time (current-time)) 60)) |
| 4736 | (process-send-string p (concat "echo hello" tramp-rsh-end-of-line)) | 4742 | (tramp-send-command |
| 4737 | (unless (accept-process-output p 2) | 4743 | multi-method method user host "echo are you awake" nil t) |
| 4744 | (unless (tramp-wait-for-output 10) | ||
| 4738 | (delete-process p) | 4745 | (delete-process p) |
| 4739 | (setq p nil)) | 4746 | (setq p nil)) |
| 4740 | (erase-buffer))) | 4747 | (erase-buffer))) |
| @@ -4745,11 +4752,15 @@ connection if a previous connection has died for some reason." | |||
| 4745 | multi-method method user host)))) | 4752 | multi-method method user host)))) |
| 4746 | 4753 | ||
| 4747 | (defun tramp-send-command | 4754 | (defun tramp-send-command |
| 4748 | (multi-method method user host command &optional noerase) | 4755 | (multi-method method user host command &optional noerase neveropen) |
| 4749 | "Send the COMMAND to USER at HOST (logged in using METHOD). | 4756 | "Send the COMMAND to USER at HOST (logged in using METHOD). |
| 4750 | Erases temporary buffer before sending the command (unless NOERASE | 4757 | Erases temporary buffer before sending the command (unless NOERASE |
| 4751 | is true)." | 4758 | is true). |
| 4752 | (tramp-maybe-open-connection multi-method method user host) | 4759 | If optional seventh arg NEVEROPEN is non-nil, never try to open the |
| 4760 | connection. This is meant to be used from | ||
| 4761 | `tramp-maybe-open-connection' only." | ||
| 4762 | (or neveropen | ||
| 4763 | (tramp-maybe-open-connection multi-method method user host)) | ||
| 4753 | (setq tramp-last-cmd-time (current-time)) | 4764 | (setq tramp-last-cmd-time (current-time)) |
| 4754 | (when tramp-debug-buffer | 4765 | (when tramp-debug-buffer |
| 4755 | (save-excursion | 4766 | (save-excursion |
| @@ -5662,6 +5673,7 @@ Only works for Bourne-like shells." | |||
| 5662 | tramp-coding-commands | 5673 | tramp-coding-commands |
| 5663 | tramp-actions-before-shell | 5674 | tramp-actions-before-shell |
| 5664 | tramp-multi-actions | 5675 | tramp-multi-actions |
| 5676 | tramp-terminal-type | ||
| 5665 | 5677 | ||
| 5666 | ;; Non-tramp variables of interest | 5678 | ;; Non-tramp variables of interest |
| 5667 | shell-prompt-pattern | 5679 | shell-prompt-pattern |