From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13709: bug#13793: 24.3.50; M-x broken in viper and X Date: Mon, 25 Feb 2013 16:35:58 -0500 Message-ID: References: <20130223123501.43568c52@susi> <20130225201657.GA10969@susi> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361828185 5588 80.91.229.3 (25 Feb 2013 21:36:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2013 21:36:25 +0000 (UTC) Cc: 13793@debbugs.gnu.org, 13709@debbugs.gnu.org, Michael Kifer To: Frank Fischer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 25 22:36:46 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 1UA5j4-00063B-AL for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 22:36:46 +0100 Original-Received: from localhost ([::1]:44235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA5ij-0005xr-Ii for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 16:36:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA5ig-0005xX-RG for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 16:36:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA5if-0003aB-MF for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 16:36:22 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA5if-0003Zx-Jk for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 16:36:21 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UA5kI-0004Fa-4D for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 16:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Feb 2013 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13709 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13709-submit@debbugs.gnu.org id=B13709.136182826316305 (code B ref 13709); Mon, 25 Feb 2013 21:38:02 +0000 Original-Received: (at 13709) by debbugs.gnu.org; 25 Feb 2013 21:37:43 +0000 Original-Received: from localhost ([127.0.0.1]:50104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA5jz-0004Ev-63 for submit@debbugs.gnu.org; Mon, 25 Feb 2013 16:37:43 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:15651) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA5jx-0004Eg-60; Mon, 25 Feb 2013 16:37:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSQuh3AGwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSQuh3AGwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2435862" Original-Received: from 206-248-162-239.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.239]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Feb 2013 16:35:57 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 950696C0A9; Mon, 25 Feb 2013 16:35:58 -0500 (EST) In-Reply-To: <20130225201657.GA10969@susi> (Frank Fischer's message of "Mon, 25 Feb 2013 21:16:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:71804 Archived-At: > The function `follow_key` has been changed by the problematic commit. > Formerly severall keymaps have been passed in an array. Each keymap > has been checked in turn for a binding. One of the keymaps is > `evil-esc-map`. If this keymap is checked no binding is found. So the > next keymap is checked an it may contain a binding for M-x so this > binding is used. Oh, I think I see what's going on. So the Evil code (and Viper, since it seems to use the same gymnastics) really relies on some pretty nasty detail of the level at which the M-x =3D> ESC x rewriting took place, which was subtly changed. That could also explain why `f1 f M-x' already didn't find the binding in the old code. > Anyhow, the real problem is to "multiplex" the (kbd "ESC") event in > the terminal. Any solution that sends 'escape instead of (kbd "ESC") > if another event arrives within a short period should solve the > problem. Now my question is: why do it with a minor-mode map rather than with an input-decode-map (which would also save you from having to rely on unread-command-events)? Oh, yes, of course, that input-decode-map binding would collide with the escape-sequence remappings. How 'bout something like: (defvar evil-normal-esc-map (lookup-key input-decode-map [?\e])) (define-key input-decode-map [?\e] `(menu-item "" ,evil-normal-esc-map :filter ,(lambda (map) (if (sit-for evail-esc-delay) [escape] map)))) [ Modulo some dance =E0 la evil-esc-mode to add/remove this binding so that code that adds escape sequences to this map never bumps into the [escape] mapping. ] Stefan