Skip to content

Commit

Permalink
Fix: (org-ql--def-query-string-to-sexp-fn) Ignore leading blanks
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed Sep 8, 2023
1 parent f65b1d9 commit 1314078
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 95 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:

*Fixes*
+ Timestamp predicates are more tolerant of partial input (e.g. preventing errors while the user is typing a query into ~org-ql-find~).
+ Query parser ignores leading whitespace (e.g. preventing errors while the user is typing a query into ~org-ql-find~).

** 0.7.1

Expand Down
2 changes: 1 addition & 1 deletion org-ql.el
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ value of `org-ql-predicates')."
;; obscure bug in `peg': when one keyword is a substring of another,
;; and the shorter one is listed first, the shorter one fails to match.
(-sort (-on #'> #'length))))
(pexs `((query (+ (and term (* [blank]))))
(pexs `((query (and (* [blank]) (+ (and term (* [blank])))))
(term (or (and negation (list positive-term)
;; This is a bit confusing, but it seems to work. There's probably a better way.
`(pred -- (list 'not (car pred))))
Expand Down
Loading

0 comments on commit 1314078

Please sign in to comment.