org-zk-journal-today
creates a new file with the current date as
name in the
org-zk-journal-path
.
(defcustom org-zk-journal-path "~/org/journal/" "Location for journal files.") (defun org-zk-journal-title () "Filename to use for the journal entry files." (format-time-string "%F")) (defun org-zk-journal-today () "Create or open the journal file for today." (interactive) (let* ((title (org-zk-journal-title)) (path (concat org-zk-journal-path title ".org"))) (if (file-exists-p path) (progn (find-file path) (goto-char (point-max))) (with-current-buffer (find-file path) (funcall 'org-zk-default-setup-fn title) (save-buffer))))) (provide 'org-zk-journal)