From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: An issue with org-agenda-todo-list-sublevels Date: Mon, 14 Dec 2015 20:17:48 +0100 Message-ID: <871taoc00z.fsf@mbork.pl> References: <877fkldgvw.fsf@mbork.pl> <87h9jo121d.fsf@nicolasgoaziou.fr> <87vb84aq48.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Ydj-0001ku-FX for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 14:18:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8Ydf-0006Ec-FN for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 14:18:31 -0500 Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:54909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Ydf-0006EF-88 for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 14:18:27 -0500 In-reply-to: <87vb84aq48.fsf@mbork.pl> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Org-Mode mailing list > On 2015-12-12, at 09:53, Nicolas Goaziou wrote: > >> You can use a dedicated function in `org-agenda-skip-function' for that >> (e.g., ignore task if one of its parents is a done task). OK, so it doesn't work (probably because I'm doing something wrong...) I did this: --8<---------------cut here---------------start------------->8--- (defun mbork/org-agenda-skip-if-parent-done () "Return t if any of the parents of the current entry is a DONE item." (save-excursion (catch 'done (while (org-up-heading-safe) (if (org-entry-is-done-p) (throw 'done t)))))) (setq org-agenda-custom-commands '(("n" "Agenda and TODOs" ((agenda "") (alltodo "" ((org-agenda-skip-function #'mbork/org-agenda-skip-if-parent-done))))))) --8<---------------cut here---------------end--------------->8--- and I see this: --8<---------------cut here---------------start------------->8--- and: Wrong type argument: integer-or-marker-p, t --8<---------------cut here---------------end--------------->8--- What may be the problem? How do I even debug this? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University