Created
April 18, 2016 17:13
-
-
Save edrex/0b558592135f264f7a8e16119121b569 to your computer and use it in GitHub Desktop.
my/journal spacemacs layer (trimmed down)
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
(setq journal-directory "~/Documents/Journal/") | |
(defun my/journal-path (time name) | |
(concat (file-name-as-directory journal-directory) (format-time-string "%Y-%m-%d" time) "-" name ".org") | |
) | |
(defun my/journal (title) | |
"Open the journal file for today" | |
(interactive) | |
(find-file (my/journal-path nil title))) | |
(spacemacs/declare-prefix "o" "user prefix") | |
(spacemacs/set-leader-keys "oj" 'my/journal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment