aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp.el19
2 files changed, 20 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 21fc108c895..379f2731ac5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12008-05-14 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-echo-mark): Update docstring.
4 (tramp-echo-mark-marker): New defconst.
5 (tramp-check-for-regexp): Use it.
6
12008-05-14 Eric S. Raymond <esr@snark.thyrsus.com> 72008-05-14 Eric S. Raymond <esr@snark.thyrsus.com>
2 8
3 * vc.el (vc-deduce-fileset): Do the right thing when visting a 9 * vc.el (vc-deduce-fileset): Do the right thing when visting a
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 145cbb18581..9894c27a839 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -858,15 +858,18 @@ the info pages.")
858 (tramp-set-completion-function 858 (tramp-set-completion-function
859 "fcp" tramp-completion-function-alist-ssh))) 859 "fcp" tramp-completion-function-alist-ssh)))
860 860
861(defconst tramp-echo-mark-marker "_echo"
862 "String marker to surround echoed commands.")
863
861(defconst tramp-echo-mark "_echo\b\b\b\b\b" 864(defconst tramp-echo-mark "_echo\b\b\b\b\b"
862 "String mark to be transmitted around shell commands. 865 "String mark to be transmitted around shell commands.
863Used to separate their echo from the output they produce. This 866Used to separate their echo from the output they produce. This
864will only be used if we cannot disable remote echo via stty. 867will only be used if we cannot disable remote echo via stty.
865This string must have no effect on the remote shell except for 868This string must have no effect on the remote shell except for
866producing some echo which can later be detected by 869producing some echo which can later be detected by
867`tramp-echoed-echo-mark-regexp'. Using some characters followed 870`tramp-echoed-echo-mark-regexp'. Using `tramp-echo-mark-marker',
868by an equal number of backspaces to erase them will usually 871followed by an equal number of backspaces to erase them will
869suffice.") 872usually suffice.")
870 873
871(defconst tramp-echoed-echo-mark-regexp "_echo\\(\b\\( \b\\)?\\)\\{5\\}" 874(defconst tramp-echoed-echo-mark-regexp "_echo\\(\b\\( \b\\)?\\)\\{5\\}"
872 "Regexp which matches `tramp-echo-mark' as it gets echoed by 875 "Regexp which matches `tramp-echo-mark' as it gets echoed by
@@ -5644,6 +5647,7 @@ for process communication also."
5644Erase echoed commands if exists." 5647Erase echoed commands if exists."
5645 (with-current-buffer (process-buffer proc) 5648 (with-current-buffer (process-buffer proc)
5646 (goto-char (point-min)) 5649 (goto-char (point-min))
5650
5647 ;; Check whether we need to remove echo output. 5651 ;; Check whether we need to remove echo output.
5648 (when (and (tramp-get-connection-property proc "check-remote-echo" nil) 5652 (when (and (tramp-get-connection-property proc "check-remote-echo" nil)
5649 (re-search-forward tramp-echoed-echo-mark-regexp nil t)) 5653 (re-search-forward tramp-echoed-echo-mark-regexp nil t))
@@ -5655,8 +5659,13 @@ Erase echoed commands if exists."
5655 (forward-line) 5659 (forward-line)
5656 (delete-region begin (point)) 5660 (delete-region begin (point))
5657 (goto-char (point-min))))) 5661 (goto-char (point-min)))))
5658 ;; No echo to be handled, now we can look for the regexp. 5662
5659 (when (not (tramp-get-connection-property proc "check-remote-echo" nil)) 5663 (when (or
5664 ;; No echo to be handled, now we can look for the regexp.
5665 (not (tramp-get-connection-property proc "check-remote-echo" nil))
5666 ;; Sometimes the echo is invisible.
5667 (not (re-search-forward tramp-echo-mark-marker nil t)))
5668 (goto-char (point-min))
5660 (re-search-forward regexp nil t)))) 5669 (re-search-forward regexp nil t))))
5661 5670
5662(defun tramp-wait-for-regexp (proc timeout regexp) 5671(defun tramp-wait-for-regexp (proc timeout regexp)