Is there any way to insert text into a buffer that isn't the active buffer with Elisp?
Perhaps there is an equivalent to with-temp-buffer
that takes a specific, existing buffer as an argument?
Perhaps something like:
(with-current-buffer "*scratch*" (insert "Test"))
is what you want.