GNU bug report logs -
#10459
Overlay keymaps ignored until point is moved when overlay is created from timer
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10459 in the body.
You can then email your comments to 10459 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10459
; Package
emacs
.
(Mon, 09 Jan 2012 00:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Toby Cubitt <toby-predictive-dated-1327275432.bb87aa <at> dr-qubit.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 09 Jan 2012 00:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Emacs versions known to be affected:
------------------------------------
23.2.1, 24 (recent bzr checkout).
Steps to reproduce:
-------------------
1. Define the following function:
(defun test ()
(interactive)
(run-with-timer
2 nil
(lambda ()
(setq overlay (make-overlay 4 8))
(overlay-put overlay 'face '(background-color . "black"))
(let ((map (make-sparse-keymap)))
(overlay-put overlay 'keymap map)
(define-key map "t" (lambda () (interactive)
(message "overlay keymap binding")))))))
2. Position point somewhere between 4 and 8.
3. M-x test
4. type "t" (*without* moving point first)
Expected output:
----------------
Overlay keymap binding should display the message "overlay keymap binding".
Actual output:
--------------
Default `self-insert-command' binding inserts character "t" into the buffer.
Additional information:
-----------------------
Note that moving the point, e.g. one character to the right and then back,
in between septs 3. and 4. seems to activate the overlay keymap binding,
so that typing "t" in step 4. displays the correct message.
--
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10459
; Package
emacs
.
(Mon, 09 Jan 2012 03:54:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 10459 <at> debbugs.gnu.org (full text, mbox):
Yes, this is a known limitation: the set of active keymaps is computed
before waiting for the next key sequence.
You might be able to get around this problem by pushing some dummy event
(which you then bind to `ignore' in some keymap) onto
unread-command-event from your timer, just to force a refresh.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10459
; Package
emacs
.
(Mon, 16 Jan 2012 14:36:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 10459 <at> debbugs.gnu.org (full text, mbox):
> I've tested this, and it does indeed work. Thanks Stefan.
Cool. It's an ugly hack, but for now it's the best I can offer ;-(
> At the moment, for the dummy event, I'm using a keyboard event for an
> unlikely unicode character with every modifier set. Is there some better
> choice than this?
Use a symbol like `toby-cubitt-dummy-event'.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10459
; Package
emacs
.
(Mon, 16 Jan 2012 19:40:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 10459 <at> debbugs.gnu.org (full text, mbox):
On Sun, Jan 08, 2012 at 10:52:54PM -0500, Stefan Monnier wrote:
> Yes, this is a known limitation: the set of active keymaps is computed
> before waiting for the next key sequence.
>
> You might be able to get around this problem by pushing some dummy event
> (which you then bind to `ignore' in some keymap) onto
> unread-command-event from your timer, just to force a refresh.
I've tested this, and it does indeed work. Thanks Stefan.
At the moment, for the dummy event, I'm using a keyboard event for an
unlikely unicode character with every modifier set. Is there some better
choice than this?
Toby
--
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain
email: tsc25 <at> cantab.net
web: www.dr-qubit.org
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Sun, 05 Oct 2014 01:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Toby Cubitt <toby-predictive-dated-1327275432.bb87aa <at> dr-qubit.org>
:
bug acknowledged by developer.
(Sun, 05 Oct 2014 01:22:03 GMT)
Full text and
rfc822 format available.
Message #21 received at 10459-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
> On Sun, Jan 08, 2012 at 10:52:54PM -0500, Stefan Monnier wrote:
>> Yes, this is a known limitation: the set of active keymaps is computed
>> before waiting for the next key sequence.
This has been fixed around the start of 24.4 development: the set of
keymaps is recomputed at the start of a key sequence.
The examples in this and merged bugs work for me now. Please feel free
to reopen if you see a case where the problem's not fixed.
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Sun, 05 Oct 2014 01:22:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mihai Bazon <mihai <at> bazon.net>
:
bug acknowledged by developer.
(Sun, 05 Oct 2014 01:22:04 GMT)
Full text and
rfc822 format available.
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Sun, 05 Oct 2014 01:22:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mihai Bazon <mihai <at> bazon.net>
:
bug acknowledged by developer.
(Sun, 05 Oct 2014 01:22:05 GMT)
Full text and
rfc822 format available.
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Sun, 05 Oct 2014 01:22:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo <sdl.web <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 05 Oct 2014 01:22:05 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 02 Nov 2014 12:24:07 GMT)
Full text and
rfc822 format available.
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.