From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Detect parent with SCHEDULED or DEADLINE Date: Thu, 14 Apr 2016 03:04:04 +0000 (UTC) Message-ID: References: <87bn5dupt4.fsf@artlab.createcnix.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqXZs-0000bS-G9 for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 23:04:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqXZp-0005VP-Ai for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 23:04:20 -0400 Received: from plane.gmane.org ([80.91.229.3]:35098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqXZp-0005VH-4l for emacs-orgmode@gnu.org; Wed, 13 Apr 2016 23:04:17 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aqXZn-0003m7-3y for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 05:04:15 +0200 Received: from 172-0-42-27.lightspeed.ltrkar.sbcglobal.net ([172.0.42.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Apr 2016 05:04:15 +0200 Received: from adam by 172-0-42-27.lightspeed.ltrkar.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Apr 2016 05:04:15 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.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.