10 Inspecting Widgets

There is a separate package to browse widgets, in ‘wid-browse.el’. This is intended to help programmers who want to examine the content of a widget. The browser shows the value of each keyword, but uses links for certain keywords such as ‘:parent’, which avoids printing cyclic structures.

Command: widget-browse widget

Create a widget browser for widget.

When called interactively, prompt for widget.

Command: widget-browse-other-window widget

Create a widget browser for widget and show it in another window.

When called interactively, prompt for widget.

Command: widget-browse-at pos

Create a widget browser for the widget at pos.

When called interactively, use the position of point.

In addition, there’s a function to describe the widget at point.

Command: widget-describe &optional widget-or-pos

Describe the widget at point.

When called from Lisp, widget-or-pos might be the widget to describe or a buffer position where a widget is present. If widget-or-pos is nil, the widget to describe is the widget at point.

This command sets up a help buffer for providing information about the widget, mainly its :action and :mouse-down-action functions, and provides links to describe it in more detail using the widget-browse commands described above.