From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bob Weiner Newsgroups: gmane.emacs.bugs Subject: bug#34506: 27.0.50: push-button bug with basic text-property button Date: Sat, 16 Feb 2019 17:08:47 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="101584"; mail-complaints-to="usenet@blaine.gmane.org" To: 34506@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 16 23:10:13 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 1gv8A0-000QIv-PZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Feb 2019 23:10:13 +0100 Original-Received: from localhost ([127.0.0.1]:33307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gv89z-0000IS-N6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Feb 2019 17:10:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gv89s-0000IL-2f for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:10:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gv89q-0002Zz-W7 for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:10:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gv89q-0002Zh-TB for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gv89q-0007UA-BP for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bob Weiner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Feb 2019 22:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34506 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155035495228705 (code B ref -1); Sat, 16 Feb 2019 22:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Feb 2019 22:09:12 +0000 Original-Received: from localhost ([127.0.0.1]:50576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv891-0007Sv-Ip for submit@debbugs.gnu.org; Sat, 16 Feb 2019 17:09:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv88z-0007Sj-Q0 for submit@debbugs.gnu.org; Sat, 16 Feb 2019 17:09:10 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:33876) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gv88u-00026S-Iy for submit@debbugs.gnu.org; Sat, 16 Feb 2019 17:09:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gv88t-0000El-Du for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:09:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gv88r-00025P-El for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:09:03 -0500 Original-Received: from mail-qt1-f172.google.com ([209.85.160.172]:33712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gv88r-000226-Aa for bug-gnu-emacs@gnu.org; Sat, 16 Feb 2019 17:09:01 -0500 Original-Received: by mail-qt1-f172.google.com with SMTP id z39so15243601qtz.0 for ; Sat, 16 Feb 2019 14:08:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=I7rhuoiDssI6uKE3R1qiEXkkebbAscMFeuH3zO5Aypg=; b=WdVfdyE2+7lbpTIoqwyhTsfPT/xF7gKoYPcvTE3VTfzQrW8UW5r2TuYoEOsXXq/1ql 1fvaSxqmvHqpjSj7N50lqFle6Qq+YAN0Lc5XdmNZyWMQc91xZFdW7vK3aCBXw7/J1CHI FdaHRoEqJGrjm25N2mVwrMyGKEnZGFirAazu3sXxKc/NqjE7Hz90AhDu1X75S2ocM9JC wVEq03Xj77VAr6MmkBaTOon7aRLqKPuGCuFfNvFg85qNNC22ZrMjHolhSDRz7pFAQ4sd tUiJeQm2eRrAMGgAuYPAMqgN3zeW8SB5BqfUxm3kzNKKT5FCWDDdVDtVdMF7vQnpMJAO 4gKg== X-Gm-Message-State: AHQUAuZVBiqWWkwGH0eD0BIHm+KwrFuZ+hqz/PF3NGkkUiatNohA/CQc cqXft/ztHrNVU1RQyRaHWD+sfqu3 X-Google-Smtp-Source: AHgI3IZZGGuBS0YpAO9VX42TF0k6hEv9gCE8cGTnp/AV/vfcH/BjD5cxqPMyEwGJ4rgIUQ2gnpOypQ== X-Received: by 2002:a0c:9346:: with SMTP id e6mr12113419qve.98.1550354929305; Sat, 16 Feb 2019 14:08:49 -0800 (PST) Original-Received: from water-imac.local.gnu.org (ool-2f1481cf.dyn.optonline.net. [47.20.129.207]) by smtp.gmail.com with ESMTPSA id y17sm3962342qtc.33.2019.02.16.14.08.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Feb 2019 14:08:48 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:155461 Archived-At: >From the Elisp manual (https://www.gnu.org/software/emacs/manual/html_node/= elisp/Manipulating-Buttons.html), we have these accurate explanations: =E2=80=94 Function: button-at pos Return the button at position pos in the current buffer, or nil. If the b= utton at pos is a text property button, the return value is a marker pointi= ng to pos. =E2=80=94 Function: button-activate button &optional use-mouse-action Call button's action property (i.e., invoke the function that is the valu= e of that property, passing it the single argument button). If use-mouse-ac= tion is non-nil, try to invoke the button's mouse-action property instead o= f action; if the button has no mouse-action property, use action as normal. ----- 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? Thanks, Bob ------- In GNU Emacs 27.0.50 (build 13, x86_64-apple-darwin16.7.0, NS appkit-1504.8= 3 Version 10.12.6 (Build 16G1036)) of 2017-12-17 built on bka-iMac.local Repository revision: 36375d35aa06e84865cce678559ddfa8f79a9775 Windowing system distributor 'Apple', version 10.3.1561 Recent messages: [Sat 04:46:35 PM]=20 [Sat 04:46:35 PM]=20 [Sat 04:46:35 PM] Result: nil [Sat 04:46:37 PM]=20 [Sat 04:46:37 PM]=20 [Sat 04:46:37 PM] Result: nil [Sat 04:46:38 PM]=20 [Sat 04:46:38 PM] nil [Sat 04:47:16 PM]=20 Back to top level Configured using: 'configure --with-ns --with-imagemagick --without-pop --with-mailutils CC=3Dclang 'CFLAGS=3D-O3 -g'' Configured features: JPEG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Custom Minor modes in effect: recentf-mode: t treemacs-follow-mode: t treemacs-filewatch-mode: t treemacs-git-mode: deferred treemacs-fringe-indicator-mode: t async-bytecomp-package-mode: t diff-auto-refine-mode: t desktop-save-mode: t winner-mode: t which-key-mode: t which-function-mode: t persistent-scratch-autosave-mode: t global-edit-server-edit-mode: t delete-selection-mode: t auto-compile-on-load-mode: t auto-compile-on-save-mode: t column-number-indicator-zero-based: t dynamic-completion-mode: t eros-mode: t shell-dirtrack-mode: t show-paren-mode: t global-company-mode: t company-mode: t ace-window-display-mode: t major-mode-icons-mode: t minibuffer-depth-indicate-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t