[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Change: (org-agenda-get-progress) Set type text-property acc
From: |
Adam Porter |
Subject: |
[O] [PATCH] Change: (org-agenda-get-progress) Set type text-property accordingly |
Date: |
Fri, 31 Aug 2018 19:53:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Previously, the "type" text-property was always set to "closed", even
when an item was actually matched because of its "Clock" or "State"
line.
Now, the "type" text-property is set according to why the item was
matched.
Note: it's possible that some code might expect the value to be
"closed" in all 3 cases, in which case this could cause a minor
regression, so this change should be carefully considered. However,
in the long run, it seems like the correct thing to do and a
worthwhile change to make.
---
lisp/org-agenda.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eaeddb6..50270b4 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5747,7 +5747,7 @@ then those holidays will be skipped."
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
1 11))))
(org-agenda-search-headline-for-time nil)
- marker hdmarker priority category level tags closedp
+ marker hdmarker priority category level tags closedp type
statep clockp state ee txt extra timestr rest clocked inherited-tags)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
@@ -5807,11 +5807,14 @@ then those holidays will be skipped."
(statep (concat "State: (" state ")"))
(t (concat "Clocked: (" clocked ")")))
txt level category tags timestr)))
+ (setq type (cond (closedp "closed")
+ (statep "state")
+ (t "clock")))
(setq priority 100000)
(org-add-props txt props
'org-marker marker 'org-hd-marker hdmarker 'face 'org-agenda-done
'priority priority 'level level
- 'type "closed" 'date date
+ 'type type 'date date
'undone-face 'org-warning 'done-face 'org-agenda-done)
(push txt ee))
(goto-char (point-at-eol))))
--
2.7.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] [PATCH] Change: (org-agenda-get-progress) Set type text-property accordingly,
Adam Porter <=