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 created and its state maintained.

Is there any chance anybody could tell me (roughly) how to achieve this in elisp?

While I can think of ways to get there with what I know of elisp, I would really appreciate if some guru could give me some pointers.

  • Does this help? stackoverflow.com/questions/10166600/…
    – phils
    Nov 2, 2021 at 22:31
  • Is your goal to use forms.el or to not use forms.el? I can't tell.
    – phils
    Nov 2, 2021 at 22:38
  • Perhaps you should read the doc of the Widget library and have a look at the example. Especially, the call of the widget-setup function is important at the end of the example. Working with widgets is pretty simple that way. You can save the widgets created by widget-create in local vars and retrieve their values with the function widget-value.
    – Tobias
    Nov 3, 2021 at 5:38
  • I answered eairler in the morning, but I can't see my comment here. Would like to thanks both, Phils and Tobias for your comments. I'm basically after having an input field in an otherwise read-only buffer, say, a ten characters in length region, that I'd interact with through a process that lets a program I made read the contents of it, offer completions for what is sees, report a syntax error, or simply accept that line as correct, clearing the field and leaving it ready for the next "command". I fear using `widgets.el' is going to be too complicated, because I'd like to control what charact Nov 3, 2021 at 17:22


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.