8.1.2 The item Widget


type ::= (item [keyword argument]... value)

A useful widget that holds a constant value, and can be included in other widgets. Its super is the default widget.

As can be seen in the syntax, the item widget is one of the widget that handles the args argument to widget-create in a specific way. If present, value is used to initialize the :value property. When created, it inserts the value as a string in the buffer.


(widget-create 'item :tag "Today is" :format "%t: %v\n"
               (format-time-string "%d-%m-%Y"))

By default, it has the following properties:


The function that allows it to handle value.


Prints the representation of :value in the buffer.


Returns the value stored in :value.


A value matches the item widget if it’s equal to its :value.


Inline values match the item widget if :value is a sublist of values.


The item widget notifies itself of an event.


By default, the item widget inserts its tag in the buffer.