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: Nicolas Goaziou
Subject: Re: [O] Detect parent with SCHEDULED or DEADLINE
Date: Thu, 14 Apr 2016 09:57:50 +0200

Adam Porter <address@hidden> writes:

> Ah, I see.  So I guess the solution to Christophe's issue is to use
> this:
>
> #+BEGIN_SRC elisp
> (defun r3v/skip-inherited-scheduled-or-deadline ()
>   "Skip tasks that inherit from SCHEDULED or DEADLINE"
>   (let ((next-headline (save-excursion (or (outline-next-heading) 
> (point-max))))
>         (inherited-scheduled (org-entry-get "SCHEDULED" t))
>         (inherited-deadline (org-entry-get "DEADLINE" t)))
>     ;; I will consider the scheduled part if I can make it work with
>     ;; deadlines first
>     (if (org-not-nil inherited-deadline)
>         next-headline
>       nil)))
> #+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,



reply via email to

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