diff options
| author | 2026-05-29 07:31:03 -0700 | |
|---|---|---|
| committer | 2026-05-29 07:31:03 -0700 | |
| commit | bd15136998afd23b25096a15c606a676c9f8f42a (patch) | |
| tree | dba2be73ed4b9c1b26c2ca89652519d870703615 | |
| parent | 09a4099586657170cbdcff071b2d0fac5ed133b7 (diff) | |
| download | emacs-config-bd15136998afd23b25096a15c606a676c9f8f42a.tar.gz emacs-config-bd15136998afd23b25096a15c606a676c9f8f42a.zip | |
oni-org: Add Trash task to morning checklist
| -rw-r--r-- | oni-org/capture-templates/morning-checklist-trash.org | 4 | ||||
| -rw-r--r-- | oni-org/oni-org.el | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/oni-org/capture-templates/morning-checklist-trash.org b/oni-org/capture-templates/morning-checklist-trash.org new file mode 100644 index 0000000..813fb64 --- /dev/null +++ b/oni-org/capture-templates/morning-checklist-trash.org @@ -0,0 +1,4 @@ +* NEXT Put trash out +:PROPERTIES: +:CREATED: %U +:END: diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index bb7286b..a21b706 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2026.0522.063532 +;; Version: 2026.0529.072432 ;; Package-Requires: (oni-yasnippet oni-hydra org org-edna diminish olivetti org-pretty-table) ;; This program is free software; you can redistribute it and/or modify @@ -1076,9 +1076,19 @@ CLOSED: %(setq oni-org--capture-D-date (format-time-string (org-time-stamp-forma (file ,(expand-file-name "laundry.org" oni-org-capture-template-directory)) :immediate-finish t)) +(defun oni-org-get-morning-checklist () + "Get the template for my morning checklist." + (let ((template (org-file-contents + (expand-file-name "morning-checklist.org" oni-org-capture-template-directory)))) + (if (= 2 (decoded-time-weekday (decode-time))) + (concat template + (org-file-contents + (expand-file-name "morning-checklist-trash.org" oni-org-capture-template-directory))) + template))) + (oni-org--map-put org-capture-templates "cm" `("Morning Checklist" entry (file ,oni-org-todo-main-file) - (file ,(expand-file-name "morning-checklist.org" oni-org-capture-template-directory)) + (function oni-org-get-morning-checklist) :immediate-finish t)) (defun oni-org-insert-link (title entry) |
