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
Message #11 received at 34506 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Feb 17, 2019 at 10:24 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 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.
>
I really don't fully understand what you are saying here.
There is a section in widget.info which describes use of the (push-button)
function which is defined in button.el, so although I
understand you are saying there are two different types
of buttons, it seems like they are connected. Maybe
the custom widgets use text-property buttons.
If you could, for each of the two types of buttons,
just show code that finds the button at point and then
activates it, so I can see the difference clearly. That
would be most helpful.
And what about (button-type (button-at (point))) returning
nil when button-at returns non-nil. Both of these functions
operate on push-buttons as the button.el code reflects, right?
If so, then that should be a bug. If not, then it could use
some explanation.
Thanks,
Bob
[Message part 2 (text/html, inline)]
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.