From: Frank Fischer <frank-fischer@shadow-soft.de>
To: help-gnu-emacs@gnu.org
Subject: How to flush output to process
Date: Sun, 6 Nov 2011 09:53:39 +0000 (UTC) [thread overview]
Message-ID: <j95lf3$s1c$1@dough.gmane.org> (raw)
Hi,
I have a question about communication with processes. I want to start
an external program from Emacs Lisp in a process (using
`start-file-process'). This program accepts input data from stdin and
writes its results to stdout. After sending data to the process using
`process-send-string' nothing happens if the data does not end in a
newline character. The problem is that in general I cannot end every
request I send to the process with a newline (a constraint of the
communication protocol) and using `process-send-eof' is also not an
option because this seems to close the connection completely (I want
to communicate with the process in several turns).
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?
Thanks in advance,
Frank
next reply other threads:[~2011-11-06 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 9:53 Frank Fischer [this message]
2011-11-06 11:07 ` How to flush output to process Eli Zaretskii
2011-11-06 11:38 ` Frank Fischer
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='j95lf3$s1c$1@dough.gmane.org' \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).