-
Notifications
You must be signed in to change notification settings - Fork 109
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
Handle the case when org-use-property-inheritance is a list of strings #346
Conversation
When org-use-property-inheritance is a list, then the query (property "FOO" "BAR") would bail out with: org-ql--byte-compile-warning: Invalid Org QL query: "Invalid Org QL query: \"‘\\\"BLAH\\\"’ is a malformed function\", :warning", :error (property "FOO") would still work though. So, if org-use-property-inheritance is a list, cast it to the (default) boolean value for this variable: nil.
Hi Bram, Thanks, but I'm not sure this is the correct solution to the problem. IIUC this means that, when the user configures the variable to be a list of properties to inherit, rather than those properties being inherited in the search, property inheritance will be disabled. What do you think? Also, I don't fully understand your problem report, because I don't see |
I figured the :inherit keyword is expected to be a boolean value. And if
Indeed, I didn't mention it but this happens when |
It does seem like there's a bug here, in that if But if the user sets the value to a list of properties that should be inherited, it would seem wrong to disable inheritance altogether, because that wouldn't produce the result the user expects. |
The cause of this problem is that the The correct solution would be to handle the case of the variable's value being a list by quoting the value in the macro expansion. Then the query should produce the expected result according to the value of the variable. However, we should note that the variable's value may differ between buffers, and the query is not compiled for each buffer separately, so the best solution might be to have the Generally it would be helpful if problems like this were first reported as bugs, so the problem could be fully understood before proposing a solution. :) |
This symbol is mentioned in the org-entry-get documentation.
I think it has been solved properly now by passing the |
Release: v0.7.2 # -----BEGIN PGP SIGNATURE----- # # iF0EABECAB0WIQRibGN7s6Ag030zGsLn4Z3JMOysmwUCZRO8JAAKCRDn4Z3JMOys # mxpgAKDB9mCBhmsIfMAgQVRCcAOjBu6A7gCfQRSwZyBQYXIFwJ/y9JA2Ftpkafw= # =w2+9 # -----END PGP SIGNATURE----- # gpg: directory '/data/data/com.termux/files/home/.gnupg' created # gpg: Signature made 2023-09-27 07:22:44 +0200 CEST # gpg: using DSA key 626C637BB3A020D37D331AC2E7E19DC930ECAC9B # gpg: Can't check signature: No public key
@bram85 Thanks for your patience. BTW, please avoid making PRs from your fork's |
When org-use-property-inheritance is a list, then the query
(property "FOO" "BAR")
would bail out with:
org-ql--byte-compile-warning: Invalid Org QL query: "Invalid Org QL
query: "‘\"BLAH\"’ is a malformed function", :warning", :error
(property "FOO") would still work though.
So, if org-use-property-inheritance is a list, cast it to the (default) boolean value for this variable: nil.