Closed kofm closed 6 months ago
Hello,
Thanks for the kind words. I'm glad this is useful to you.
The issue here is that the org-category
text property is not added to the string:
Which is what org-super-agenda
looks in to find the category:
Probably org-ql-view--format-element
should add the category to match the behavior of org-agenda-format-item
. You can see in this comment: https://github.com/alphapapa/org-ql/blob/eb5377320fcfd38354d6e9e3e655969ae3c0e052/org-ql-view.el#L822-L823
Using the auto-group works because, for whatever reason, the code as-is gets the category differently than the non-auto-group selector, without requiring the text property:
So this problem could also be worked around by changing the category group selector in org-super-agenda.
Until I have time to fix this, you could add this code to your Emacs configuration, which should make it work:
(org-super-agenda--defgroup category
"Group items that match any of the given categories.
Argument may be a string or list of strings."
:section-name (concat "Items categorized as: " (s-join " OR " args))
:test (cl-member (or (org-super-agenda--get-category item)
(org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
(org-get-category)))
args :test #'string=))
Hello,
I just wanted to extend my deepest gratitude for your prompt, detailed, and helpful response. I applied the provided workaround to my Emacs configuration, and it works perfectly! Your dedication to maintaining this package and assisting its users is remarkable.
Thank you so much for your time, effort, and kind words. I appreciate it!
You're welcome. Thanks for the kind words.
Hi again Gabriele,
I've pushed a fix for this to master
so that entries in an org-ql-view
buffer now include the org-category
text property like in Org Agenda buffers. The workaround of redefining the org-super-agenda
:category
selector shouldn't be necessary anymore.
If you have time, would you mind testing this and letting me know if it solves the problem sans-workaround for you?
Thanks.
Hello,
Everything now works as expected without the workaround. Thank you for your support in resolving this issue and all your work!
Hello,
Firstly, I would like to express my appreciation for this incredible package!
I am currently experiencing an issue with using :super-groups to group the output of my queries by category. I'm not sure if this is due to an error on my part, or if it's a bug in the system.
Steps to reproduce:
I created a minimal reproducible example in test.org as follows:
I ran the following query:
Expected Result:
I expected the output to be grouped by the category "Test".
Actual Result:
The output was not grouped as expected. Here is a screenshot of the result:
When I used
:auto-category t
as:super-groups
, it worked as expected:Could you kindly assist me in understanding if this is a bug or if there is a mistake in my usage of the :super-groups option?
Thank you for your time and assistance.