org-ql/examples.org
2018-08-21 02:37:32 -05:00

19 lines
766 B
Org Mode

* Examples
** Listing bills coming due
This uses the example in the readme file, but maps across the elements returned by ~org-ql~ to present a simple list of titles and deadlines.
#+BEGIN_SRC elisp
(--map (list (org-element-property :raw-value it)
(org-timestamp-format (org-element-property :deadline it) "%c"))
(org-ql (org-agenda-files)
(and (not (done))
(tags "bills")
(deadline <=))
:sort deadline))
;;=> (("Electric bill" "Thu 23 Aug 2018 12:00:00 AM CDT")
;; ("Rent" "Sat 01 Sep 2018 08:00:00 PM CDT"))
#+END_SRC
This could also be put in a script, which could use desktop notifications to remind of bills coming due: [[examples/org-bills-due.el][org-bills-due.el]].