--- Begin Message ---
Subject: |
[gmane.emacs.devel] random 1 second delay in comint-redirect-results-list-from-process |
Date: |
Fri, 21 Jun 2013 09:07:29 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) |
--- Begin Message ---
Subject: |
Topics |
Topics:
random 1 second delay in comint-redirect-results-list-from-process
Re: random 1 second delay in comint-redirect-results-list-from-process
Re: random 1 second delay in comint-redirect-results-list-from-process
Re: random 1 second delay in comint-redirect-results-list-from-process
--- End Message ---
--- Begin Message ---
Subject: |
random 1 second delay in comint-redirect-results-list-from-process |
Date: |
Thu, 20 Jun 2013 08:06:26 +0800 |
Hi there,
I am seeing seemingly random delay of 1 second when using
comint-redirect-results-list-from-process, which may be the fault of
(accept-process-output nil 1).
Could someone explain (accept-process-output nil 1)? Any harm in
reducing it to (accept-process-output nil)?
Leo
--- End Message ---
--- Begin Message ---
Subject: |
Re: random 1 second delay in comint-redirect-results-list-from-process |
Date: |
Wed, 19 Jun 2013 22:16:12 -0400 |
> Could someone explain (accept-process-output nil 1)? Any harm in
> reducing it to (accept-process-output nil)?
Rather than nil it should pass the actual process.
Stefan
--- End Message ---
--- Begin Message ---
Subject: |
Re: random 1 second delay in comint-redirect-results-list-from-process |
Date: |
Thu, 20 Jun 2013 16:04:54 +0800 |
On 2013-06-20 10:16 +0800, Stefan Monnier wrote:
> Rather than nil it should pass the actual process.
Is it OK to apply the following patch?
=== modified file 'lisp/comint.el'
--- lisp/comint.el 2013-05-25 02:40:33 +0000
+++ lisp/comint.el 2013-06-20 05:14:25 +0000
@@ -3726,7 +3726,7 @@
;; Wait for the process to complete
(set-buffer (process-buffer process))
(while (null comint-redirect-completed)
- (accept-process-output nil 1))
+ (accept-process-output process))
;; Collect the output
(set-buffer output-buffer)
(goto-char (point-min))
--- End Message ---
--- Begin Message ---
Subject: |
Re: random 1 second delay in comint-redirect-results-list-from-process |
Date: |
Thu, 20 Jun 2013 16:17:14 -0400 |
> (while (null comint-redirect-completed)
> - (accept-process-output nil 1))
> + (accept-process-output process))
I think it's OK, tho I think the loop should of course check the return
value of accept-process-output (or else, check that the process is
still running).
Stefan
--- End Message ---
--- End Message ---