From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34506: 27.0.50: push-button bug with basic text-property button Date: Sun, 17 Feb 2019 17:24:27 +0200 Message-ID: <83pnrql9p0.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="264601"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34506@debbugs.gnu.org To: Bob Weiner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 17 16:25:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvOJc-0016c6-Cd for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Feb 2019 16:25:12 +0100 Original-Received: from localhost ([127.0.0.1]:42872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvOJb-0003PO-9n for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Feb 2019 10:25:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvOJU-0003PH-4u for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 10:25:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvOJT-0003RL-8U for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 10:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52184) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvOJT-0003RD-4L for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 10:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gvOJR-00034z-Va for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 10:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Feb 2019 15:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34506 X-GNU-PR-Package: emacs Original-Received: via spool by 34506-submit@debbugs.gnu.org id=B34506.155041707211795 (code B ref 34506); Sun, 17 Feb 2019 15:25:01 +0000 Original-Received: (at 34506) by debbugs.gnu.org; 17 Feb 2019 15:24:32 +0000 Original-Received: from localhost ([127.0.0.1]:51465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvOIx-00034B-PY for submit@debbugs.gnu.org; Sun, 17 Feb 2019 10:24:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvOIw-00033y-4S for 34506@debbugs.gnu.org; Sun, 17 Feb 2019 10:24:30 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvOIq-0003Co-Tq; Sun, 17 Feb 2019 10:24:24 -0500 Original-Received: from [176.228.60.248] (port=2364 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gvOIq-0003RP-Hx; Sun, 17 Feb 2019 10:24:24 -0500 In-reply-to: (message from Bob Weiner on Sat, 16 Feb 2019 17:08:47 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155466 Archived-At: > 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. 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.