summaryrefslogtreecommitdiff
path: root/chime.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-25 20:51:15 -0500
committerCraig Jennings <c@cjennings.net>2025-10-25 20:51:15 -0500
commite5f99f9aae1a772f4ac3cab85c6dbb89ccc57a1c (patch)
tree96241398db8e873fee226437359e30fee20df891 /chime.el
parent4f8ee4eb200922df24388afb0efafec90987a761 (diff)
fix:chime: Use org-get-todo-state for TODOs, not org-entry-getHEADmain
Changed chime--whitelist-predicates and chime--blacklist-predicates to use org-get-todo-state instead of org-entry-get for retrieving TODO keywords. org-entry-get is for reading properties from the properties drawer, not for getting the TODO state of a heading. Also rewrote test-chime-apply-blacklist.el and test-chime-apply-whitelist.el to remove over-mocking. Tests now use real org-mode buffers with actual TODO keywords and tags instead of mocking org-entry-get, which was hiding a bug.
Diffstat (limited to 'chime.el')
-rw-r--r--chime.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/chime.el b/chime.el
index 50c4f5d..2648657 100644
--- a/chime.el
+++ b/chime.el
@@ -437,7 +437,7 @@ Combines keyword, tag, and custom predicate whitelists."
(->> `([,chime-keyword-whitelist
(lambda (it)
(-contains-p chime-keyword-whitelist
- (org-entry-get it "TODO")))]
+ (org-with-point-at it (org-get-todo-state))))]
[,chime-tags-whitelist
(lambda (it)
@@ -456,7 +456,7 @@ Combines keyword, tag, and custom predicate blacklists."
(->> `([,chime-keyword-blacklist
(lambda (it)
(-contains-p chime-keyword-blacklist
- (org-entry-get it "TODO")))]
+ (org-with-point-at it (org-get-todo-state))))]
[,chime-tags-blacklist
(lambda (it)