emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* An issue with org-agenda-todo-list-sublevels
@ 2015-12-10 23:26 Marcin Borkowski
  2015-12-12  8:53 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin Borkowski @ 2015-12-10 23:26 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-16  8:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10 23:26 An issue with org-agenda-todo-list-sublevels Marcin Borkowski
2015-12-12  8:53 ` Nicolas Goaziou
2015-12-12 11:00   ` Marcin Borkowski
2015-12-14 19:17     ` Marcin Borkowski
2015-12-14 20:48       ` Nick Dokos
2015-12-15 23:33         ` Marcin Borkowski
2015-12-16  1:54           ` Nick Dokos
2015-12-16  8:20             ` Marcin Borkowski

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).