Instant scratch buffer for current mode

When emacs launches it will typically show the *scratch* buffer, which is in lisp mode by default, and is useful for making rough notes and evaluating bits of lisp code.

You can chose the default mode of the scratch buffer by setting the variable initial-major-mode as described on emacs redux. So if you want it to be in text mode, use

(setq initial-major-mode 'text-mode)

Today I wanted a scratch buffer in org-mode for some rough work with a table. I could have switched to the scratch buffer and used M-x org-mode to switch the major mode of the scratch buffer, but I found a nicer solution. I installed the package scratch and added the following to my emacs config file:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; multiple scratch buffers                                               ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; uses package "scratch"
(autoload 'scratch "scratch" nil t)

With this package, if you use M-x scratch it will launch a scratch buffer for the current mode. So in my org-mode buffer, using this command gave me a scratch buffer called *org* where I could put my temporary org scribblings.