Move point to entry before getting category.

This was suggested in https://github.com/alphapapa/org-ql/pull/264#issuecomment-1055283069.
This commit is contained in:
Christoph Kern 2023-01-07 23:06:58 -08:00
parent 4b6b8f4795
commit 4b25d48109

View file

@ -878,7 +878,9 @@ return an empty string."
(category (if-let ((marker (or (org-element-property :org-hd-marker element)
(org-element-property :org-marker element))))
(with-current-buffer (marker-buffer marker)
(org-get-category marker))
(org-with-wide-buffer
(goto-char marker)
(org-get-category marker)))
(warn "No marker found for item: %s" title)))
(priority-string (-some->> (org-element-property :priority element)
(char-to-string)