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

@ -394,6 +394,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
*Fixed*
+ Call =helm-make-source= directly instead of using =helm-build-sync-source= macro. (Fixes [[https://github.com/alphapapa/org-ql/issues/60][#60]]. Thanks to [[https://github.com/matthuszagh][Matt Huszagh]] for reporting.)
+ Search/view buffers now always end with a newline, which prevents side-scrolling of the window when calling =end-of-buffer=.
+ Face for done to-do keywords in =org-ql-view= buffers. (Thanks to [[https://github.com/dsdshcym][Yiming Chen]].)
*Internal*
+ Added generic node data cache to speed up recursive, tree-based queries.

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

View file

@ -729,6 +729,8 @@ File: README.info, Node: 04-pre, Next: 032, Up: Changelog
Huszagh (https://github.com/matthuszagh) for reporting.)
• Search/view buffers now always end with a newline, which prevents
side-scrolling of the window when calling end-of-buffer.
• Face for done to-do keywords in org-ql-view buffers. (Thanks to
Yiming Chen (https://github.com/dsdshcym).)
*Internal*
• Added generic node data cache to speed up recursive, tree-based
@ -1021,18 +1023,18 @@ Node: Agenda-like views18276
Node: Listing / acting-on results19681
Node: Changelog24283
Node: 04-pre24820
Node: 03226512
Node: 03126893
Node: 0327088
Node: 02330061
Node: 02230287
Node: 02130553
Node: 0230750
Node: 0134783
Node: Notes34882
Node: Comparison with Org Agenda searches35044
Node: org-sidebar35915
Node: License36194
Node: 03226633
Node: 03127014
Node: 0327209
Node: 02330182
Node: 02230408
Node: 02130674
Node: 0230871
Node: 0134904
Node: Notes35003
Node: Comparison with Org Agenda searches35165
Node: org-sidebar36036
Node: License36315

End Tag Table