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?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Perhaps something like:
(with-current-buffer "*scratch*" (insert "Test"))
is what you want.