From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Fischer Newsgroups: gmane.emacs.bugs Subject: bug#13793: 24.3.50; M-x broken in viper and X Date: Sat, 23 Feb 2013 12:35:01 +0100 Message-ID: <20130223123501.43568c52@susi> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361645384 8132 80.91.229.3 (23 Feb 2013 18:49:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Feb 2013 18:49:44 +0000 (UTC) To: 13793@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 23 19:50:07 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U9KAe-0002wg-Hp for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2013 19:50:04 +0100 Original-Received: from localhost ([::1]:41505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9KAK-0007HB-1B for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2013 13:49:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9KAD-0007G0-W4 for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 13:49:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9KA9-00073c-Tk for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 13:49:37 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9KA9-00073Y-Pk for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 13:49:33 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U9KBa-0007Ld-NV for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 13:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Frank Fischer Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Feb 2013 18:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136164542428155 (code B ref -1); Sat, 23 Feb 2013 18:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Feb 2013 18:50:24 +0000 Original-Received: from localhost ([127.0.0.1]:46002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9KAx-0007K3-7I for submit@debbugs.gnu.org; Sat, 23 Feb 2013 13:50:24 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41837) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9DTQ-00058c-66 for submit@debbugs.gnu.org; Sat, 23 Feb 2013 06:41:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9DRq-00059C-5L for submit@debbugs.gnu.org; Sat, 23 Feb 2013 06:39:32 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:44508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9DRq-000596-26 for submit@debbugs.gnu.org; Sat, 23 Feb 2013 06:39:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9DRg-0004mP-AS for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 06:39:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9DRb-0004tJ-Gv for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 06:39:12 -0500 Original-Received: from mout2.freenet.de ([195.4.92.92]:55596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9DRb-0004tA-7X for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2013 06:39:07 -0500 Original-Received: from [195.4.92.142] (helo=mjail2.freenet.de) by mout2.freenet.de with esmtpa (ID frank-fischer@shadow-soft.de) (port 25) (Exim 4.80.1 #2) id 1U9DRX-0001t0-Rg; Sat, 23 Feb 2013 12:39:03 +0100 Original-Received: from localhost ([::1]:46406 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID frank-fischer@shadow-soft.de) (Exim 4.80.1 #2) id 1U9DRX-0005D4-Am; Sat, 23 Feb 2013 12:39:03 +0100 Original-Received: from [195.4.92.24] (port=58521 helo=14.mx.freenet.de) by mjail2.freenet.de with esmtpa (ID frank-fischer@shadow-soft.de) (Exim 4.80.1 #2) id 1U9DNh-00034z-1R; Sat, 23 Feb 2013 12:35:05 +0100 Original-Received: from i59f6cb70.versanet.de ([89.246.203.112]:55947 helo=susi) by 14.mx.freenet.de with esmtpsa (ID frank-fischer@shadow-soft.de) (TLSv1.2:DHE-RSA-AES128-SHA:128) (port 465) (Exim 4.80.1 #2) id 1U9DNg-0000ba-Jq; Sat, 23 Feb 2013 12:35:04 +0100 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sat, 23 Feb 2013 13:50:21 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71719 Archived-At: Meta bindings do not work if Emacs is started in X and viper is enabled. To reproduce, type emacs -Q M-x viper RET M-x the last command M-x shows 'M-x undefined'. As far as I can tell, the reason is viper's trick with the ESC key. viper binds (kbd "ESC") to a special command call `viper-intercept-ESC-key`. The purpose is to make the plain ESC key usable in terminal mode: viper, being a vi emulator, uses a plain ESC key to exit insert mode. This special command does the following: If an ESC event arrives, viper waits for a short period of time for another event. If no other event arrives, viper assumes that a plain ESC key has been pressed. Otherwise the the ESC key is interpreted as a prefix of the second event. Thus, M-x in terminal first calls `viper-intercept-ESC-key`, this functions waits for the second event, the 'x', and then calls the binding of 'ESC x'. In X mode this is not necessary, because the plain ESC key generates the event 'escape, so it is distinguishable from a prefix ESC. Nevertheless, the binding of ESC is still active, because viper has to support both, X and terminal (suppose Emacs is started in server mode, one frame being X, another being terminal). So in some sense, the trick to make viper work well in terminal mode now causes a problem in X. Until Emacs 24.2 this "trick" worked quite well. This changed recently. I tried to find the changeset that introduced the bug, and I think it is (I used the git repo) commit 11521f1228e447bb68ff7a48a30148b99323c04e Author: Stefan Monnier Date: Mon Feb 11 14:21:23 2013 -0500 Clean up read_key_sequence a bit; reread active keymaps after first event. Sorry that I'm not (yet) able to figure out what went wrong exactly, but I hope this information helps to find a solution. Best regards, Frank In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-02-15 on dubnium, modified by Debian (emacs-snapshot package, version 2:20130215-1~ppa1~precise1) Windowing system distributor `The X.Org Foundation', version 11.0.11103000 System Description: Ubuntu 12.04.2 LTS Configured using: `configure --build i686-linux-gnu --host i686-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/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp --without-compress-info --with-crt-dir=/usr/lib/i386-linux-gnu/ --with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes CFLAGS='-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-g -Wl,--as-needed -znocombreloc'' Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Message Minor modes in effect: mml-mode: t tooltip-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 blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t auto-fill-function: message-do-auto-fill transient-mark-mode: t abbrev-mode: t Recent input: ( ) M-q C-c C-c n o C-SPC C-w C-c C-c C-c C-c C-SPC M-y M-w M-x C-g