If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer?
This is what I use - I have this bound to a convenient keystroke. It sends you to the *scratch*
buffer, regardless of whether or not it already exists, and sets it to be in lisp-interaction-mode
(defun eme-goto-scratch ()
"this sends you to the scratch buffer"
(interactive)
(let ((eme-scratch-buffer (get-buffer-create "*scratch*")))
(switch-to-buffer eme-scratch-buffer)
(lisp-interaction-mode)))