Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [widget]

The tag has no usage guidance.

0
votes
0answers
25 views

How to translate between custom choice type and widget items?

I have a custom variable (defcustom myvar .... :type '(choice (const :tag "foo" 1) ...)) and I need to map it to (widget-create ... '(item :tag "foo" :value 1) ...) ...
2
votes
1answer
89 views

Emacs Widget Library

Using this widget: (widget-create 'editable-field :size 4 :format "text1 %v text2") (widget-setup) I get the following output (where the underscores appear as a fillable grey area) text1 ____ text2 ...
1
vote
0answers
37 views

Customize-like form

I'd like to create a form, like the one displayed by customize, in order to ask to the user some information. The form should let me provide a description, a default value, and eventually display a ...
2
votes
1answer
50 views

Define widget key bindings

The following code: defines a major mode my-mode where C-d binding is redefined; opens a my-mode buffer inserting an editable-field widget. (require 'widget) (require 'wid-edit) ;; Define ...
1
vote
0answers
30 views

'editable-field' widget is not playing nice with `widget-value-set'

When I evaluate the following form, (defun magithub-issue-form () (interactive) (with-current-buffer (generate-new-buffer "*magithub issue*") (switch-to-buffer-other-window (current-buffer)) ...
1
vote
1answer
27 views

How can I stop newlines from being entered in an editable-field widget?

I have the following widget: (widget-create 'editable-field :size 76 :format "Title: %v") However, when I create this widget and edit its value, I can use C-j to insert new lines. How can I ...
1
vote
0answers
69 views

Emacs link widget gives the error “gui-get-primary-selection: No selection is available”

I am reading the The Emacs Widget Library. The library describes the widget properties in general and not per widget. So I'd like some more insights about the link widget properties and use. :notify ...
2
votes
1answer
56 views

Get widget at point

For example, I inserted many link widgets like this: (widget-create `(link :tag "Test link" :button-prefix "" :button-suffix "" :...
2
votes
1answer
87 views

How does one define a widget of type editable-list with validation?

I create my widget with the following code: (widget-create 'editable-list :entry-format "%i %d %v" :value '("") '(editable-field ...
9
votes
1answer
400 views

Are there any libraries for input fields in Emacs?

Quite a few Emacs modes use (something like) forms: the customization interface is one of them, the Message mode (read: its header part) is another one; there are more of them, unfortunately not ...
1
vote
2answers
219 views

Choosing files and directories from widgets

I'm looking for the most convenient way to set up a Customize options page to enter a set of directories and then select one of those directories and one file in the selected directory (if possible, ...
5
votes
1answer
298 views

elisp widgets: Modifying an editable-field's value real time when changing another one

This is cross-post from Stack Overflow I have a simple widget setup: (setq gobgen-widget-name (widget-create 'editable-field :size 25 :format "Name: ...