-
Notifications
You must be signed in to change notification settings - Fork 113
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
Emphasize that queries can contain arbitrary code #92
Comments
Hi Robert,
If I understand you correctly,
Since it may contain arbitrary Lisp forms, you may call any function you like. The only requirements are that the function should expect to be called with point on a heading, it should not move point (i.e. use I should probably explain that more clearly in the docs, because it's probably easy to get the impression that only the built-in predicates are allowed. Looking at the code you provided, here are a few thoughts:
(org-super-agenda--def-auto-group project-task "their project status"
:key-form (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
(save-excursion
(when (org-up-heading-safe)
(if (nth 2 (org-heading-components))
(concat "P: " (org-get-heading t t))
(concat "TG: " (org-get-heading t t))))))) Or, if your primary goal is to affect how items are sorted, you might be able to write a custom sorting function and pass it to Does any of that help? |
Hi @alphapapa this is all very useful - thanks for getting back so quickly. The reason I'm using the wrapper function is that it appears that |
I made some improvements to the docs about query expressions. Please let me know if you think any other changes are needed. Thanks. |
That's better - thanks! |
I'm currently using
org-ql-search
to create a pseudo org-agenda buffer. However, the query language doesn't seem to allow filtering the results based on the result of some predicate (like, for exampleorg-agenda-skip-function
does). Does it make sense to add such a parameter toorg-ql-search
(and alsoorg-ql-block
, once #79 is resolved)?The alternative is to write custom code to iterate over
org-ql-view-buffer
and remove entries myself (and also remove Super Groups that are now empty after removing entries).For reference, I would use it to filter some entries from the following Org agenda custom command:
The text was updated successfully, but these errors were encountered: