-
-
Save Ironjanowar/524ebf7cef886ab355ae5797d6ac7685 to your computer and use it in GitHub Desktop.
Emacs - Switch to new notes buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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