org-ql
org-ql copied to clipboard
Add org-category property when formatting elements.
This allows org-agenda-filter-by-category to work as expected for org-ql-block agendas.
Thanks.
I'm not sure this will work properly in all cases; I'm guessing it will need to move point to the entry before calling org-get-category
, in case an entry has a locally set category property. AFAIK that is allowed in Org, but I'm not sure.
I'm afraid I lost track of this -- very sorry for taking so long to respond!
I've added (org-with-wide-buffer (goto-char marker) ...)
, is that what you had in mind?
Out of curiosity, org-get-category
uses org-with-point-at
which looks to me like it also moves point? Is there something else that needs to be done? (Sorry I'm very much an emacs-lisp and org-mode-internals novice)
Thanks for this great package btw!
@xtofian Thanks for your patience. A few thoughts:
- Are we sure that the commented out code that this patch replaces isn't sufficient? i.e. does the
org-element
not already include the category? - If it is necessary to call
org-get-category
at the entry, it could probably be as simple as(org-with-point-at MARKER (org-get-category))
.
What do you think? Thanks.
Fixed separately in https://github.com/alphapapa/org-ql/commit/a31baebc4ffb75649825683fb1fcf897bf4bebef.