Fork me on GitHub
Eric Ihli20:09:21 > Some operating systems have limited space for buffered input in a pty. On these systems, Emacs sends an EOF periodically amidst the other characters, to force them through. For most programs, these EOFs do no harm. I have a feeling I’m running into an issue with a comint mode and a process’s input buffer size. I’m sending a really big string to process-send-string and it’s getting truncated in the comint buffer. I see in process.c that the string might be sent in several bunches.

DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string,
       2, 2, 0,
       doc: /* Send PROCESS the contents of STRING as input.
PROCESS may be a process, a buffer, the name of a process or buffer, or
nil, indicating the current buffer's process.
If STRING is larger than the input buffer of the process (the length
of which depends on the process connection type and the operating
system), it is sent in several bunches.  This may happen even for
shorter strings.  Output from processes can arrive in between bunches.

If PROCESS is a non-blocking network process that hasn't been fully
set up yet, this function will block until socket setup has completed.  */)
If I have some elisp code that calls process-send-string with a big string, is there a way for my elisp code to know when the process has received all the bunches? I’m relying on the process having received all of those bunches before I continue. (I think.)