Change: (org-ql) Handle arbitrary expressions for sort arg

See https://github.com/alphapapa/org-agenda-ng/pull/1
This commit is contained in:
Adam Porter 2018-08-04 15:47:55 -05:00
parent cc05faa977
commit 334b68de3d

View file

@ -55,8 +55,14 @@ buffer."
:action-fn ,action-fn
:narrow ,narrow
:sort ,(pcase sort
;; Custom sort function
(`(function ,_) sort)
(_ (list 'quote sort)))))
((and sort (guard (cl-loop for elem in sort
always (memq elem '(date deadline scheduled todo priority)))))
;; Default sorting functions
(list 'quote sort))
;; Other expression to evaluate
(_ sort))))
(defmacro org-ql--fmap (fns &rest body)
(declare (indent defun) (debug (listp body)))