Fix: (property) Handle org-use-property-inheritance when unspecified

Fixes #356.

Reported-by: beast-pro <https://github.com/beast-pro>
Reported-by: pcompassion <https://github.com/pcompassion>
This commit is contained in:
Adam Porter 2023-12-16 04:59:12 -06:00
parent 004ed1ee0f
commit 1496185141
3 changed files with 72 additions and 59 deletions

View file

@ -1823,10 +1823,14 @@ interpreted as nil or non-nil)."
;; otherwise would require ugly special-casing in the parsing).
(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))))
`(property ,property ,value
:inherit ,(if (plist-member plist :inherit)
(plist-get plist :inherit)
;; TODO: Add tests for these cases.
(pcase org-use-property-inheritance
(`nil nil) (`t t)
((pred stringp) org-use-property-inheritance)
((pred listp) `(quote ,org-use-property-inheritance)))))))
;; MAYBE: Should case folding be disabled for properties? What about values?
;; MAYBE: Support (property) without args.