Subject: bug#13793: 24.3.50; M-x broken in viper and X

From: Stefano Zacchiroli <[email-masked]>
Date: Mon, 24 Jun 2013 16:37:31 +0200

On Sat, Jun 22, 2013 at 05:56:28PM -0400, Stefan Monnier wrote:
> Could you try the patch below under X11 and under a tty, ideally even
> using emacsclient to create new X11 and tty frames?

Hi Stefan, I've just tried the patch (sorry for the delay, but in the
process I stumbled upon #14596 and I was short on time, found only now
the workaround for that).

The patch works in fixing the M-x issue, which now works fine in both
console (emacsclient -t) and GUI (emacsclient -c) clients.

Unfortunately, the patch has a very nasty side-effect: it makes
impossible to leave insert mode in console clients. Hitting ESC result
(after the expected brief delay) in "ESC-" being shown in the Emacs
minibuffer, but the nothing else happens. The key remains shown there
indefinitely, whereas Viper remains in insert mode (<I> shown in the
line just above the minibuffer). Hitting some other key then makes the
"ESC-" message going away (presumably because ESC-that_char is not
mapped to anything meaningful), but that's hit. There's no way to leave
insert mode.

On the other hand, everything works fine in the GUI clients, where both
M-x and entering/leaving insert mode work as expected.

For the sake of debugging, I've also tried to open in parallel the same
buffer in a side-by-side console and GUI clients. It is possible to
enter insert mode in the console client, and then use the GUI client to
leave it. This was probably obvious to you, but it shows to me that the
issue is in the interaction with the client, and not a sticky property
of the underlying buffer.

Thanks a lot for a first stab at the patch, I really appreciate.

Hope this feedback helps,
Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  [email-masked] . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Former Debian Project Leader  . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »