From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Schockaert Subject: Re: Detect parent with SCHEDULED or DEADLINE Date: Thu, 14 Apr 2016 23:28:43 +0200 Message-ID: <87vb3jc22c.fsf@artlab.createcnix.lan> References: <87bn5dupt4.fsf@artlab.createcnix.lan> <87vb3kx1r6.fsf@alphapapa.net> <87r3e8zmrf.fsf@nicolasgoaziou.fr> <87h9f48xfz.fsf@alphapapa.net> <87mvowzkox.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqopI-0006qY-93 for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 17:29:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqopF-0008TC-31 for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 17:29:24 -0400 Received: from smtp2.tech.numericable.fr ([82.216.111.38]:46075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqopE-0008Sv-T5 for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 17:29:21 -0400 In-reply-to: <87mvowzkox.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Adam Porter , emacs-orgmode@gnu.org Nicolas Goaziou writes: > Adam Porter writes: > >> Ah, I see. So I guess the solution to Christophe's issue is to use >> this: >> >> #+BEGIN_SRC elisp [...] >> (inherited-scheduled (org-entry-get "SCHEDULED" t)) [...] >> #+END_SRC > > I don't think so. You cannot force inheritance for a special property, > which obey to its own rules. The optional argument is going to be > ignored. If the OP wants to get the SCHEDULED value of the current > headline or any of its parent, he can move up the hierarchy with > `org-up-heading-safe', calling `org-entry-get' at each stop. > > Regards, Thank you Adam and Nicolas for your answers, I know have a better picture how things work in Org, and I also understand why '(org-entry-get "DEADLINE" t)' returned 'nil' when called directly from the org-file. I could rewrite my function using 'org-up-heading-safe' and 'org-entry-get', and it gets the expected result in the agenda view :-) I am starting to enjoy ELisp, and I graduately become better at it. Cheerful thanks, Christophe -- ---------------> mailto:R3vLibre@citadels.eu Once it's perfectly aimed, the flying arrow goes straight to its target. Thus, don't worry when things go right. There will be enough time to worry about if they go wrong. Then, it's time to fire a new arrow towards another direction. Don't sink. Adapt yourself ! The archer has to shoot accurately and quickly. [Words of Erenthar, the bowman ranger] <---------------<<<<