I'm new to Elisp. Was trying out the following code to insert clickable buttons into a temporary buffer
(with-output-to-temp-buffer "*tmp*"
(insert-button "My Button"))
It doesn't work this way, the button got created in current buffer instead of tmp. Then I tried modifying code to following
(with-output-to-temp-buffer "*tmp*"
(toggle-read-only)
(insert-button "My Button"))
Unfortunately "toggle-read-only" seems only to toggle read-only for current buffer NOT tmp.
Is there any way I could achieve this - to insert button directly into a temporary buffer without actually switching the cursor focus to it?
Here's the code:
(with-current-buffer (get-buffer-create "*tmp*")
(insert-button "My Button"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With