(feat!)capture: change id creation to headline on entry-type capture-templates

This commit is contained in:
Jethro Kuan
2022-01-20 14:46:22 -08:00
committed by Dustin Farris
parent 89dfaef38b
commit ed94524964
4 changed files with 248 additions and 28 deletions

View File

@@ -339,11 +339,12 @@ In this case, interactive selection will be bypassed."
(when goto (run-hooks 'org-roam-dailies-find-file-hook)))
(add-hook 'org-roam-capture-preface-hook #'org-roam-dailies--override-capture-time-h)
(defun org-roam-dailies--override-capture-time-h ()
"Override the `:default-time' with the time from `:override-default-time'."
(prog1 nil
(when (org-roam-capture--get :override-default-time)
(org-capture-put :default-time (org-roam-capture--get :override-default-time)))))
(when (org-roam-capture--get :override-default-time)
(org-capture-put :default-time (org-roam-capture--get :override-default-time)))
nil)
;;; Bindings
(defvar org-roam-dailies-map (make-sparse-keymap)