Subject: Re: bug#12440: 24.2; process-send-string only sends 4K for long strings

From: Eli Zaretskii <[email-masked]>
Date: Mon, 07 Oct 2019 19:45:11 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Mon, 07 Oct 2019 16:53:24 +0200
> Cc: [email-masked]
> 
> Hendrik Tews <[email-masked]> writes:
> 
> > in Emacs 24.2, the following code
> >
> >   (let* ((process-connection-type t)
> >          (process (start-process "cat" (current-buffer) "cat")))
> >     (process-send-string process (format "%s\n" (make-string 6000 ?a))))
> >
> > inserts only 4095 characters in the current buffer. Setting
> > process-connection-type to nil will insert all characters.
> 
> I can confirm that this bug is still present in Emacs 27.
> 
> It's odd that this doesn't cause more problems than it does in practice,
> but I guess it's rare that we talk to processes this way.

IMO, when a Lisp program intends to communicate with a subprocess this
way, it should indeed set process-connect-type to nil.  It makes no
sense to me to use PTYs to communicate massive amounts of data in
batch-like manner.