Fix: (org-ql-view--add-todo-face) Always return to-do keyword

Even when org-done-keywords-for-agenda is nil.  I'm not sure when this
was broken, but the logic was wrong in this function, and this is the
intended behavior, so this is a bug fix.

Released as 0.4.2.
This commit is contained in:
Adam Porter 2020-02-26 19:11:40 -06:00
parent 32c68d7f24
commit 4b1e253ee9
4 changed files with 71 additions and 52 deletions

View file

@ -666,10 +666,12 @@ property."
element))
(defun org-ql-view--add-todo-face (keyword)
"Return KEYWORD with TODO face added."
(when-let* ((org-done-keywords org-done-keywords-for-agenda)
(face (org-get-todo-face keyword)))
(org-add-props keyword nil 'face face)))
"Return KEYWORD with Org to-do face added."
(let* ((org-done-keywords org-done-keywords-for-agenda)
(face (org-get-todo-face keyword)))
(when face
(add-text-properties 0 (length keyword) (list 'face face) keyword))
keyword))
;;;; Footer