Updated dynamic habits to use org-capture relative time

This commit is contained in:
Random936 2023-11-27 21:04:52 -08:00
parent 988f5cabb6
commit 9e56768522

View File

@ -18,11 +18,12 @@ These functions are for my org roam daily capture template.
(mapconcat #'identity (mapconcat #'identity
(delq nil (org-map-entries (delq nil (org-map-entries
#'jm/daily-todos-priority-tasks-helper #'jm/daily-todos-priority-tasks-helper
"/TODO=\"IN PROGRESS\"/" "TODO=\"IN PROGRESS\""
files)) "\n")) files)) "\n"))
(defun jm/daily-todos-dynamic-habits (habit week-days) (defun jm/daily-todos-dynamic-habits (habit week-days)
(let ((today (downcase (format-time-string "%a")))) (let* ((org-date (or (org-capture-get :default-time) (current-time)))
(today (downcase (format-time-string "%a" org-date))))
(when (seq-contains-p week-days today) habit))) (when (seq-contains-p week-days today) habit)))
#+end_src #+end_src