Fix: Quoted phrase plain-string queries

This commit is contained in:
Adam Porter 2019-10-19 01:53:34 -05:00
parent 43b94dd4a8
commit 7a4a41e402
3 changed files with 4 additions and 1 deletions

View file

@ -368,6 +368,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
*Fixed*
+ In =org-ql-search=, accept symbol as ~:super-groups~ argument.
+ In the =This week= and =Next week= default =org-ql-views= views, set timestamps for beginning-of-week to 00:00:00 and end-of-week to 23:59:59.
+ Plain quoted-phrases in non-sexp queries.
** 0.3.1

View file

@ -1296,7 +1296,7 @@ Multiple predicates are combined with BOOLEAN."
(and predicate-without-args `(pred -- (list (intern pred))))
(and plain-string `(s -- (list 'regexp s))))
(opt (+ (syntax-class whitespace) (any)))))
(plain-string (substring (+ (not (syntax-class whitespace)) (any))))
(plain-string (or quoted-arg unquoted-arg))
(predicate-with-args (substring predicate) ":" args)
(predicate-without-args (substring predicate) ":")
(predicate (or ,@predicates))

View file

@ -235,6 +235,8 @@ RESULTS should be a list of strings as returned by
(expect (org-ql--plain-query "scheduled")
;; No colon after keyword, so not a predicate query.
:to-equal '(regexp "scheduled"))
(expect (org-ql--plain-query "\"quoted phrase\"")
:to-equal '(regexp "quoted phrase"))
(expect (org-ql--plain-query "regexp:word")
:to-equal '(regexp "word"))
(expect (org-ql--plain-query "regexp:\"quoted phrase\"")