Skip to content
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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Handle the case when org-use-property-inheritance is a list of strings
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.
bram85 committed Apr 12, 2023
commit 45ecf64d552f1a5eba4092adf89ab1d1049ce506
6 changes: 3 additions & 3 deletions org-ql.el
Original file line number Diff line number Diff line change
@@ -1802,9 +1802,9 @@ interpreted as nil or non-nil)."
(when (keywordp property)
(setf property (substring (symbol-name property) 1)))
(list 'property property value
:inherit (if (plist-member plist :inherit)
(plist-get plist :inherit)
org-use-property-inheritance))))
:inherit (cond ((plist-member plist :inherit) (plist-get plist :inherit))
((listp org-use-property-inheritance) nil)
(t org-use-property-inheritance)))))
;; MAYBE: Should case folding be disabled for properties? What about values?
;; MAYBE: Support (property) without args.