* [ANN] Org QL Custom Predicates Tutorial
@ 2020-11-23 7:41 Adam Porter
0 siblings, 0 replies; only message in thread
From: Adam Porter @ 2020-11-23 7:41 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-23 7:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 7:41 [ANN] Org QL Custom Predicates Tutorial Adam Porter
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).