From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: An issue with org-agenda-todo-list-sublevels Date: Fri, 11 Dec 2015 00:26:59 +0100 Message-ID: <877fkldgvw.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7AcD-0005ZI-5B for emacs-orgmode@gnu.org; Thu, 10 Dec 2015 18:27:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7Ac9-0000dn-4d for emacs-orgmode@gnu.org; Thu, 10 Dec 2015 18:27:13 -0500 Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:32831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7Ac8-0000bo-UI for emacs-orgmode@gnu.org; Thu, 10 Dec 2015 18:27:09 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id EDD708F201A for ; Fri, 11 Dec 2015 00:27:05 +0100 (CET) Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2cb7sPA0248J for ; Fri, 11 Dec 2015 00:27:03 +0100 (CET) Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id A44FC8F2017 for ; Fri, 11 Dec 2015 00:27:03 +0100 (CET) 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: Org-Mode mailing list Hi list, 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. 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? (Org-mode version 8.3beta (release_8.3beta-1136-g0e7062).) If not, can it be considered a feature request? A cursory examination of org-agenda.el shows that the culprit is the function org-agenda-get-todos, and that (probably) this is responsible: --8<---------------cut here---------------start------------->8--- (regexp (format org-heading-keyword-regexp-format (cond ((and org-select-this-todo-keyword (equal org-select-this-todo-keyword "*")) org-todo-regexp) (org-select-this-todo-keyword (concat "\\(" (mapconcat 'identity (org-split-string org-select-this-todo-keyword "|") "\\|") "\\)")) (t org-not-done-regexp)))) --8<---------------cut here---------------end--------------->8--- (notice the last line, with `org-not-done-regexp'!) A possible course of action might be to change that line to use `org-todo-regexp'; OTOH, the exclusion of tasks marked as done should be then done differently. (If there is any interest, I might try to look into it further.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University