Subject: Re: bug#64554: 27.1; comint-mode cuts input after 4095 characters

From: Eli Zaretskii <[email-masked]>
Date: Mon, 10 Jul 2023 16:24:45 +0300

> From: Jens Thiele <[email-masked]>
> Date: Mon, 10 Jul 2023 11:37:38 +0200
> 
> I see an annoying bug with comint-mode where lines are cut off after
> 4095 characters.
> 
> How to reproduce:
> start comint-mode with cat:
> M-: (switch-to-buffer (make-comint "cat" "cat"))
> insert 10000 u's
> C-u 10000 u RET
> and get only 4095 u's back in return (where of course 10000 should be returned)

Set process-connection-type to nil if you want to send more than 4KB
to a process.  AFAIR, this is a fundamental limitation of PTYs, which
are used by default for communicating with async subprocesses.
Setting process-connection-type to nil uses pipes instead.

See

  https://unix.stackexchange.com/questions/643777/is-there-any-limit-on-line-length-when-pasting-to-a-terminal-in-linux