From: Leo Liu <sdl.web@gmail.com>
To: 14681@debbugs.gnu.org
Subject: bug#14681: [gmane.emacs.devel] random 1 second delay in comint-redirect-results-list-from-process
Date: Fri, 21 Jun 2013 09:07:29 +0800 [thread overview]
Message-ID: <m1ehbwnuem.fsf@gmail.com> (raw)
[-- Attachment #1: Type: message/rfc822, Size: 360 bytes --]
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
[-- Attachment #2: Type: message/rfc822, Size: 543 bytes --]
From: Leo Liu <sdl.web@gmail.com>
To: emacs-devel@gnu.org
Subject: random 1 second delay in comint-redirect-results-list-from-process
Date: Thu, 20 Jun 2013 08:06:26 +0800
Message-ID: <m1ip19odbx.fsf@gmail.com>
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
[-- Attachment #3: Type: message/rfc822, Size: 542 bytes --]
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: random 1 second delay in comint-redirect-results-list-from-process
Date: Wed, 19 Jun 2013 22:16:12 -0400
Message-ID: <jwvzjulil2c.fsf-monnier+emacs@gnu.org>
> 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
[-- Attachment #4: Type: message/rfc822, Size: 996 bytes --]
From: Leo Liu <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: random 1 second delay in comint-redirect-results-list-from-process
Date: Thu, 20 Jun 2013 16:04:54 +0800
Message-ID: <m1fvwdxl5l.fsf@gmail.com>
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))
[-- Attachment #5: Type: message/rfc822, Size: 734 bytes --]
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: random 1 second delay in comint-redirect-results-list-from-process
Date: Thu, 20 Jun 2013 16:17:14 -0400
Message-ID: <jwvehbwh71t.fsf-monnier+emacs@gnu.org>
> (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
next reply other threads:[~2013-06-21 1:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 1:07 Leo Liu [this message]
2013-06-21 1:25 ` bug#14681: [gmane.emacs.devel] random 1 second delay in comint-redirect-results-list-from-process Leo Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1ehbwnuem.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=14681@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.