Subject: bug#5473: Fwd: insert-text-button button does not always work

From: Lennart Borgman <[email-masked]>
Date: Mon, 25 Jan 2010 18:17:04 +0100

I got no answer to this one so I am reporting it as a bug instead.

I can't find out what is happening. It is reproducable though it is a
bit random. Some kind of race condition.

(key-binding [13]) on the button in this strange state gives just
`newline' instead of `push-button'.

Note that the same code normally gives a totally fine button.

It has something to do with calling the function that creates the
buffer from command line since it is then it fails, but I have no idea
why. The button looks perfectly normal. It has the category
`default-button'  which should have given it the key binding
`push-button'.

I also observer that there is something wrong with (get-char-property
(point) 'keymap). This should return the `default-button' keymap.
Sometimes it does not do that even in the case where the button works.

The bug can be reproduced by using the library pause.el from nXhtml.
At the moment I unfortunately do not know how to make a smaller
example. To reproduce it do

   emacs -Q -l pause.elc --eval "(pause-start 0.05)

The two buttons in the orange buffer has this problem. If the eval
part of the command line above is omitted and it is evaluated in M-:
instead

   M-: (pause-after 0.05)

then the buttons works ok.

Note that in both cases the buffer is created in a timer after 0.05 minutes.

---------- Forwarded message ----------
From: Lennart Borgman <[email-masked]>
Date: Mon, Jan 25, 2010 at 4:20 PM
Subject: insert-text-button button does not always work
To: Emacs-Devel devel <[email-masked]>

I am hunting a bug related to insert-text-button. The button sometimes
does not work when I press RET and sometimes it does.

Clicking on it with the mouse seems to work always.

Yesterday it looked liked it always worked if it did hit any key
before the buffer with the button is shown. (The buffer is loaded from
command line.) Today I can not reproduce this.

Any bell ringing in someone's head about this?