Add new PERIODIC tag for recurring tasks

As described in [1], we are sometimes representing recurring tasks as lists of
single tasks plus a recurring task to create new instances once in a while.  All
of this is grouped under a common headline, and those headlines should be marked
with PERIODIC to inhibit automatic clock-in.

[1]: https://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/
This commit is contained in:
Daniel - 2020-01-31 10:41:08 +01:00
parent 292920de52
commit bec4bc13a2
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
2 changed files with 5 additions and 3 deletions

View File

@ -778,7 +778,8 @@ With given ARG, display files in `db/important-document-path."
("FUN" . ?f) ("FUN" . ?f)
("UNTAGGED" . ?u) ("UNTAGGED" . ?u)
(:endgroup . nil) (:endgroup . nil)
("NOTE" . ?n)) ("NOTE" . ?n)
("PERIODIC" . ?p))
org-fast-tag-selection-single-key 'expert) org-fast-tag-selection-single-key 'expert)

View File

@ -282,8 +282,9 @@ In ~%s~:
(org-back-to-heading t)) (org-back-to-heading t))
(while (and (not parent-task) (while (and (not parent-task)
(org-up-heading-safe)) (org-up-heading-safe))
(let ((tags (nth 5 (org-heading-components)))) (let ((tags (org-get-tags nil 'local)))
(unless (and tags (member "NOP" (split-string tags ":" t))) (unless (or (member "NOP" tags)
(member "PERIODIC" tags))
(setq parent-task (point))))) (setq parent-task (point)))))
parent-task)))) parent-task))))