Hi again friends,

Following the release of org-ql 0.5, I've pushed a new feature to the
0.6-pre branch: custom predicates.  You can now easily define custom
predicates to make searching easier.  For example, you could define a
custom (person) predicate like so:

#+BEGIN_SRC elisp
(org-ql-defpred person (name)
  "Search for entries with the \"person\" property being NAME."
  :body (property "person" name))
#+END_SRC

Then you could do a search for entries in your agenda files having the
property "person" with the value "Bob" like this:

#+BEGIN_SRC elisp
(org-ql-search (org-agenda-files) "person:Bob")
#+END_SRC

Please see the tutorial for a walkthrough of the process of building a
custom predicate incrementally:

https://github.com/alphapapa/org-ql/blob/master/examples/defpred.org

Thanks,
Adam


Reply via email to