0

In a buffer with widgets how can I find out what functions widgets call?

Let's say I position the cursor on a widget, I execute M-x widget-browse-at and know now that the widget is of class "link".

From experiments I know that activating the widget (i.e. pressing RET on it) creates an new buffer, but what function calls it for this?

describe-key gives me only wid-edit as a function, but somehow wid-edit then must call the real action function.

How can I find out which function that is?

Is there something like an action table for widgets?


Some more details:

1) When I am on the widget and call M-x widget-browse-at I get a buffer like this:

Widget object browser.

Class: link

:args


:value
    "Open"

:notify
    [show]

:button-overlay
    #<overlay from 316 to 322 in *ein:notebooklist http://127.0.0.1:8989*>

:from
    [show]

:to
    #<marker at 322 in *ein:notebooklist http://127.0.0.1:8989*>

2) When in that buffer I am on the [show] widget of the :notify property and I call M-x widget-browse-at I get:

Widget object browser.

Class: push-button

:args


:value
    [show]

:tag
    "show"

:action
    [show]

:button-overlay
    #<overlay in no buffer>

:from
    [show]

:to
    #<marker in no buffer>

3) Using M-x widget-browse-at again doesn't give anything new.

So M-x widget-browse-at doesn't seem to point me to the function eventually called (which in this case probably is ein:notebook-open).

  • I'm not familiar with the widget library. It is not widely used except the customization buffer. I guess there should be a :notify field, its value is a function and will be called when you click the link. I find this by trying the "other work" link of (widget) Programming Example. – xuchunyang Nov 18 at 6:12
  • @xuchunyang In my case (of the EIN notebook list) the :notify field just contains [show]... – halloleo Nov 18 at 6:30
  • You need to check [show] to show the function. – xuchunyang Nov 18 at 7:11
  • @xuchunyang looking with widget-browse-at at the [show] field doesn't reveal any function, just :value = [show] and :action = [show]. I'll put this in the question. – halloleo Nov 19 at 3:11
  • Look what :action of the push-button says. I.e., click on [show] there. – Tobias Nov 19 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.