On Fri, Mar 10, 2023, 06:26 Yuan Fu <casouri@gmail.com> wrote:

> 'read-string-from-buffer' was intended to do this by relying on
> 'string-edit'.  You could add a new function e.g. named
> 'read-expression-from-buffer' that does the same as
> 'read--expression' but using a buffer instead of the minibuffer.

Of course Emacs has one built-in :-) I’ll see if I can make some improvement to the read-string-from-buffer functions. In particular, I think arbitrary setup function and validator would be useful additions.

If I'm following you correctly, also a serializer/deserializer function pair, so the user can edit expressions in non-lisp syntax and still have them stored as lisp values.

João