Added some custom capture template functions for daily todos

This commit is contained in:
Random936 2023-11-24 14:34:45 -08:00
parent 8dc3c9c636
commit b911096899
2 changed files with 21 additions and 1 deletions

View File

@ -569,6 +569,9 @@ Org mode by default contains an /agenda/ system which is like a basic calendar t
(setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
(setq org-priority-default ?D)
(setq org-priority-lowest ?D)
#+end_src
*** Refresh Org Agenda Files

View File

@ -2,7 +2,24 @@
As of now, I haven't added anything here, though I do expect to start adding some custom functions as I learn more about Elisp.
* Capture Template Functions
These functions are for my org roam daily capture template.
#+begin_src emacs-lisp
(message "functions.org: No functions yet!")
(defun jm/get-todos-with-priority (priority files)
(let ((items '()))
(org-map-entries
(lambda ()
(when (equal priority (cdr (assoc "PRIORITY" (org-entry-properties))))
(push (cdr (assoc "ITEM" (org-entry-properties))) items)))
"TODO=\"TODO\""
files)
items))
(defun jm/format-org-todo-items (items)
(mapconcat (lambda (item) (concat "- [ ] " item))
items
"\n"))
#+end_src