From aae7be3858ebc1c24fd8dafb072705702bd8d427 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 26 Sep 2023 10:20:44 -0400 Subject: [PATCH] Integrate the daily note with org-roam and add org-roam capture key --- emacs/.emacs.d/config/init-org.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emacs/.emacs.d/config/init-org.el b/emacs/.emacs.d/config/init-org.el index 4b45f1a..bf009be 100644 --- a/emacs/.emacs.d/config/init-org.el +++ b/emacs/.emacs.d/config/init-org.el @@ -18,7 +18,9 @@ (find-file filename) (goto-char (point-min)) (unless file-exists - (insert (format "* %s daily note" + (org-id-get-create) + (goto-char (point-max)) + (insert (format "#+title: %s daily note" (format-time-string "%Y-%m-%d"))) (newline)) (goto-char (point-max)))) @@ -34,7 +36,8 @@ "CANCELLED(c)"))) (org-capture-templates `(("d" "Daily note" plain (function org-find-daily-note) - "** %<%I:%M %p>") + "* %<%I:%M %p>") + ("n" "Org-roam note" plain (function org-roam-capture)) ("s" "Spotify task" entry (file+headline ,(expand-file-name "~/org/todo.org") "Spotify") "* TODO %i%?")