Skip to content

Instantly share code, notes, and snippets.

@edrex
Created April 18, 2016 17:13
Show Gist options
  • Save edrex/0b558592135f264f7a8e16119121b569 to your computer and use it in GitHub Desktop.
Save edrex/0b558592135f264f7a8e16119121b569 to your computer and use it in GitHub Desktop.
my/journal spacemacs layer (trimmed down)
(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