* What function does a button click call?
@ 2014-10-23 17:43 Raffaele Ricciardi
2014-10-26 18:39 ` Michael Heerdegen
0 siblings, 1 reply; 3+ messages in thread
From: Raffaele Ricciardi @ 2014-10-23 17:43 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I am trying to determine what function gets called for a click on a
"Choose" button in a Customize buffer.
I have run "customize-face", then I have positioned point over a
"Choose" button, and then I have evaluated the expression:
(button-at (point))
that has returned:
#<marker (moves after insertion) at 477 in *Customize Face: Font
Lock Variable Name Face*>
This should mean that I am dealing with a button, shouldn't it? Yet,
the expression:
(button-get (button-at (point)) 'action)
has returned NIL. Actually, the above expression has returned NIL for
all the button properties documented in the manual.
Any help? Thanks.
--
Software:
- GNU Emacs 24.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What function does a button click call?
2014-10-23 17:43 What function does a button click call? Raffaele Ricciardi
@ 2014-10-26 18:39 ` Michael Heerdegen
2014-10-26 19:19 ` Michael Heerdegen
0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2014-10-26 18:39 UTC (permalink / raw)
To: help-gnu-emacs
Raffaele Ricciardi <rfflrccrd@gmail.com> writes:
> Any help? Thanks.
I think the source of the confusion is the fact that customize uses
wid-edit.el, not button.el.
Both libraries use a 'button named overlay property, that's why
`button-at' doesn't fail although there is no button.el button there.
Try M-x debug-on-entry widget-button-click RET to find out what happens
when pressing the button.
HTH,
Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What function does a button click call?
2014-10-26 18:39 ` Michael Heerdegen
@ 2014-10-26 19:19 ` Michael Heerdegen
0 siblings, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2014-10-26 19:19 UTC (permalink / raw)
To: help-gnu-emacs
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Try M-x debug-on-entry widget-button-click RET to find out what
> happens when pressing the button.
BTW, a good strategy to find out what happens after hitting some key is
to use C-c k to see which command will be invoked, and then to M-x
debug-on-entry this command. I do that so often that I wrote an own
command doing that, and bound it to a simple key:
(defun my-debug-on-next-key ()
"Enter the debugger for the next command."
(interactive)
(let* ((keys (read-key-sequence "Debugging next key sequence..."))
(cmd (key-binding keys)))
(debug-on-entry cmd)
(unwind-protect
(call-interactively cmd keys)
(cancel-debug-on-entry cmd))))
Regards,
Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-26 19:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 17:43 What function does a button click call? Raffaele Ricciardi
2014-10-26 18:39 ` Michael Heerdegen
2014-10-26 19:19 ` Michael Heerdegen
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.