Subject: bug#14615: xterm--query results in slow -nw startup on some terminals

From: Glenn Morris <[email-masked]>
Date: Thu, 13 Jun 2013 19:36:21 -0400

Package: emacs
Version: 24.3.50

Current trunk on GNU/Linux.

emacs -Q -nw ./README

There is a noticeable delay (it feels like about 2 seconds) during
startup during which the scratch buffer is visible, before the README
file appears. There's plenty of time for me to hit ctrl-g, in which case
README is never visited. This does not happen in 24.3.

I imagine it is this change:
http://lists.gnu.org/archive/html/emacs-diffs/2013-03/msg00124.html

and the use of (read-event nil nil 2).

Reverting that change makes it fast again (but it doesn't work properly).
It seems to work fine with 24.3's xterm.el.

This is with TERM=xterm-vt220, using (the pretty old) aterm 0.4.2.
http://www.afterstep.org/aterm.php

There is no such delay with xterm or xfce4-terminal.

Maybe it's finally time for me to get a new terminal emulator...