Fix: (org-ql--query-sexp-to-string) Ancestors, etc. queries

This commit is contained in:
Adam Porter 2020-11-14 05:40:24 -06:00
parent dd30f07942
commit 89ff02a150

View file

@ -1778,7 +1778,11 @@ Multiple predicates are combined with BOOLEAN."
If QUERY can't be converted to a string, return nil." If QUERY can't be converted to a string, return nil."
;; This started out pretty simple...but at least it's not just one long function, right? ;; This started out pretty simple...but at least it's not just one long function, right?
(cl-labels ((complex-p (query) (cl-labels ((complex-p (query)
(or (contains-p 'or query))) (or (contains-p 'or query)
(contains-p 'ancestors query)
(contains-p 'children query)
(contains-p 'descendants query)
(contains-p 'parent query)))
(contains-p (symbol list) (contains-p (symbol list)
(cl-loop for element in list (cl-loop for element in list
thereis (or (eq symbol element) thereis (or (eq symbol element)