On Sun, Feb 17, 2019 at 10:24 AM Eli Zaretskii wrote: > > From: Bob Weiner > > 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