Renamed functions and added new dynamic-habits function
This commit is contained in:
parent
25b18752e7
commit
abcaf4bb0e
@ -10,20 +10,22 @@ As of now, I haven't added anything here, though I do expect to start adding som
|
|||||||
These functions are for my org roam daily capture template.
|
These functions are for my org roam daily capture template.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun jm/get-todos-with-priority-helper ()
|
(defun jm/daily-todos-priority-tasks-helper ()
|
||||||
(let ((item-priority (org-entry-get nil "PRIORITY"))
|
(let ((item-priority (org-entry-get nil "PRIORITY"))
|
||||||
(item-name (org-entry-get nil "ITEM"))
|
(item-name (org-entry-get nil "ITEM"))
|
||||||
(item-id (car (org-property-values "ID"))))
|
(item-id (car (org-property-values "ID"))))
|
||||||
(when (and item-id (equal priority item-priority))
|
(when (and item-id (equal priority item-priority))
|
||||||
(format "- [ ] [[id:%s][%s]]" item-id item-name))))
|
(format "- [ ] [[id:%s][%s]]" item-id item-name))))
|
||||||
|
|
||||||
(defun jm/get-todos-with-priority (priority files)
|
(defun jm/daily-todos-get-priority-tasks (priority files)
|
||||||
(mapconcat #'identity
|
(mapconcat #'identity
|
||||||
(delq nil (org-map-entries
|
(delq nil (org-map-entries
|
||||||
#'jm/get-todos-with-priority-helper
|
#'jm/daily-todos-priority-tasks-helper
|
||||||
"TODO=\"TODO\""
|
"TODO=\"TODO\""
|
||||||
files)) "\n"))
|
files)) "\n"))
|
||||||
|
|
||||||
(jm/get-todos-with-priority "A" (org-agenda-files))
|
(defun jm/daily-todos-dynamic-habits (habit week-days)
|
||||||
|
(let ((today (downcase (format-time-string "%a"))))
|
||||||
|
(when (seq-contains-p week-days today) habit)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user