GNU bug report logs -
#34506
27.0.50: push-button bug with basic text-property button
Previous Next
Reported by: Bob Weiner <rsw <at> gnu.org>
Date: Sat, 16 Feb 2019 22:10:02 UTC
Severity: minor
Tags: fixed
Found in version 27.0.50
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Bob Weiner <rsw <at> gnu.org>
> Date: Sat, 16 Feb 2019 17:08:47 -0500
>
> With point on a "Choose" button in a customize-group buffer, point is on
> a text-property button and (button-at (point)) returns a marker object
> rather than a button whose action is a marker object. Thus, if one
> calls (push-button) at that location, it sends this marker object as the
> button argument to 'button-activate' which then triggers an error when
> it tries to funcall the button's action which is nil in this case.
> Shouldn't there be additional logic that checks if the button itself is
> a marker and then uses the button as the action in that case?
>
> Related to this: (button-type (button-at (point))) returns nil which seems
> to contradict the fact that button-at returns non-nil.
>
> Am I missing things here or does button-activate need additional code?
button-activate and push-button already include that additional code,
but you are trying to invoke them on a kind of "button" that they
don't know how to handle. The problem is that "button" is overloaded
here: buttons created by Customize are not of the kind supported by
functions from button.el, you need to invoke functions described in
widget.info instead. The "text-property buttons" mentioned in the
documentation of button-at etc. are those created by make-text-button
and insert-text-button, not those created by Customize.
The ELisp manual hints on this at the beginning the parent node,
"Buttons". Maybe that's not clear enough; patches to make that more
clear are welcome. Other than that, I don't see a bug here.
Thanks.
This bug report was last modified 6 years and 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.