all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bob Weiner <rsw@gnu.org>
Cc: 34506@debbugs.gnu.org
Subject: bug#34506: 27.0.50: push-button bug with basic text-property button
Date: Sun, 17 Feb 2019 17:24:27 +0200	[thread overview]
Message-ID: <83pnrql9p0.fsf@gnu.org> (raw)
In-Reply-To: <m04l935qts.rsw@gnu.org> (message from Bob Weiner on Sat, 16 Feb 2019 17:08:47 -0500)

> From: Bob Weiner <rsw@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.





  reply	other threads:[~2019-02-17 15:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-16 22:08 bug#34506: 27.0.50: push-button bug with basic text-property button Bob Weiner
2019-02-17 15:24 ` Eli Zaretskii [this message]
2019-02-17 23:46   ` Robert Weiner
2019-02-18 15:47     ` Eli Zaretskii
2019-02-18 16:56       ` Robert Weiner
2019-02-18 17:36         ` Eli Zaretskii
2019-02-18 20:52         ` Basil L. Contovounesios
2019-02-18 20:51       ` Basil L. Contovounesios
2019-02-18 22:54         ` Robert Weiner
2019-02-19  3:08           ` Basil L. Contovounesios
2019-02-19  3:29         ` Eli Zaretskii
2019-02-19 15:26           ` Basil L. Contovounesios
2019-02-20  5:22             ` Robert Weiner
2019-02-25  2:40               ` Basil L. Contovounesios
2019-03-02 12:34                 ` Eli Zaretskii
2019-04-07  3:14                   ` Basil L. Contovounesios

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pnrql9p0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34506@debbugs.gnu.org \
    --cc=rsw@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.