Subject: bug#17497: 24.4.50; TTY menu glitches

From: Thomas Dickey <[email-masked]>
Date: Wed, 04 Jun 2014 04:31:02 -0400

On Tue, Jun 03, 2014 at 11:03:08PM -0400, Stefan Monnier wrote:
> > repeating: if the cursor-key sequence of characters is misinterpreted
> > (for example due to timeouts), then fragments of the sequences will
> > echo as unexpected characters.
> 
> I do not understand what that means.  By "cursor-key sequence of
> characters" do you mean the escape sequence sent by the terminal to
> Emacs or the cursor-motion escape sequences sent from Emacs to the
> text terminal?

From the terminal to Emacs.

Cursor up typically is

	ESC [ A

three characters.  Curses applications behave differently if you type those
three characters, one-by-one, because of timing.

> What timeouts are you referring to?  Are you saying that the terminal
> emulator has internal timeouts?  If so, can you describe when and how
> they come into play?

Typically the _application_ (Emacs) waits for completion of a control sequence.
 
> It seems you're saying that the escape sequences Emacs sends to the
> terminal need to be within a single "packet", because if such an escape
> sequence is split among several "fflush" the terminal emulator won't
> wait indefinitely for the second chunk, and instead will timeout after
> a fairly short wait and consider the escape sequence as "unexpected
> characters".

That's part of it.  Usually the input (from the terminal to the application)
is more important.

-- 
Thomas E. Dickey <[email-masked]>
http://invisible-island.net
ftp://invisible-island.net