1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-29 07:58:21 +00:00

org.el/org-scan-tags: Fix effort in tags agenda views

* lisp/org.el (org-scan-tags): Manually add effort and effort-minutes
properties to be used by agenda.
This commit is contained in:
Ihor Radchenko 2021-10-26 22:29:31 +08:00
parent 801be9dcd0
commit f2b52f411c
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -11592,16 +11592,22 @@ headlines matching this string."
(match-beginning 1) (match-end 1)))
(org-show-context 'tags-tree))
((eq action 'agenda)
(setq txt (org-agenda-format-item
""
(concat
(if (eq org-tags-match-list-sublevels 'indented)
(make-string (1- level) ?.) "")
(org-get-heading))
(make-string level ?\s)
category
tags-list)
priority (org-get-priority txt))
(let* ((effort (org-entry-get (point) org-effort-property))
(effort-minutes (when effort (save-match-data (org-duration-to-minutes effort)))))
(setq txt (org-agenda-format-item
""
(concat
(if (eq org-tags-match-list-sublevels 'indented)
(make-string (1- level) ?.) "")
(org-add-props
(org-get-heading)
nil
'effort effort
'effort-minutes effort-minutes))
(make-string level ?\s)
category
tags-list)
priority (org-get-priority txt)))
(goto-char (org-element-property :begin el))
(setq marker (org-agenda-new-marker))
(org-add-props txt props