all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to flush output to process
@ 2011-11-06  9:53 Frank Fischer
  2011-11-06 11:07 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Frank Fischer @ 2011-11-06  9:53 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-11-09 11:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.