-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plain query doesn't handle multiple conditions correctly #314
Comments
That's not what I get. I get this: (org-ql--query-string-to-sexp "todo: test")
;; (and (todo) (rifle "test"))
(org-ql--query-string-to-sexp "todo: ts:on=today")
;; (and (todo) (ts :on "today"))
(org-ql--query-string-to-sexp "sample text")
;; (and (rifle "sample") (rifle "text")) |
There was a recent update in The test cases for the plain query parsing succeed with the previous version of
So the issue was due to the update in peg. I have reproduced the issue using my own framework here. The test cases only fail after updating peg.el at akirak@5cc32f5: |
Fixes #314, fixes #316. Thanks to Akira Komamura (@akirak) and Joon Ro (@joonro) for reporting. Instead of `[blank]` in this PEX, it used to be `(syntax-class whitespace)`, which worked fine with peg v1.0. Then <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59345> was filed and resulted in the release of peg v1.0.1, after which that no longer worked. As best I can tell from reading the discussion, `[blank]` and `(syntax-class whitespace)` should behave the same way, yet here they do not: with peg v1.0.1, only `[blank]` works. Why, I do not know; I only tried it because I could find no explanation for the broken behavior, and luckily, it works. Maybe it's due to the use of `(syntax-class whitespace)` later in the `pexs`; but since it finally works again, let's take the victory as-is.
This should be fixed now. Please let me know if it works for you. |
It works with the latest version of peg from ELPA. Thanks! |
Hello, I'm using
org-ql-completing-read
, but it doesn't seem to handle multiple conditions now.Single condition seems to work:
However, if multiple conditions are specified in a plain query, all queries other than the first one become a
rifle
query with the first letter eliminated:It once behaved differently from this. Is this the current expected behavior?
The text was updated successfully, but these errors were encountered: