Change: (org-ql) Handle arbitrary expressions for sort arg
See https://github.com/alphapapa/org-agenda-ng/pull/1
This commit is contained in:
parent
cc05faa977
commit
334b68de3d
1 changed files with 7 additions and 1 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue