From d35f74681dd75d8a3f27e9d3be60c8ec687cc6bd Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 7 Sep 2010 00:08:46 +0200 Subject: [PATCH] (nntp-wait-for-string): Supply a timeout for accept-process-output to ensure progress. --- lisp/ChangeLog | 3 +++ lisp/hashcash.el | 2 +- lisp/nntp.el | 2 +- lisp/spam-report.el | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4dc2f62e9..837a32ca4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-06 Lars Magne Ingebrigtsen + * nntp.el (nntp-wait-for-string): Supply a timeout for + accept-process-output to ensure progress. + * gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too. diff --git a/lisp/hashcash.el b/lisp/hashcash.el index a10db0194..cc3af11a4 100644 --- a/lisp/hashcash.el +++ b/lisp/hashcash.el @@ -276,7 +276,7 @@ BUFFER defaults to the current buffer." (unless buffer (setq buffer (current-buffer))) (let (entry) (while (setq entry (rassq buffer hashcash-process-alist)) - (accept-process-output (car entry))))) + (accept-process-output (car entry) 1)))) (defun hashcash-processes-running-p (buffer) "Return non-nil if hashcash processes in BUFFER are still running." diff --git a/lisp/nntp.el b/lisp/nntp.el index 5373230fd..3cdd63084 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -1768,7 +1768,7 @@ password contained in '~/.nntp-authinfo'." (while (and (setq proc (get-buffer-process buf)) (memq (process-status proc) '(open run)) (not (re-search-forward regexp nil t))) - (accept-process-output proc) + (accept-process-output proc 0.1) (set-buffer buf) (goto-char (point-min))))) diff --git a/lisp/spam-report.el b/lisp/spam-report.el index 0e4576ae3..0e32e9340 100644 --- a/lisp/spam-report.el +++ b/lisp/spam-report.el @@ -267,7 +267,7 @@ This is initialized based on `user-mail-address'." (gnus-message 7 "Waiting for response from %s..." host) (while (and (memq (process-status tcp-connection) '(open run)) (zerop (buffer-size))) - (accept-process-output tcp-connection)) + (accept-process-output tcp-connection 1)) (gnus-message 7 "Waiting for response from %s... done" host))))) ;;;###autoload -- 2.25.1