Do not refile to elements of periodic tasks

If separate things should be done, generate a separate item for it, or leave
some note at the corresponding series element.  Periodic tasks are quite rigid
and should not be used for collecting individual subtasks.
This commit is contained in:
Daniel Borchmann 2020-07-04 11:43:19 +02:00
parent b5b16a3791
commit 4084e0ccae
Signed by: exot
GPG Key ID: 1C7071A75BB72D64

View File

@ -245,11 +245,16 @@ In ~%s~:
;;; Refiling ;;; Refiling
;; Exclude DONE state tasks from refile targets (from bh)
(defun db/verify-refile-target () (defun db/verify-refile-target ()
"Exclude todo keywords with a done state from refile targets" "Verify that a certain location is eligible as a refile target.
(not (member (nth 2 (org-heading-components)) In other words, exclude tasks with a done state and those with
org-done-keywords))) tag PERIODIC."
(and
;; Exclude DONE state tasks from refile targets (from bh)
(not (member (nth 2 (org-heading-components))
org-done-keywords))
;; Don't refile to elements of periodic tasks
(not (member "PERIODIC" (org-get-tags)))))
;;; Reset checklists ;;; Reset checklists