Subject: bug#1072: Viper version is 3.14 of April 06, 2008; can't exit viper insert mode with ESC using emacsclient -t

From: Stefano Zacchiroli <[email-masked]>
Date: Thu, 20 Nov 2008 14:18:48 +0100

On Sun, Nov 16, 2008 at 08:31:56PM -0500, Michael Kifer wrote:
> Can you give me the exact sequence of steps?

Yes, see below.

> I tried
> emacs -q --daemon -f server-start
> then
> emacsclient -t
> M-x viper-mode
> then I went into the insert mode and did M-x. It didn't leave the insert
> mode.

Correct, the sequence you mention does *not* exhibit the problem. Even
thought that is not surprising, given that the server you are
attaching your client to started as a daemon, and not as a X11 frame,
so I guess it gets the "correct" (wrt console) viper initialization
environment.

The following sequence does exhibit the bug:

  emacs -q -f server-start    # starts an X11 emacs
  M-x viper-mode	      # enable Viper _in the X11_ emacs
  emacsclient -t
  # now M-something leaves insert mode

Note that it is important that it is relevant to enable viper from the
X11 emacs. If you enable viper-mode in the console client everything
is fine.

This is not surprising either, as we've already settled that the
relevant point is where viper gets initialized.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime