[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog net/tramp.el
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog net/tramp.el |
Date: |
Tue, 15 Dec 2009 21:11:43 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Michael Albinus <albinus> 09/12/15 21:11:43
Modified files:
lisp : ChangeLog
lisp/net : tramp.el
Log message:
* net/tramp.el (tramp-echo-mark-marker-length): New defconst.
(tramp-echo-mark, tramp-echoed-echo-mark-regexp): Use it.
(tramp-check-for-regexp): Check also, when an echoing shell stops
to echo sent commands.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16907&r2=1.16908
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp.el?cvsroot=emacs&r1=1.275&r2=1.276
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16907
retrieving revision 1.16908
diff -u -b -r1.16907 -r1.16908
--- ChangeLog 14 Dec 2009 23:22:54 -0000 1.16907
+++ ChangeLog 15 Dec 2009 21:11:39 -0000 1.16908
@@ -1,3 +1,10 @@
+2009-12-15 Michael Albinus <address@hidden>
+
+ * net/tramp.el (tramp-echo-mark-marker-length): New defconst.
+ (tramp-echo-mark, tramp-echoed-echo-mark-regexp): Use it.
+ (tramp-check-for-regexp): Check also, when an echoing shell stops
+ to echo sent commands.
+
2009-12-14 Chong Yidong <address@hidden>
* Makefile.in: Revert last change (Bug#5191).
Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -b -r1.275 -r1.276
--- net/tramp.el 9 Dec 2009 10:23:04 -0000 1.275
+++ net/tramp.el 15 Dec 2009 21:11:42 -0000 1.276
@@ -948,7 +948,12 @@
(defconst tramp-echo-mark-marker "_echo"
"String marker to surround echoed commands.")
-(defconst tramp-echo-mark "_echo\b\b\b\b\b"
+(defconst tramp-echo-mark-marker-length (length tramp-echo-mark-marker)
+ "String length of `tramp-echo-mark-marker'.")
+
+(defconst tramp-echo-mark
+ (concat tramp-echo-mark-marker
+ (make-string tramp-echo-mark-marker-length ?\b))
"String mark to be transmitted around shell commands.
Used to separate their echo from the output they produce. This
will only be used if we cannot disable remote echo via stty.
@@ -958,7 +963,9 @@
followed by an equal number of backspaces to erase them will
usually suffice.")
-(defconst tramp-echoed-echo-mark-regexp "_echo\\(\b\\( \b\\)?\\)\\{5\\}"
+(defconst tramp-echoed-echo-mark-regexp
+ (format "%s\\(\b\\( \b\\)?\\)\\{%d\\}"
+ tramp-echo-mark-marker tramp-echo-mark-marker-length)
"Regexp which matches `tramp-echo-mark' as it gets echoed by
the remote shell.")
@@ -6562,7 +6569,14 @@
(delete-region begin (point))
(goto-char (point-min)))))
- (when (not (tramp-get-connection-property proc "check-remote-echo" nil))
+ (when (or (not (tramp-get-connection-property proc "check-remote-echo"
nil))
+ ;; Sometimes, the echo string is suppressed on the remote side.
+ (not (string-equal
+ (substring-no-properties
+ tramp-echo-mark-marker
+ 0 (min tramp-echo-mark-marker-length (1- (point-max))))
+ (buffer-substring-no-properties
+ 1 (min (1+ tramp-echo-mark-marker-length) (point-max))))))
;; No echo to be handled, now we can look for the regexp.
(goto-char (point-min))
(re-search-forward regexp nil t))))