Display remaining effort in Org agenda by default
Note that sorting is wrong now, this needs to be fixed later.
This commit is contained in:
parent
bef3a482f3
commit
1f9e032a1a
9
init.el
9
init.el
|
@ -730,6 +730,7 @@
|
|||
db/org-clock-in-home-task
|
||||
db/org-clock-in-work-task
|
||||
db/show-current-org-task
|
||||
db/org-remaining-effort-of-current-item
|
||||
org-dblock-write:db/org-workload-report
|
||||
endless/org-ispell
|
||||
db/org-agenda-list-deadlines
|
||||
|
@ -1156,10 +1157,10 @@
|
|||
"")
|
||||
|
||||
org-agenda-prefix-format
|
||||
'((agenda . "%11s%?-12t%-4e ")
|
||||
(todo . "%-8c%-4e ")
|
||||
(tags . "%-8c%-4e ")
|
||||
(search . "%-8c%-4e "))
|
||||
'((agenda . "%11s%?-12t%-4(db/org-remaining-effort-of-current-item) ")
|
||||
(todo . "%-8c%-4(db/org-remaining-effort-of-current-item) ")
|
||||
(tags . "%-8c%-4(db/org-remaining-effort-of-current-item) ")
|
||||
(search . "%-8c%-4(db/org-remaining-effort-of-current-item) "))
|
||||
|
||||
org-agenda-custom-commands
|
||||
`(("A" "Main Agenda"
|
||||
|
|
|
@ -204,7 +204,9 @@ shown because they are due)."
|
|||
'("scheduled" "past-scheduled" "timestamp" "deadline" "block"))
|
||||
(let ((item-id (org-with-point-at (org-get-at-bol 'org-hd-marker) (org-id-get-create))))
|
||||
(unless (member item-id already-seen)
|
||||
(push (org-entry-get (org-get-at-bol 'org-hd-marker) "Effort") total)
|
||||
(push (org-with-point-at (org-get-at-bol 'org-hd-marker)
|
||||
(db/org-remaining-effort-of-current-item))
|
||||
total)
|
||||
(push item-id already-seen))))
|
||||
(forward-line))))
|
||||
(org-duration-from-minutes
|
||||
|
@ -429,9 +431,14 @@ If no effort is specified, return nil."
|
|||
|
||||
(if (derived-mode-p 'org-agenda-mode)
|
||||
|
||||
;; XXX: is this the right way to do it?
|
||||
(org-agenda-with-point-at-orig-entry
|
||||
nil (db/org-remaining-effort-of-current-item))
|
||||
(if-let ((hd-marker (org-get-at-bol 'org-hd-marker)))
|
||||
;; `org-hd-marker' is set, there is some Org item that corresponds to
|
||||
;; this line. Get the remaining effort from there.
|
||||
(org-with-point-at hd-marker
|
||||
(db/org-remaining-effort-of-current-item))
|
||||
;; We are at some special item in the Org agenda (e.g. some diary
|
||||
;; entry), just show nothing.
|
||||
"")
|
||||
|
||||
(unless (derived-mode-p 'org-mode)
|
||||
(user-error "Not in Org mode buffer, aborting"))
|
||||
|
|
Loading…
Reference in New Issue