mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 08:14:15 +00:00
New delay behavior. Delay tasks if not scheduled
This commit is contained in:
parent
280b76bdbb
commit
e65a5bee42
3 changed files with 13 additions and 11 deletions
|
|
@ -44,7 +44,8 @@
|
|||
nil nil nil
|
||||
"Delay until when?")))
|
||||
(formatted (format "<%s>" new-time)))
|
||||
(if (eq 'task (opr/get-type))
|
||||
(if (and (eq 'task (opr/get-type))
|
||||
(org-entry-get (point) "SCHEDULED"))
|
||||
(org-schedule arg new-time)
|
||||
(org-entry-put (point) "DELAYED" formatted)
|
||||
(format "Delayed until %s" formatted)))))))
|
||||
|
|
|
|||
|
|
@ -40,15 +40,14 @@
|
|||
'active
|
||||
'stuck)
|
||||
(if (or
|
||||
;; No active tasks? Stuck if no other projects!
|
||||
(and (not (olc/any-todo-children?
|
||||
(eq 'active (opr/type-of-task))))
|
||||
(not
|
||||
(olc/any-todo-children?
|
||||
(eq 'project (opr/get-type)))))
|
||||
;; Have a stuck project? Stuck!
|
||||
(and (olc/any-todo-children?
|
||||
(eq 'stuck (opr/type-of-project)))))
|
||||
(olc/any-todo-children?
|
||||
(or
|
||||
;; Any stuck task? Stuck!
|
||||
(eq 'stuck (opr/type-of-task))
|
||||
;; Have a stuck project? Stuck!
|
||||
(eq 'stuck (opr/type-of-project))))
|
||||
;; No todo children? Stuck!
|
||||
(not (olc/any-todo-children? t)))
|
||||
'stuck
|
||||
'active)))
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@
|
|||
(and (member state opr/ambiguous)
|
||||
(eq 'task
|
||||
(opr/ambiguous-task-or-project))))
|
||||
(if (member "_invis_" (org-get-tags))
|
||||
(if (or (member "_invis_" (org-get-tags))
|
||||
(when-let (d (org-entry-get (point) "DELAYED"))
|
||||
(org-time> d (org-matcher-time "<now>"))))
|
||||
'invis
|
||||
(pcase state
|
||||
("TASK" (if (or (org-get-deadline-time (point))
|
||||
|
|
|
|||
Loading…
Reference in a new issue