Subject: 23.0.60; can't exit viper insert mode with ESC using emacsclient -t

From: [email-masked] (Stefano Zacchiroli)
Date: Fri, 3 Oct 2008 10:27:43 +0200 (CEST)

I'm using viper mode (at expert level 5). I'm also using the Emacs
  server with emacsclients, sometimes creating new frames (emacsclient
  -c), sometimes on a console (emacsclient -t). Everything is fine
  working either in the main Emacs or in a framed emacsclient.

  However, in the console emacsclient I'm unable to exit insert mode
  using ESC. It does work fine exit insert mode using M-x
  viper-exit-insert-state (but as you can imagine it is quite
  annoying).

  The key different seems to be key binding, while in main Emacs and
  framed client "C-h k ESC" returns (viper-intercept-ESC-key), in
  console clients "C-h k ESC" hangs showing "ESC-" waiting for the
  next key in the binding.

In GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-09-28 on elegiac, modified by Debian
 (emacs-snapshot package, version 1:20080928-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: it_IT.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  iswitchb-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> C-x k <return> y e s <return> M-x s e r <tab> 
v <tab> e <tab> s <tab> <return> n n C-n n n j j j 
C-x C-c ESC [ > 1 ; 1 6 1 4 ; 0 c j j j j j j j j j 
j j j j j j j j j j j j j j j j j l l l l l l C-z k 
k C-_ C-p C-p C-p C-z k k k I SPC SPC SPC SPC ESC j 
j j j j j DEL DEL DEL DEL DEL DEL ESC O A ESC O A ESC 
O A ESC O A ESC O A ESC O B ESC O B ESC O B ESC O B 
ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC 
O A i SPC C-_ ESC O A ESC ESC ESC ESC ESC ESC ESC ESC 
ESC ESC C-g C-g C-g C-g C-g ESC ESC ESC ESC x v i p 
e TAB e TAB x TAB i TAB i TAB RET j j j j k k k k k 
i SPC SPC SPC ESC j j j C-_ ESC x v i p e r - e x TAB 
i TAB i TAB TAB RET C-h k ESC <switch-frame> C-x C-f 
/ t <tab> C-x C-x C-f C-x C-f / t <tab> b a r <return> 
C-n C-n C-n C-n C-n i <escape> C-h k <escape> <switch-frame> 
ESC <switch-frame> C-x 1 j j C-x 1 j j j C-h k ESC 
C-x C-c C-x C-c n C-x 1 M-x e m a c <tab> r e <tab> 
p <tab> <M-backspace> <M-backspace> r e p o <tab> r 
<tab> <return>

Recent messages:
Undo!
Quit [4 times]
Making completion list...
Undo!
Type C-x 1 to delete the help window, C-M-v to scroll help.
mouse-2, RET: Browse http://www.gnu.org/software/emacs/tour/
exchange-point-and-mark: No mark set in this buffer
Type C-x 1 to delete the help window.
C-M-x C-c is undefined
Making completion list...