all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Weiner <rsw@gnu.org>
To: Eli Zaretskii <eliz@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 18:46:09 -0500	[thread overview]
Message-ID: <CA+OMD9i2QyJYGkeS3o5LJJL7TayJSBiPb+P0oPNi5uR3OrJgOg@mail.gmail.com> (raw)
In-Reply-To: <83pnrql9p0.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]

On Sun, Feb 17, 2019 at 10:24 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > 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.
>

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

[-- Attachment #2: Type: text/html, Size: 4677 bytes --]

  reply	other threads:[~2019-02-17 23:46 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
2019-02-17 23:46   ` Robert Weiner [this message]
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=CA+OMD9i2QyJYGkeS3o5LJJL7TayJSBiPb+P0oPNi5uR3OrJgOg@mail.gmail.com \
    --to=rsw@gnu.org \
    --cc=34506@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rswgnu@gmail.com \
    /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.