Questions tagged [widget]
The widget tag has no usage guidance.
24 questions
1
vote
1
answer
45
views
avoid newlines after menu-choice widget and/or after %v
I'm using menu-choice elisp widgets, and I find that a newline is inserted after each one, unlike say an editable-field widget.
I would like to place multiple menu-choice widgets side-by-side (like a ...
0
votes
1
answer
93
views
Local map of xwidget-webkit-mode?
In xwidget-webkit-mode, the command M-x local-set-key RET S-<right> windmove-right RET has no effect — the key continues to be bound to xwidget-webkit-pass-command-event. Also, M-x local-unset-...
0
votes
0
answers
45
views
Emacs widgets: editing problems with integer widget
If I try to set up a buffer with just one integer widget, I have a very hard time editing the field. The initial value seems stuck there and, if I try to edit it away I get a End of file during ...
0
votes
1
answer
83
views
How to add choice-items to a menu-choice widget through code?
Looking up information from an Active Directory, I want to populate a form. Generally that works fine with editable-fields, since all one has to do is to add the value, which Emacs has a function for ...
0
votes
0
answers
118
views
Is there a way to create a emacs shotcut that runs a specific terminal command before opening emacs?
a friend of mine recomended that I use a program called obsidian to make notes,and I quite liked the idea, but i didn't like the program. I have been searching and it seeams to me that org-roam in ...
0
votes
1
answer
51
views
Prepend custom field names when inserting a multi-list widget
I am trying to resolve a related question relating to creating a simple form to input and return various fields: How to pop open a forms template to enter multiple values To that end, I defined a ...
0
votes
0
answers
45
views
About input fields in a buffer
I've been perusing forms.el trying to find out how would one go about having a text input field in a buffer that can be edited, without any luck. I'm completely missing the part where the field is ...
1
vote
1
answer
349
views
When compiling Emacs on RHEL8 should I better bind to GTK3 or GTK2?
I am compiling Emacs 27.1 on a RHEL8 Linux box. This RHEL system is a remote system I log in from my Windows machine using MobaXterm (Personal Edition V12.1) on the Windows machine as X server.
On ...
0
votes
0
answers
25
views
Widgets: How to notify on exiting "editable-field"
This is a follow-up on Creating buttons/input fields.
I learned that forms (or rather its elements) in Emacs are called widgets and I am now experimenting on how I can get the best result for what I ...
0
votes
1
answer
176
views
How to use unicode for the checkbox in customize buffers (**not** in org mode)?
I'm trying to modify the appearance of customize buffers. I managed to modify the button but I did not find how to change the appearance of the checkbox nor the dropdown indicator (▽). Ideally I would ...
3
votes
2
answers
98
views
A custom type specification like “repeat,” but when there’s only one item, it’s inline
So, I’m trying to add Customize support to packages that use a lot of plists, and where the value of pretty much any option can be either a single item or a list. I could have every single plist ...
0
votes
0
answers
116
views
In a buffer with widgets how can I find out what function is called on a (link) widget
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".
...
2
votes
0
answers
58
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
1
answer
268
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
0
answers
52
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
1
answer
106
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
0
answers
59
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
1
answer
59
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
0
answers
120
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
1
answer
99
views
Get widget at point
For example, I inserted many link widgets like this:
(widget-create `(link :tag "Test link"
:button-prefix ""
:button-suffix ""
:...
3
votes
1
answer
208
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
1
answer
916
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 ...
2
votes
2
answers
305
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, ...
6
votes
1
answer
480
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: ...