In this particular scenario, there exists a function with multiple arguments:

(defun example-fn (arg &opional one two three four five)
  (interactive "P")
  ;; ...
  ;; ...
  ;; ...
    (list arg one two three four five))

I am looking for an Emacs equivalent of a form to enter multiple fields, with a submit button to pass all of the fields as arguments to example-fn. Using the TAB key to cycle forwards between entry fields, and S-TAB to cycle backwards between entry fields, would be most helpful. Pressing the RET key when the SUBMIT button is selected would also be helpful. How can I do this all within Emacs?

[Some initial brainstorming of ideas include something like M-x customize or a webpage displayed within Emacs; however, there may be something more specific that already exists for this particular purpose ...]         

  • There is the Emacs Widget library. I believe Customize uses it but I'm not sure (I checked and it does).
    – NickD
    Commented Jan 7, 2022 at 18:12
  • I am not sure what you would like exactly, but there is also the transient package, which is great for this type of work. Commented Jan 8, 2022 at 16:51


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.