Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove text properties from to-do keyword in org-ql-view--format-element #455

Closed
alphapapa opened this issue Aug 28, 2024 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@alphapapa
Copy link
Owner

alphapapa commented Aug 28, 2024

This solves the weird problem in which to-do keywords may pick up extra, unexpected text properties from the buffer that might be added by indentation or formatting modes.

diff --git a/org-ql-view.el b/org-ql-view.el
index 02ebb3f..1448baa 100644
--- a/org-ql-view.el
+++ b/org-ql-view.el
@@ -878,7 +878,8 @@ (defun org-ql-view--format-element (element)
            (title (--> (org-ql-view--add-faces element)
                        (org-element-property :raw-value it)))
            (todo-keyword (-some--> (org-element-property :todo-keyword element)
-                           (org-ql-view--add-todo-face it)))
+                           (org-ql-view--add-todo-face
+                            (substring-no-properties it))))
            (tag-list (if org-use-tag-inheritance
                          ;; MAYBE: Use our own variable instead of `org-use-tag-inheritance'.
                          (if-let ((marker (or (org-element-property :org-hd-marker element)
@alphapapa alphapapa added this to the v0.8.8 milestone Aug 28, 2024
@alphapapa alphapapa self-assigned this Aug 28, 2024
@alphapapa alphapapa added the bug label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant