Skip to content

Instantly share code, notes, and snippets.

@Ironjanowar
Forked from prathik/bufs.el
Created January 19, 2018 11:30
Show Gist options
  • Save Ironjanowar/524ebf7cef886ab355ae5797d6ac7685 to your computer and use it in GitHub Desktop.
Save Ironjanowar/524ebf7cef886ab355ae5797d6ac7685 to your computer and use it in GitHub Desktop.
Emacs - Switch to new notes buffer
(defun new-scratch-buffer-new-window ()
"Create a new scratch buffer in a
new window. I generally take a lot of notes
in different topics. For each new topic hit
C-c C-s and start taking your notes.
Most of these notes don't need to be
saved but are used like quick post it
notes."
(interactive)
(let (($buf (generate-new-buffer "notes")))
(split-window-right)
(other-window 1)
(balance-windows)
(switch-to-buffer $buf)
(org-mode)
(insert "# Notes\n\n")
$buf
))
(global-set-key
(kbd "C-c C-s")
'new-scratch-buffer-new-window
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment