From befcf95d1fb53db4aee225c1c3c909844d8923f7 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 23 Sep 2022 15:47:45 +0200 Subject: [PATCH] Include deadlines in agenda time grid effort summary When deadlines are listed on the time grid because they are due, their effort should also be considered in the effort summary, shouldn't it? --- site-lisp/db-org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 3d3a5b7..c8a86ac 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -193,12 +193,14 @@ _y_: ?y? year _q_: quit _L__l__c_: ?l? (defun db/org-agenda-calculate-efforts (limit) "Sum efforts of day entries up to LIMIT in the agenda buffer. Entries included are those scheduled for that day, scheduled at -some past day (and still on display) and active timestamps (appointments)." +some past day (and still on display), active +timestamps (appointments), and deadlines (assuming they are only +shown because they are due)." (let (total) (save-excursion (while (< (point) limit) (when (member (org-get-at-bol 'type) - '("scheduled" "past-scheduled" "timestamp")) + '("scheduled" "past-scheduled" "timestamp" "deadline")) (push (org-entry-get (org-get-at-bol 'org-hd-marker) "Effort") total)) (forward-line))) (org-duration-from-minutes