2022-04-22 02:54:47 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2022-08-25 19:18:07 +00:00
|
|
|
; inspiration for conditional capture template : https://storax.github.io/blog/2016/05/02/org-capture-tricks/
|
|
|
|
|
|
|
|
; helper functions
|
2023-04-08 16:53:12 +00:00
|
|
|
(defvar my-capture-prmt-history nil
|
2022-08-25 19:18:07 +00:00
|
|
|
"History of prompt answers for org capture.")
|
2023-04-08 16:53:12 +00:00
|
|
|
(defun my/prmt (prompt variable)
|
2022-08-25 19:18:07 +00:00
|
|
|
"PROMPT for string, save it to VARIABLE and insert it."
|
|
|
|
(make-local-variable variable)
|
2023-04-08 16:53:12 +00:00
|
|
|
(set variable (read-string (concat prompt ": ") nil my-capture-prmt-history)))
|
|
|
|
(defun my/inc (what text &rest fmtvars)
|
2022-08-25 19:18:07 +00:00
|
|
|
"Ask user to include WHAT. If user agrees return TEXT."
|
|
|
|
(when (y-or-n-p (concat "Include " what "?"))
|
|
|
|
(apply 'format text fmtvars)))
|
2023-04-08 16:53:12 +00:00
|
|
|
(defun my/inc_date (what prefix)
|
2022-08-25 19:18:07 +00:00
|
|
|
"Ask user to include a date. If user agrees prompt for date."
|
|
|
|
(when (y-or-n-p (concat "Include " what "?"))
|
|
|
|
(concat prefix (org-time-stamp nil))))
|
|
|
|
|
2022-04-22 02:54:47 +00:00
|
|
|
; orgmode capture templates
|
|
|
|
(setq org-capture-templates '(
|
2023-02-13 13:29:18 +00:00
|
|
|
("d" "TODO (Main)" entry
|
2024-10-01 17:35:43 +00:00
|
|
|
(file "~/org/_todo.org")
|
2024-07-28 16:04:59 +00:00
|
|
|
(file "~/org/_org-capture-templates/template_todo.org")
|
2023-02-13 13:29:18 +00:00
|
|
|
:prepend t
|
|
|
|
:immediate-finish "f"
|
|
|
|
:jump-to-captured "t"
|
|
|
|
)
|
|
|
|
("s" "TODO (Slipbox)" entry
|
2024-10-01 17:35:43 +00:00
|
|
|
(file "~/org/_slipbox.org")
|
2024-07-28 16:04:59 +00:00
|
|
|
(file "~/org/_org-capture-templates/template_slipbox.org")
|
2022-08-25 19:18:07 +00:00
|
|
|
:prepend t
|
|
|
|
:immediate-finish "f"
|
|
|
|
:jump-to-captured "t"
|
|
|
|
)
|
2022-04-22 02:54:47 +00:00
|
|
|
("h" "Health")
|
2024-03-10 17:32:48 +00:00
|
|
|
("hc" "Couples")
|
|
|
|
("hcd" "Appointment noteworthy developments / [time] in review"
|
2024-10-01 17:35:43 +00:00
|
|
|
entry (file "~/org/_slipbox.org")
|
2024-08-08 19:34:37 +00:00
|
|
|
(file "~/org/_org-capture-templates/template_couples_apt_developments.org")
|
2024-03-10 17:32:48 +00:00
|
|
|
:immediate-finish "f"
|
|
|
|
:jump-to-captured "t"
|
|
|
|
:unnarrowed "t"
|
|
|
|
:prepend "t"
|
|
|
|
)
|
2022-04-22 02:54:47 +00:00
|
|
|
("hm" "Mike")
|
2022-09-15 21:37:14 +00:00
|
|
|
("hmd" "Appointment noteworthy developments / [time] in review"
|
2024-10-01 17:35:43 +00:00
|
|
|
entry (file "~/org/_slipbox.org")
|
2024-10-01 16:25:56 +00:00
|
|
|
(file "~/org/_org-capture-templates/template_therapy_apt_developments.org.org")
|
2022-04-22 15:00:10 +00:00
|
|
|
:immediate-finish "f"
|
|
|
|
:jump-to-captured "t"
|
|
|
|
:unnarrowed "t"
|
|
|
|
:prepend "t"
|
|
|
|
)
|
2024-05-27 13:56:12 +00:00
|
|
|
("m" "Music import (beets)" entry
|
2024-10-01 17:35:43 +00:00
|
|
|
(file "~/org/_slipbox.org")
|
2024-07-28 16:33:22 +00:00
|
|
|
(file "~/org/_org-capture-templates/template_beets.org")
|
2024-05-27 13:56:12 +00:00
|
|
|
:prepend t
|
|
|
|
:immediate-finish "f"
|
2022-04-22 02:54:47 +00:00
|
|
|
:jump-to-captured "t"
|
|
|
|
)
|
2022-04-22 15:00:10 +00:00
|
|
|
))
|