emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Detect parent with SCHEDULED or DEADLINE


From: Adam Porter
Subject: Re: [O] Detect parent with SCHEDULED or DEADLINE
Date: Thu, 14 Apr 2016 03:04:04 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi Christophe,

I'm still using Org 8.2.4 from Ubuntu Trusty (I'll upgrade Org one of these
days...), and I tested your code, and it seems to work properly.  For
example, testing on this tree:

#+BEGIN_SRC org
* Test tree
** TODO Parent todo
DEADLINE: <2016-04-15 ven.>
:PROPERTIES:
:ParentProp:   ValPar
:END:

potatoes

*** NEXT SubAction
:PROPERTIES:
:SubProp:   Val
:END: 

sandwiches
#+END_SRC

With point anywhere in the "SubAction" entry, either on the heading line or
after it, when I eval ~(org-entry-get-with-inheritance "DEADLINE")~, I get
"2016-04-15 ven."

But in Org 8.3.4, it fails, just as you said.  I think I see why:

In Org 8.2.4, =org-entry-get-with-inheritance= has this code:

#+BEGIN_SRC elisp
(if (member property org-special-properties)
          ;; We need a special property.  Use `org-entry-properties'
          ;; to retrieve it, but specify the wanted property
          (cdr (assoc property (org-entry-properties nil 'special property)))
...
#+END_SRC

That finds properties like =DEADLINE= that are not inside property drawers.

But in Org 8.3.4, =org-entry-get-with-inheritance= calls
=org-property--local-values=, which calls =org-get-property-block=, which
returns =nil=, and it doesn't check =org-special-properties= at all, so it
seems to only search inside =:PROPERTIES:= drawers.

I think it was caused by commit 188bae9 "Fix property inheritance with
extended values" from 3 Jul 2015.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]