[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] trunk r117592: Grab all Python process output before i

From: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r117592: Grab all Python process output before inferior-python-mode hooks.
Date: Thu, 31 Jul 2014 02:54:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> What it seems to be happening is that on the first accept-process-output
> call, the output that is grabbed is just the banner, leaving the prompt
> outside, and that's what the sit-for was actually "fixing".  The truth
> is (I think) that sit-for should be another accept-process-output call.

Actually, there's no guarantee that the two chunks that are sent by
Python will be received as 2 chunks by Emacs.  It all depends on the OS
and timing and buffering.  It could be received as a single chunk
(typically if Emacs gets to run "late" enough that both chunks have
already been sent), or it could be further divided by the OS into
smaller chunks (typically if the chunks are large).

So you should use a loop, which checks the actual text received, looking
for a tell-tale sign (e.g. a prompt) that "we've received all we need so


reply via email to

[Prev in Thread] Current Thread [Next in Thread]