From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mihai Bazon Newsgroups: gmane.emacs.bugs Subject: bug#4093: Overlay keymap and timers Date: Mon, 10 Aug 2009 21:26:23 +0300 Message-ID: <5f77467962473de6f883e85a8259fed2@bazon.net> References: <680d89b1d020330a6cb4001845e1e5fb@bazon.net> <8d0e98985fc5a0229f138935490f4f6a@bazon.net> Reply-To: Mihai Bazon , 4093@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1249930029 5398 80.91.229.12 (10 Aug 2009 18:47:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2009 18:47:09 +0000 (UTC) Cc: 4093@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 10 20:47:02 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MaZtd-0004Gr-L7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Aug 2009 20:47:02 +0200 Original-Received: from localhost ([127.0.0.1]:46277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaZtc-0001UF-O0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Aug 2009 14:47:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaZtZ-0001Tw-7k for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2009 14:46:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaZtU-0001TS-JI for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2009 14:46:56 -0400 Original-Received: from [199.232.76.173] (port=56906 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaZtU-0001TL-EH for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2009 14:46:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53759) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MaZtT-0004fN-P2 for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2009 14:46:52 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7AIkmFv017858; Mon, 10 Aug 2009 11:46:48 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7AIe61H017110; Mon, 10 Aug 2009 11:40:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Mihai Bazon Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 10 Aug 2009 18:40:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4093 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4093-submit@emacsbugs.donarmstrong.com id=B4093.124992901016264 (code B ref 4093); Mon, 10 Aug 2009 18:40:06 +0000 Original-Received: (at 4093) by emacsbugs.donarmstrong.com; 10 Aug 2009 18:30:10 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from v1.dynarch.com (ip-72-55-183-145.static.privatedns.com [72.55.183.145]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7AIU9Ro016162 for <4093@emacsbugs.donarmstrong.com>; Mon, 10 Aug 2009 11:30:10 -0700 Original-Received: by v1.dynarch.com (Postfix, from userid 5001) id BFCD91DCC61; Mon, 10 Aug 2009 21:26:24 +0300 (EEST) Original-Received: from v3.dynarch.com (ip-72-55-183-147.static.privatedns.com [72.55.183.147]) by v1.dynarch.com (Postfix) with SMTP id E74C81DCC5E; Mon, 10 Aug 2009 21:26:23 +0300 (EEST) Original-Received: (nullmailer pid 22548 invoked by uid 65534); Mon, 10 Aug 2009 18:26:23 -0000 Content-Disposition: inline In-Reply-To: X-Mailer: XUHEKI - Dynarch.com WebMail X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 10 Aug 2009 14:46:56 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30068 Archived-At: Stefan Monnier wrote: >=20 > Basically the problem in the case of changing the keymap from a timer > comes down to: >=20 > what happens if the use presses C-c, then your code runs then the user > presses C-d: should the C-c C-d be looked up in the original keymaps > or in the new keymaps? That's a good question. As an user, if I start typing a combined key binding then I would expect it to work regardless of whatever happened in a timer in between. So indeed, it can be a problem to allow a timer to set a new keymap in this case. But if there's no prefix key already typed, it would be great if use-local-map actually did what it's supposed to do, even when ran with a timer. Perhaps the proper solution would involve saving the current keymap when a prefix key has been pressed, and use that keymap until it results in a command or it's canceled. If a timer changes the keymap in between, the new keymap should apply only after any pending key binding has been finished. Not sure if this is doable... I'm sorry I don't have any knowledge of Emacs internals, and only limited Lisp knowledge anyway, but I'd love to see a decent work-around for this... Cheers, -Mihai=