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 02:24:32 -0500 Message-ID: <87h9f48xfz.fsf@alphapapa.net> References: <87bn5dupt4.fsf@artlab.createcnix.lan> <87vb3kx1r6.fsf@alphapapa.net> <87r3e8zmrf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqbdt-0000Li-BW for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 03:24:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqbdo-000178-8s for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 03:24:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:49740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqbdo-000170-2D for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 03:24:40 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aqbdm-0005Qp-Bl for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 09:24:38 +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 09:24:38 +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 09:24:38 +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 Nicolas Goaziou writes: > Actually, `org-entry-get-with-inheritance' is an internal function, > which shouldn't be called at all. The entry point is `org-entry-get', > which can be called with an appropriate INHERIT optional argument. 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 At least I learned some more about Org by trying to fix it the wrong way. :) Thanks, Nicolas.