From 45ecf64d552f1a5eba4092adf89ab1d1049ce506 Mon Sep 17 00:00:00 2001 From: Bram Schoenmakers Date: Wed, 12 Apr 2023 12:51:05 +0200 Subject: [PATCH] Handle the case when org-use-property-inheritance is a list of strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- org-ql.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org-ql.el b/org-ql.el index c0f548a..44ed50e 100644 --- a/org-ql.el +++ b/org-ql.el @@ -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.