From 7aea6199cd4c9e4c166572edec62bd1e22d80c0b Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 13 Jun 2024 13:49:23 -0400 Subject: [PATCH] Fix org-daily capture template --- emacs/.emacs.d/config/init-org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs/.emacs.d/config/init-org.el b/emacs/.emacs.d/config/init-org.el index 81c61f0..b90b9ad 100644 --- a/emacs/.emacs.d/config/init-org.el +++ b/emacs/.emacs.d/config/init-org.el @@ -33,6 +33,8 @@ DATE should be in the format \"YYYY-MM-DD\". If called interactively, default to (insert (format "#+title: %s daily note" date)) (newline)) (goto-char (point-max)))) + (defun org-capture-daily-note () + (org-find-daily-note (format-time-string "%Y-%m-%d"))) (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t))) @@ -59,7 +61,7 @@ DATE should be in the format \"YYYY-MM-DD\". If called interactively, default to "DONE(d)" "CANCELLED(c)"))) (org-capture-templates `(("d" "Daily note" plain - (function org-find-daily-note) + (function org-capture-daily-note) "* %<%I:%M %p>") ("n" "Org-roam note" plain (function org-roam-capture)) ("h" "Hummingbird task" entry @@ -190,6 +192,6 @@ DATE should be in the format \"YYYY-MM-DD\". If called interactively, default to :config (general-def 'normal org-roam-backlinks-mode-map "RET" #'org-open-at-point - "q" #'bury-buffer)) + "q" #'quit-window)) (provide 'init-org)