Tom Roche <tom_ro...@pobox.com> writes: Hi Tom,
> me@remote:~ $ find /project/this/that/emis/model_ready -maxdepth 1 | wc -l > 2637 Wow! > Stack overflow in regexp matcher > > Please let me know if I should debug further, e.g., (setq tramp-verbose 9) -> > init.el, M-x tramp-cleanup-all-connections. I could reproduce it (creating a temp directory with 5000 dummy files). The following patch solves the problem for me: --8<---------------cut here---------------start------------->8--- detlef:~> (cd src/emacs/lisp/net/ ; bzr diff --diff-options -c tramp.el) === modified file 'lisp/net/tramp.el' *** lisp/net/tramp.el 2012-04-22 13:58:00 +0000 --- lisp/net/tramp.el 2012-06-01 13:02:09 +0000 *************** *** 3315,3322 **** '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)))) (defun tramp-wait-for-regexp (proc timeout regexp) "Wait for a REGEXP to appear from process PROC within TIMEOUT seconds. --- 3315,3328 ---- '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. ! ;; Sometimes, the buffer is much to huge, and we run into a ! ;; "Stack overflow in regexp matcher". For example, directory ! ;; listings with some thousand files. Therefore, we look from ! ;; the end for the last line. We ignore also superlong lines, ! ;; like created with "//DIRED//". ! (goto-char (point-max)) ! (unless (> (- (point) (point-at-bol)) 128) ! (re-search-backward regexp (point-at-bol) t))))) (defun tramp-wait-for-regexp (proc timeout regexp) "Wait for a REGEXP to appear from process PROC within TIMEOUT seconds. --8<---------------cut here---------------end--------------->8--- Thanks for the report, and best regards, Michael. _______________________________________________ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel