From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: An issue with org-agenda-todo-list-sublevels Date: Mon, 14 Dec 2015 15:48:17 -0500 Message-ID: <87y4cwiwoe.fsf@alphaville.usersys.redhat.com> References: <877fkldgvw.fsf@mbork.pl> <87h9jo121d.fsf@nicolasgoaziou.fr> <87vb84aq48.fsf@mbork.pl> <871taoc00z.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8a2u-00086z-Fl for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 15:48:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8a2q-0004pi-0Q for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 15:48:36 -0500 Received: from plane.gmane.org ([80.91.229.3]:41678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8a2p-0004pN-Qi for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 15:48:31 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a8a2n-0001oL-80 for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 21:48:29 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Dec 2015 21:48:29 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Dec 2015 21:48:29 +0100 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: emacs-orgmode@gnu.org Marcin Borkowski writes: >> 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: > > (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))))))) > > and I see this: > > and: Wrong type argument: integer-or-marker-p, t > > What may be the problem? How do I even debug this? > Are you testing it with emacs -q -l /path/to/min/org-init.el? If not, you probably should: I don't get any errors with the stuff above in my minimal org file, which leads me to suspect it's something in (the rest of) your configuration. -- Nick