ENH split out weekly plan view
This commit is contained in:
parent
eb1807e9b4
commit
fe813c09a4
|
@ -146,6 +146,10 @@
|
||||||
|
|
||||||
;; date <-> week
|
;; date <-> week
|
||||||
|
|
||||||
|
(defun org-x-dag-date-to-day-of-week (date)
|
||||||
|
(->> (org-x-dag-date-to-gregorian date)
|
||||||
|
(calendar-day-of-week)))
|
||||||
|
|
||||||
(defun org-x-dag-date-to-week-number (date)
|
(defun org-x-dag-date-to-week-number (date)
|
||||||
(-let* (((y m d) date)
|
(-let* (((y m d) date)
|
||||||
(greg (org-x-dag-date-to-gregorian date))
|
(greg (org-x-dag-date-to-gregorian date))
|
||||||
|
@ -2457,13 +2461,15 @@ FUTURE-LIMIT in a list."
|
||||||
(pcase (either-from-right (org-x-dag-id->bs it) nil)
|
(pcase (either-from-right (org-x-dag-id->bs it) nil)
|
||||||
(`(:weekly :active)
|
(`(:weekly :active)
|
||||||
(let* ((tags (org-x-dag-id->tags nil it))
|
(let* ((tags (org-x-dag-id->tags nil it))
|
||||||
(date (org-x-dag-weekly-tags-to-date tags)))
|
(date (org-x-dag-weekly-tags-to-date tags))
|
||||||
|
(day (nth 2 (reverse tags))))
|
||||||
(when (org-x-dag-datetime= sel-date date)
|
(when (org-x-dag-datetime= sel-date date)
|
||||||
(-when-let (ns (org-x-dag-id->ns it))
|
(-when-let (ns (org-x-dag-id->ns it))
|
||||||
(-let (((&plist :planned p :committed c)
|
(-let (((&plist :planned p :committed c)
|
||||||
(either-from-right ns nil)))
|
(either-from-right ns nil)))
|
||||||
(-> (org-x-dag-format-tag-node tags it)
|
(-> (org-x-dag-format-tag-node tags it)
|
||||||
(org-add-props nil
|
(org-add-props nil
|
||||||
|
'x-day day
|
||||||
'x-plannedp p
|
'x-plannedp p
|
||||||
'x-committedp c)
|
'x-committedp c)
|
||||||
(list)))))))))))
|
(list)))))))))))
|
||||||
|
@ -3811,6 +3817,8 @@ In the order of display
|
||||||
(lambda (line)
|
(lambda (line)
|
||||||
(-let* ((c (get-text-property 1 'x-committedp line))
|
(-let* ((c (get-text-property 1 'x-committedp line))
|
||||||
(p (get-text-property 1 'x-plannedp line))
|
(p (get-text-property 1 'x-plannedp line))
|
||||||
|
(day (get-text-property 1 'x-day line))
|
||||||
|
(n (car (rassoc day org-x-dag-weekly-tags)))
|
||||||
((rank text)
|
((rank text)
|
||||||
(cond
|
(cond
|
||||||
((and p c)
|
((and p c)
|
||||||
|
@ -3821,7 +3829,7 @@ In the order of display
|
||||||
'(2 "Uncommitted | Planned"))
|
'(2 "Uncommitted | Planned"))
|
||||||
(t
|
(t
|
||||||
'(1 "Unfulfilled | Unplanned")))))
|
'(1 "Unfulfilled | Unplanned")))))
|
||||||
(format "%d. %s" rank text))))))))))
|
(format "%d.%d %s (%s)" n rank day text))))))))))
|
||||||
|
|
||||||
(defun org-x-dag-agenda-tasks ()
|
(defun org-x-dag-agenda-tasks ()
|
||||||
"Show the tasks agenda view.
|
"Show the tasks agenda view.
|
||||||
|
|
Loading…
Reference in New Issue