From: Frank Fischer <frank-fischer@shadow-soft.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How to flush output to process
Date: Sun, 6 Nov 2011 12:38:20 +0100 [thread overview]
Message-ID: <20111106123820.37dfb047@purzel.home.lau> (raw)
In-Reply-To: E1RN0ZJ-0006TO-79@fencepost.gnu.org
Am Sun, 06 Nov 2011 06:07:17 -0500
schrieb Eli Zaretskii <eliz@gnu.org>:
> > From: Frank Fischer <frank-fischer@shadow-soft.de>
> > Date: Sun, 6 Nov 2011 09:53:39 +0000 (UTC)
> >
> > In something like C I would use fflush(...) to force the buffered
> > data to be sent to the process (and it works), but I have not been
> > able to find some comparable function for Emacs Lisp.
> >
> > Is there a way the flush the Emacs->process stream, i.e., force all
> > buffered data to be actually send to the process, from Emacs Lisp?
>
> I'm guessing that your analysis of the problem (and therefore the
> solution you are seeking) is incorrect. I think it's the sub-process
> who is buffering input until it sees a newline.
>
> To fix this, make sure your subprocess reads its stdin in raw mode,
> not in cooked mode.
Well, I cannot change the subprocess' code. But even if it is a problem
of the subprocess, why does it work if I communicate with the
subprocess from some other program, i.e., not starting the process from
Emacs but from some other programming language, AND call the flush
function of the corresponding stream?
Btw, I would be surprised if it is indeed a problem of the subprocess
as it is designed to be used in this way.
Frank
next prev parent reply other threads:[~2011-11-06 11:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 9:53 How to flush output to process Frank Fischer
2011-11-06 11:07 ` Eli Zaretskii
2011-11-06 11:38 ` Frank Fischer [this message]
2011-11-06 21:08 ` Thien-Thi Nguyen
2011-11-06 21:56 ` Frank Fischer
2011-11-07 8:49 ` Thien-Thi Nguyen
2011-11-07 19:29 ` Frank Fischer
2011-11-07 19:43 ` Thien-Thi Nguyen
2011-11-09 11:26 ` Frank Fischer
[not found] ` <mailman.1911.1320579191.15868.help-gnu-emacs@gnu.org>
2011-11-06 18:21 ` Helmut Eller
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=20111106123820.37dfb047@purzel.home.lau \
--to=frank-fischer@shadow-soft.de \
--cc=help-gnu-emacs@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.