-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
For example:
(defun ivy-org-ql-agenda-files ()
(interactive)
(let ((files (org-agenda-files)))
(ivy-read
"Query: "
#'(lambda (input)
(let ((query (org-ql--plain-query input)))
(when query
(ignore-errors
(org-ql-select files query
:action (lambda ()
(propertize (org-get-heading t)
'marker (copy-marker (point)))))))))
:dynamic-collection t
:action #'ivy-org-ql-agenda-goto)))
(defun ivy-org-ql-agenda-goto (headline)
(interactive)
(let ((marker (get-text-property 0 'marker headline)))
(when (markerp marker)
(switch-to-buffer (marker-buffer marker))
(goto-char marker)
(org-show-entry))))
Reactions are currently unavailable