org.el (org-entry-get): Fix inheritance problem
commit42ee862d33b3e2a84f1f370d3f7ff84f3ff7ad66
authorBastien Guerry <bzg@altern.org>
Tue, 18 Mar 2014 13:47:09 +0000 (18 14:47 +0100)
committerBastien Guerry <bzg@altern.org>
Tue, 18 Mar 2014 13:47:09 +0000 (18 14:47 +0100)
tree8c49376ba06c531c084fc330d4be9ed26f9f431e
parent3074d081e7d7d6551c04ab239cc6a90ebcbfa9fa
org.el (org-entry-get): Fix inheritance problem

* org.el (org-entry-get): Only try to combine file properties
with local properties when the property drawer contains such
local property, not when the property drawer exists.

Before the fix, `org-entry-get' behavior was inconsistent,
returning `nil' when looking for a property in a subtree with
no property drawer, and returning the global properties in a
subtree with a property drawer, independantly of whether this
property drawer contained a reference to the property we are checking
against or not.

As a side-effect, inheritance was broken for the case that
Ilya reported in commit 475f2f53, because `org-entry-get' returned
a value (with the global properties of the file) too early.

Thanks to Ilya for raising this bug and to Achim for pointing
out that the previous fix was wrong.
lisp/org.el