Fix: (view--add-todo-face) Bind org-done-keywords

org-get-todo-face uses org-done-keywords, which is a buffer-local
variable, so it may be nil in the context that
org-ql-view--add-todo-face is called.  See,
e.g. org-agenda-highlight-todo, which does the same thing.

Thanks to Yiming Chen (@dsdshcym).
This commit is contained in:
Yiming Chen 2020-01-01 15:26:51 +08:00 committed by Adam Porter
parent 317b2ec1b7
commit 6004ab98da
3 changed files with 17 additions and 13 deletions

View file

@ -634,7 +634,8 @@ property."
(defun org-ql-view--add-todo-face (keyword)
"Return KEYWORD with TODO face added."
(when-let ((face (org-get-todo-face keyword)))
(when-let* ((org-done-keywords org-done-keywords-for-agenda)
(face (org-get-todo-face keyword)))
(org-add-props keyword nil 'face face)))
;;;; Footer