From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: An issue with org-agenda-todo-list-sublevels Date: Sat, 12 Dec 2015 12:00:23 +0100 Message-ID: <87vb84aq48.fsf@mbork.pl> References: <877fkldgvw.fsf@mbork.pl> <87h9jo121d.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7hup-0005uS-Pz for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 06:00:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7hul-0004PL-DO for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 06:00:39 -0500 Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:39874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7hul-0004Ov-6q for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 06:00:35 -0500 In-reply-to: <87h9jo121d.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-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: > Hello, > > Marcin Borkowski writes: > >> I have org-agenda-todo-list-sublevels set to nil. However, given this >> tree: >> >> * DONE task >> ** TODO subtask >> >> it turns out that the todo list in the agenda shows the "subtask" anyway. >> >> Should it be so? I would guess not. > > It's not clear to to me it shouldn't be the case. AFAIU, the point of > `org-agenda-todo-list-sublevels' is not to skip TODO entries but to > limit the tasks you can process at a time. I see. >> The reason I'd like to exclude this "subtask" from displaying is >> something like this: assume that I have a project, halfway done, which >> must be postponed for some reason. I'd like to be able to do this: >> >> * SOMEDAY cool project >> ** DONE preparation >> ** TODO hard work >> >> where SOMEDAY is a done-type keyword. >> >> And of course, I don't want to be bothered by "hard work" in this case >> in my global todo list. >> >> Is there a way to achieve this? > > 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). Wow, thanks, I didn't know about it. Now that I look into this, should I use `org-agenda-skip-function' or `org-agenda-skip-function-global'? Also, how do I check whether one of the parents is done? I know how to climb through the hierarchy of headlines, how do I get the TODO keyword? Is `org-get-todo-state' the right function to do that? Now that I think of it, maybe I should use a tag for that (like :project: or something). I'll have to think about it. > Regards, Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University