branch: externals/org
commit f8b18e1f60d0cba647a4717085b275f6b092a3d6
Author: Morgan Smith <[email protected]>
Commit: Ihor Radchenko <[email protected]>
org-agenda: Apply stats text property to entire heading
When cookies appeared at the very end of a heading then the text
property would be absent from the org agenda entry.
* lisp/org.el (org-refresh-stats-properties): Apply property to entire
heading.
* testing/lisp/test-org-agenda.el (test-org-agenda/sorting): Expect
test to pass now.
---
lisp/org.el | 3 ++-
testing/lisp/test-org-agenda.el | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index c07e21a07d..802f966f00 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8407,7 +8407,8 @@ the whole buffer."
(stats (cond ((not denominator) numerator) ;percent
((= denominator 0) 0)
(t (/ (* numerator 100) denominator)))))
- (put-text-property (point) (progn (org-end-of-subtree t t) (point))
+ (put-text-property (line-beginning-position)
+ (progn (org-end-of-subtree t t) (point))
'org-stats stats)))))))
(defun org-refresh-effort-properties ()
diff --git a/testing/lisp/test-org-agenda.el b/testing/lisp/test-org-agenda.el
index 3408b4a1f4..be17a558c6 100644
--- a/testing/lisp/test-org-agenda.el
+++ b/testing/lisp/test-org-agenda.el
@@ -672,7 +672,6 @@ Sunday 7 January 2024
(ert-deftest test-org-agenda/sorting ()
"Test if `org-agenda' sorts according to `org-agenda-sorting-strategy'."
- :expected-result :failed
;; FIXME: test the following
;; urgency-up
;; category-up