unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to flush output to process
Date: Sun, 06 Nov 2011 06:07:17 -0500	[thread overview]
Message-ID: <E1RN0ZJ-0006TO-79@fencepost.gnu.org> (raw)
In-Reply-To: <j95lf3$s1c$1@dough.gmane.org> (message from Frank Fischer on Sun, 6 Nov 2011 09:53:39 +0000 (UTC))

> 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.



  reply	other threads:[~2011-11-06 11:07 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 [this message]
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=E1RN0ZJ-0006TO-79@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --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).