Subject: Re: bug#5321: - Interaction problem between Emacs and terminal paste functions

From: Andreas Schwab <[email-masked]>
Date: Fri, 29 Oct 2010 21:40:45 +0200

James Mills <[email-masked]> writes:

> I wrote a script that prints out 1024 lines of output.  It looks like this:
>
> LINE 0
> LINE 1
> LINE 2
> ...
> LINE 1023
>
> If you copy this 1024 line output, and paste it into emacs running in
> a terminal (not the GUI), you will not see all 1024 lines.  In fact,
> toward the end, you will get random garbage.  For example, my last
> attempt printed:
>
> LINE 464
> LINE 465
> LINE 466
> LIN6
    ^ byte 4096

Apparently the pty buffer of your system has a size of 4096 bytes.  If
the terminal keeps stuffing more bytes into the master side of the pty
that buffer overflows and bytes are dropped until the process at the
other side of the pty had a chance to read some.  This is unlikely to be
fixable inside Emacs.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."