GNU bug report logs -
#4093
Overlay keymap and timers
Previous Next
Reported by: Mihai Bazon <mihai <at> bazon.net>
Date: Sun, 9 Aug 2009 14:00:04 UTC
Severity: normal
Merged with 4081,
10459,
11088
Found in version 24.0.94
Fixed in version 24.4
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>
> Basically the problem in the case of changing the keymap from a timer
> comes down to:
>
> 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
This bug report was last modified 10 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.