GNU bug report logs - #14681
[gmane.emacs.devel] random 1 second delay in comint-redirect-results-list-from-process

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Fri, 21 Jun 2013 01:08:02 UTC

Severity: normal

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [gmane.emacs.devel] random 1 second delay in
 comint-redirect-results-list-from-process
Date: Fri, 21 Jun 2013 09:07:29 +0800
[Message part 1 (message/rfc822, inline)]
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
[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: emacs-devel <at> gnu.org
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




[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: emacs-devel <at> gnu.org
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



[Message part 4 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: emacs-devel <at> gnu.org
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))



[Message part 5 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: emacs-devel <at> gnu.org
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




This bug report was last modified 12 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.