Subject: bug#25097: 25.1; Scratch buffer flashes with emacsclient and xterm

From: Jake <[email-masked]>
Date: Fri, 02 Dec 2016 22:12:22 +0000

When I run

     emacs -Q --daemon
     emacsclient -t foo.txt

to open some file foo.txt, the scratch buffer displays for 2-3 seconds
before the buffer for the file actually opens. My TERM environment
variable is set to "xterm-256color", and if I change it to
"screen-256color" this problem goes away. Also if I create a file
containing only "(setq-default xterm-query-timeout nil)" and load that
with the -l flag, the problem goes away. Presumably there is a purpose
to this timeout, so just doing this is probably not ideal. It was
added in commit cc8f96e in response to bug#12345.

In GNU Emacs 25.1.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2016-12-02 built on localhost
Repository revision: f0eb70d8935be90f7c03e187c12d9b60e7214cc6
System Description: Ubuntu 14.04.5 LTS

Configured using:
 'configure --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Starting Emacs daemon.
When done with this frame, type C-x 5 0
C-c C-x C-c is undefined
When done with a buffer, type C-x #
user-error: Beginning of history; no preceding item
user-error: End of history; no default available

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils term/xterm xterm server
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 91582 7267)
 (symbols 48 19907 0)
 (miscs 40 53 171)
 (strings 32 14939 4622)
 (string-bytes 1 424663)
 (vectors 16 10034)
 (vector-slots 8 390451 13298)
 (floats 8 171 483)
 (intervals 56 193 0)
 (buffers 976 21)
 (heap 1024 29106 799))