diff options
| author | Michael Albinus | 2012-06-01 15:23:26 +0200 |
|---|---|---|
| committer | Michael Albinus | 2012-06-01 15:23:26 +0200 |
| commit | 046e38ce2b6f4ae94251f480184b1a36243dd62d (patch) | |
| tree | e011c37ca1c4ed2bb34f8e637b61a6ebedc8b98a | |
| parent | 4e8fa7d3083ff94935dbb97ca1f6b8c7f908b69f (diff) | |
| download | emacs-046e38ce2b6f4ae94251f480184b1a36243dd62d.tar.gz emacs-046e38ce2b6f4ae94251f480184b1a36243dd62d.zip | |
* net/tramp.el (tramp-check-for-regexp): Search from buffer end,
in order to avoid "Stack overflow in regexp matcher".
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 372fc63fc8b..cb7aaf44ead 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-06-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-check-for-regexp): Search from buffer end, | ||
| 4 | in order to avoid "Stack overflow in regexp matcher". | ||
| 5 | |||
| 1 | 2012-05-31 Glenn Morris <rgm@gnu.org> | 6 | 2012-05-31 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * image.el: For clarity, call imagemagick-register-types at | 8 | * image.el: For clarity, call imagemagick-register-types at |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index beb97c6eb32..be5bfdb79da 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3315,8 +3315,14 @@ Erase echoed commands if exists." | |||
| 3315 | 'buffer-substring-no-properties | 3315 | 'buffer-substring-no-properties |
| 3316 | 1 (min (1+ tramp-echo-mark-marker-length) (point-max)))))) | 3316 | 1 (min (1+ tramp-echo-mark-marker-length) (point-max)))))) |
| 3317 | ;; No echo to be handled, now we can look for the regexp. | 3317 | ;; No echo to be handled, now we can look for the regexp. |
| 3318 | (goto-char (point-min)) | 3318 | ;; Sometimes, the buffer is much to huge, and we run into a |
| 3319 | (re-search-forward regexp nil t)))) | 3319 | ;; "Stack overflow in regexp matcher". For example, directory |
| 3320 | ;; listings with some thousand files. Therefore, we look from | ||
| 3321 | ;; the end for the last line. We ignore also superlong lines, | ||
| 3322 | ;; like created with "//DIRED//". | ||
| 3323 | (goto-char (point-max)) | ||
| 3324 | (unless (> (- (point) (point-at-bol)) 128) | ||
| 3325 | (re-search-backward regexp (point-at-bol) t))))) | ||
| 3320 | 3326 | ||
| 3321 | (defun tramp-wait-for-regexp (proc timeout regexp) | 3327 | (defun tramp-wait-for-regexp (proc timeout regexp) |
| 3322 | "Wait for a REGEXP to appear from process PROC within TIMEOUT seconds. | 3328 | "Wait for a REGEXP to appear from process PROC within TIMEOUT seconds. |
| @@ -3857,9 +3863,6 @@ Only works for Bourne-like shells." | |||
| 3857 | ;; * Run emerge on two remote files. Bug is described here: | 3863 | ;; * Run emerge on two remote files. Bug is described here: |
| 3858 | ;; <http://www.mail-archive.com/tramp-devel@nongnu.org/msg01041.html>. | 3864 | ;; <http://www.mail-archive.com/tramp-devel@nongnu.org/msg01041.html>. |
| 3859 | ;; (Bug#6850) | 3865 | ;; (Bug#6850) |
| 3860 | ;; * It would be very useful if it were possible to load or save a | ||
| 3861 | ;; buffer using Tramp in a non-blocking way so that use of Emacs on | ||
| 3862 | ;; other buffers could continue. (Bug#9617) | ||
| 3863 | 3866 | ||
| 3864 | ;;; tramp.el ends here | 3867 | ;;; tramp.el ends here |
| 3865 | 3868 | ||