This commit is contained in:
Adam Porter 2020-11-22 11:10:31 -06:00
parent 064982bd65
commit 78375ed958
2 changed files with 165 additions and 155 deletions

View file

@ -1003,12 +1003,10 @@ contiguous segment of the outline path:
`(outline-path-segment ,@(mapcar #'regexp-quote strings)))) `(outline-path-segment ,@(mapcar #'regexp-quote strings))))
:predicate (org-ql--infix-p regexps (org-ql--value-at (point) #'org-ql--outline-path))) :predicate (org-ql--infix-p regexps (org-ql--value-at (point) #'org-ql--outline-path)))
(org-ql-define-predicate (tags tags-all tags&) (&rest tags) (org-ql-define-predicate (tags) (&rest tags)
;; NOTE: tags-all and tags& are "virtual" predicates that are handled by query pre-processing.
"Return non-nil if current heading has one or more of TAGS (a list of strings). "Return non-nil if current heading has one or more of TAGS (a list of strings).
Tests both inherited and local tags." Tests both inherited and local tags."
;; MAYBE: -all versions for inherited and local. ;; MAYBE: -all versions for inherited and local.
:normalizers ((`(,predicate-names . ,tags) `(and ,@(--map `(tags ,it) tags))))
:predicate (cl-macrolet ((tags-p (tags) :predicate (cl-macrolet ((tags-p (tags)
`(and ,tags `(and ,tags
(not (eq 'org-ql-nil ,tags))))) (not (eq 'org-ql-nil ,tags)))))
@ -1021,11 +1019,21 @@ Tests both inherited and local tags."
(when (tags-p local) (when (tags-p local)
(seq-intersection tags local)))))))) (seq-intersection tags local))))))))
(org-ql-define-predicate (tags-inherited tags-i itags) (&rest tags) (org-ql-define-predicate (tags-all tags&) (&rest tags)
"Return non-nil if current heading has all of TAGS (a list of strings).
Tests both inherited and local tags."
;; MAYBE: -all versions for inherited and local.
:normalizers ((`(,predicate-names) `(tags))
(`(,predicate-names . ,tags) `(and ,@(--map `(tags ,it) tags))))
:predicate #'org-ql--predicate-tags)
(org-ql-define-predicate (tags-inherited inherited-tags tags-i itags) (&rest tags)
"Return non-nil if current heading's inherited tags include one or more of TAGS (a list of strings). "Return non-nil if current heading's inherited tags include one or more of TAGS (a list of strings).
If TAGS is nil, return non-nil if heading has any inherited tags." If TAGS is nil, return non-nil if heading has any inherited tags."
:normalizers ((`(,predicate-names . ,tags) :normalizers ((`(,predicate-names . ,tags)
`(tags-inherited ,@tags))) `(tags-inherited ,@tags))
(`(,predicate-names)
`(tags-inherited)))
:predicate (cl-macrolet ((tags-p (tags) :predicate (cl-macrolet ((tags-p (tags)
`(and ,tags `(and ,tags
(not (eq 'org-ql-nil ,tags))))) (not (eq 'org-ql-nil ,tags)))))
@ -1035,16 +1043,18 @@ If TAGS is nil, return non-nil if heading has any inherited tags."
(otherwise (when (tags-p inherited) (otherwise (when (tags-p inherited)
(seq-intersection tags inherited))))))) (seq-intersection tags inherited)))))))
(org-ql-define-predicate (tags-local tags-l ltags) (&rest tags) (org-ql-define-predicate (tags-local local-tags tags-l ltags) (&rest tags)
"Return non-nil if current heading's local tags include one or more of TAGS (a list of strings). "Return non-nil if current heading's local tags include one or more of TAGS (a list of strings).
If TAGS is nil, return non-nil if heading has any local tags." If TAGS is nil, return non-nil if heading has any local tags."
:normalizers ((`(,predicate-names . ,tags) `(tags-local ,@tags))) :normalizers ((`(,predicate-names) `(tags-local))
:preambles ((`(,predicate-names . ,tags) (`(,predicate-names . ,tags) `(tags-local ,@tags)))
:preambles ((`(,predicate-names . ,(and tags (guard tags)))
;; When searching for local, non-inherited tags, we can ;; When searching for local, non-inherited tags, we can
;; search directly to headings containing one of the tags. ;; search directly to headings containing one of the tags.
(list :regexp (rx-to-string `(seq bol (1+ "*") (1+ space) (1+ not-newline) (list :regexp (rx-to-string `(seq bol (1+ "*") (1+ space) (1+ not-newline)
":" (or ,@tags) ":") ":" (or ,@tags) ":")
t)))) t)
:query t)))
:predicate (cl-macrolet ((tags-p (tags) :predicate (cl-macrolet ((tags-p (tags)
`(and ,tags `(and ,tags
(not (eq 'org-ql-nil ,tags))))) (not (eq 'org-ql-nil ,tags)))))

View file

@ -858,152 +858,152 @@ RESULTS should be a list of strings as returned by
;; ;; TODO: Test (src) predicate. That will require modifying test data, which will be a ;; ;; TODO: Test (src) predicate. That will require modifying test data, which will be a
;; ;; significant hassle. Manual testing shows that the predicate appears to work properly. ;; ;; significant hassle. Manual testing shows that the predicate appears to work properly.
;; ;;
;; (describe "(todo)" (describe "(todo)"
;;
;; (org-ql-it "without arguments" (org-ql-it "without arguments"
;; (org-ql-expect ((todo) (org-ql-expect ((todo)
;; :sort todo) :sort todo)
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony"))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony")))
;;
;; (org-ql-it "with 1 argument" (org-ql-it "with 1 argument"
;; (org-ql-expect ((todo "WAITING") (org-ql-expect ((todo "WAITING")
;; :sort todo) :sort todo)
;; '("Visit the moon"))) '("Visit the moon")))
;;
;; (org-ql-it "with 2 arguments" (org-ql-it "with 2 arguments"
;; (org-ql-expect ((todo "WAITING" "SOMEDAY") (org-ql-expect ((todo "WAITING" "SOMEDAY")
;; :sort todo) :sort todo)
;; '("Visit the moon" "Rewrite Emacs in Common Lisp" "Write a symphony")))) '("Visit the moon" "Rewrite Emacs in Common Lisp" "Write a symphony"))))
;;
;; (describe "(tags)" (describe "(tags)"
;;
;; (org-ql-it "without arguments" (org-ql-it "without arguments"
;; (org-ql-expect ((tags)) (org-ql-expect ((tags))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony")) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony"))
;; (org-ql-expect ((not (tags))) (org-ql-expect ((not (tags)))
;; '("Recurring" "Sunrise/sunset" "Ideas"))) '("Recurring" "Sunrise/sunset" "Ideas")))
;;
;; (org-ql-it "with a tag" (org-ql-it "with a tag"
;; (org-ql-expect ((tags "Emacs")) (org-ql-expect ((tags "Emacs"))
;; '("/r/emacs" "Rewrite Emacs in Common Lisp")) '("/r/emacs" "Rewrite Emacs in Common Lisp"))
;; (org-ql-expect ((not (tags "Emacs"))) (org-ql-expect ((not (tags "Emacs")))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony"))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony")))
;;
;; (org-ql-it "with 2 tags" (org-ql-it "with 2 tags"
;; (org-ql-expect ((tags "Emacs" "space")) (org-ql-expect ((tags "Emacs" "space"))
;; '("Visit Mars" "Visit the moon" "/r/emacs" "Rewrite Emacs in Common Lisp")) '("Visit Mars" "Visit the moon" "/r/emacs" "Rewrite Emacs in Common Lisp"))
;; (org-ql-expect ((not (tags "Emacs" "space"))) (org-ql-expect ((not (tags "Emacs" "space")))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Take over the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony"))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Take over the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony")))
;;
;; (org-ql-it "with file tags" (org-ql-it "with file tags"
;; (org-ql-expect ((tags "food")) (org-ql-expect ((tags "food"))
;; '("Fruit" "Blueberry" "Strawberry" "Vegetable" "Broccoli" "Potato") '("Fruit" "Blueberry" "Strawberry" "Vegetable" "Broccoli" "Potato")
;; :buffer (org-ql-test-data-buffer "data2.org")) :buffer (org-ql-test-data-buffer "data2.org"))
;; (org-ql-expect ((tags "fruit")) (org-ql-expect ((tags "fruit"))
;; '("Fruit" "Blueberry" "Strawberry") '("Fruit" "Blueberry" "Strawberry")
;; :buffer (org-ql-test-data-buffer "data2.org")))) :buffer (org-ql-test-data-buffer "data2.org"))))
;;
;; (describe "(tags-inherited)" (describe "(tags-inherited)"
;;
;; (org-ql-it "without arguments" (org-ql-it "without arguments"
;; (org-ql-expect ((tags-inherited)) (org-ql-expect ((tags-inherited))
;; '("Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language")) '("Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language"))
;; (org-ql-expect ((not (inherited-tags))) (org-ql-expect ((not (inherited-tags)))
;; '("Take over the universe" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony"))) '("Take over the universe" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony")))
;;
;; (org-ql-it "with a tag" (org-ql-it "with a tag"
;; (org-ql-expect ((tags-inherited "Emacs")) (org-ql-expect ((tags-inherited "Emacs"))
;; nil) nil)
;; (org-ql-expect ((itags "ambition")) (org-ql-expect ((itags "ambition"))
;; '("Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language")) '("Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language"))
;; (org-ql-expect ((not (tags-i "ambition"))) (org-ql-expect ((not (tags-i "ambition")))
;; '("Take over the universe" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony"))) '("Take over the universe" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony")))
;;
;; (org-ql-it "with 2 tags" (org-ql-it "with 2 tags"
;; (org-ql-expect ((itags "personal" "world")) (org-ql-expect ((itags "personal" "world"))
;; '("Skype with president of Antarctica")) '("Skype with president of Antarctica"))
;; (org-ql-expect ((not (tags-inherited "personal" "world"))) (org-ql-expect ((not (tags-inherited "personal" "world")))
;; ;; Note that this correctly includes the task "Practice leaping...", which has the LOCAL tag "personal". ;; Note that this correctly includes the task "Practice leaping...", which has the LOCAL tag "personal".
;; '("Take over the universe" "Take over the world" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony"))) '("Take over the universe" "Take over the world" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony")))
;;
;; (org-ql-it "with file tags" (org-ql-it "with file tags"
;; (org-ql-expect ((tags-inherited "food")) (org-ql-expect ((tags-inherited "food"))
;; '("Fruit" "Blueberry" "Strawberry" "Vegetable" "Broccoli" "Potato") '("Fruit" "Blueberry" "Strawberry" "Vegetable" "Broccoli" "Potato")
;; :buffer (org-ql-test-data-buffer "data2.org")) :buffer (org-ql-test-data-buffer "data2.org"))
;; (org-ql-expect ((tags-inherited "fruit")) (org-ql-expect ((tags-inherited "fruit"))
;; '("Blueberry" "Strawberry") '("Blueberry" "Strawberry")
;; :buffer (org-ql-test-data-buffer "data2.org")))) :buffer (org-ql-test-data-buffer "data2.org"))))
;;
;; (describe "(tags-local)" (describe "(tags-local)"
;;
;; (org-ql-it "without arguments" (org-ql-it "without arguments"
;; (org-ql-expect ((tags-local)) (org-ql-expect ((tags-local))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Visit Mars" "Visit the moon" "Practice leaping tall buildings in a single bound" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony")) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Visit Mars" "Visit the moon" "Practice leaping tall buildings in a single bound" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony"))
;; (org-ql-expect ((not (local-tags))) (org-ql-expect ((not (local-tags)))
;; '("Take over Mars" "Take over the moon" "Renew membership in supervillain club" "Learn universal sign language" "Recurring" "Sunrise/sunset" "Ideas"))) '("Take over Mars" "Take over the moon" "Renew membership in supervillain club" "Learn universal sign language" "Recurring" "Sunrise/sunset" "Ideas")))
;;
;; (org-ql-it "with a tag" (org-ql-it "with a tag"
;; (org-ql-expect ((tags-local "world")) (org-ql-expect ((tags-local "world"))
;; '("Take over the world" "Skype with president of Antarctica")) '("Take over the world" "Skype with president of Antarctica"))
;; (org-ql-expect ((ltags "ambition")) (org-ql-expect ((ltags "ambition"))
;; '("Take over the universe")) '("Take over the universe"))
;; (org-ql-expect ((not (tags-l "ambition"))) (org-ql-expect ((not (tags-l "ambition")))
;; '("Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony"))) '("Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony")))
;;
;; (org-ql-it "with 2 tags" (org-ql-it "with 2 tags"
;; (org-ql-expect ((ltags "personal" "world")) (org-ql-expect ((ltags "personal" "world"))
;; '("Take over the world" "Skype with president of Antarctica" "Practice leaping tall buildings in a single bound" "Get haircut")) '("Take over the world" "Skype with president of Antarctica" "Practice leaping tall buildings in a single bound" "Get haircut"))
;; (org-ql-expect ((not (tags-local "personal" "world"))) (org-ql-expect ((not (tags-local "personal" "world")))
;; '("Take over the universe" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony"))) '("Take over the universe" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "/r/emacs" "Shop for groceries" "Sunrise/sunset" "Ideas" "Rewrite Emacs in Common Lisp" "Write a symphony")))
;;
;; (org-ql-it "with file tags" (org-ql-it "with file tags"
;; (org-ql-expect ((tags-local "food")) (org-ql-expect ((tags-local "food"))
;; nil nil
;; :buffer (org-ql-test-data-buffer "data2.org")) :buffer (org-ql-test-data-buffer "data2.org"))
;; (org-ql-expect ((tags-local "fruit")) (org-ql-expect ((tags-local "fruit"))
;; '("Fruit") '("Fruit")
;; :buffer (org-ql-test-data-buffer "data2.org")))) :buffer (org-ql-test-data-buffer "data2.org"))))
;;
;; (describe "(tags-all), (tags&)" (describe "(tags-all), (tags&)"
;;
;; (org-ql-it "with 2 tags" (org-ql-it "with 2 tags"
;; (org-ql-expect ((tags-all "universe" "personal")) (org-ql-expect ((tags-all "universe" "personal"))
;; '("Practice leaping tall buildings in a single bound")) '("Practice leaping tall buildings in a single bound"))
;; (org-ql-expect ((tags& "ambition" "space")) (org-ql-expect ((tags& "ambition" "space"))
;; '("Visit Mars" "Visit the moon"))) '("Visit Mars" "Visit the moon")))
;;
;; (org-ql-it "with file tags" (org-ql-it "with file tags"
;; (org-ql-expect ((tags-all "food" "fruit")) (org-ql-expect ((tags-all "food" "fruit"))
;; '("Fruit" "Blueberry" "Strawberry") '("Fruit" "Blueberry" "Strawberry")
;; :buffer (org-ql-test-data-buffer "data2.org")))) :buffer (org-ql-test-data-buffer "data2.org"))))
;;
;; (describe "(tags-regexp), (tags*)" (describe "(tags-regexp), (tags*)"
;;
;; (org-ql-it "without arguments" (org-ql-it "without arguments"
;; (org-ql-expect ((tags-regexp)) (org-ql-expect ((tags-regexp))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony")) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Shop for groceries" "Rewrite Emacs in Common Lisp" "Write a symphony"))
;; (org-ql-expect ((not (tags*))) (org-ql-expect ((not (tags*)))
;; '("Recurring" "Sunrise/sunset" "Ideas"))) '("Recurring" "Sunrise/sunset" "Ideas")))
;;
;; (org-ql-it "with a tag regexp" (org-ql-it "with a tag regexp"
;; (org-ql-expect ((tags-regexp "Emac")) (org-ql-expect ((tags-regexp "Emac"))
;; '("/r/emacs" "Rewrite Emacs in Common Lisp")) '("/r/emacs" "Rewrite Emacs in Common Lisp"))
;; (org-ql-expect ((not (tags* "Emac"))) (org-ql-expect ((not (tags* "Emac")))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony"))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Visit Mars" "Take over the moon" "Visit the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Spaceship lease" "Fix flux capacitor" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony")))
;;
;; (org-ql-it "with 2 tag regexps" (org-ql-it "with 2 tag regexps"
;; (org-ql-expect ((tags-regexp "Emac" "spac")) (org-ql-expect ((tags-regexp "Emac" "spac"))
;; '("Visit Mars" "Visit the moon" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Rewrite Emacs in Common Lisp")) '("Visit Mars" "Visit the moon" "Spaceship lease" "Fix flux capacitor" "/r/emacs" "Rewrite Emacs in Common Lisp"))
;; (org-ql-expect ((not (tags* "Emac" "spac"))) (org-ql-expect ((not (tags* "Emac" "spac")))
;; '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Take over the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony"))) '("Take over the universe" "Take over the world" "Skype with president of Antarctica" "Take over Mars" "Take over the moon" "Practice leaping tall buildings in a single bound" "Renew membership in supervillain club" "Learn universal sign language" "Order a pizza" "Get haircut" "Internet" "Recurring" "Shop for groceries" "Sunrise/sunset" "Ideas" "Write a symphony")))
;;
;; (org-ql-it "with regexp matching file tags" (org-ql-it "with regexp matching file tags"
;; (org-ql-expect ((tags-regexp "foo")) (org-ql-expect ((tags-regexp "foo"))
;; '("Fruit" "Blueberry" "Strawberry" "Vegetable" "Broccoli" "Potato") '("Fruit" "Blueberry" "Strawberry" "Vegetable" "Broccoli" "Potato")
;; :buffer (org-ql-test-data-buffer "data2.org")) :buffer (org-ql-test-data-buffer "data2.org"))
;; (org-ql-expect ((tags* "frui")) (org-ql-expect ((tags* "frui"))
;; '("Fruit" "Blueberry" "Strawberry") '("Fruit" "Blueberry" "Strawberry")
;; :buffer (org-ql-test-data-buffer "data2.org")))) :buffer (org-ql-test-data-buffer "data2.org"))))
;; ;;
;; (describe "(ts)" ;; (describe "(ts)"
;; ;;