From 387d6dd0a254785ed3f50b8664b35f17f6b873ce Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 17 Sep 2008 05:50:07 -0400 Subject: Add more delays in case text has not appeared from the command. Fixes: AF51A38C-36B6-4976-954D-0BCD6C1A81FD --- chess-scid.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'chess-scid.el') diff --git a/chess-scid.el b/chess-scid.el index 1881c2a..ae491d0 100644 --- a/chess-scid.el +++ b/chess-scid.el @@ -18,9 +18,14 @@ (process-send-string chess-scid-process (concat string "\n"))) (defun chess-scid-get-result (command) - (let ((here (point-max))) + (let ((here (point-max)) (iterations 10)) (chess-scid-send command) (accept-process-output chess-scid-process) + (while (and (> (setq iterations (1- iterations)) 0) + (eobp)) + (accept-process-output chess-scid-process 1 0 t)) + (if (eobp) + (error "chess-scid: '%s' failed to produce any output")) (goto-char (point-max)) (skip-chars-backward " \t\n\r%") (prog1 -- cgit v1.2.3