TransWikia.com

Why isn't org-agenda skipping DONE tasks?

Emacs Asked by Aylons on November 30, 2020

I’m trying to set up a planning process for the day (like in http://newartisans.com/2007/08/using-org-mode-as-a-day-planner/), but my org-agenda keeps showing DONE tasks, even though I set org-agenda-skip-deadline-if-done and org-agenda-skip-scheduled-if-done in the init.el:

org-agenda and init.el view

My current init.el file is available at https://github.com/aylons/emacsd/blob/master/init.el

One Answer

Quoting from my comment:

Judging from the fact that the DONE face and the TODO face look the same above, I'm guessing that your org-todo-keywords are screwed up, so Org mode does not know that it is done.

So I checked your init file and I see this:

...
'(org-todo-keywords
   '((sequence "TODO(t)" "DONE(d)" "WAITING(w)" "SOMEDAY(s)" "NEXT(s)")))
...

So indeed your org-todo-keywords setting is wrong: you need to move the DONE entry to the last place:

...lang-el
...
'(org-todo-keywords
   '((sequence "TODO(t)" "WAITING(w)" "SOMEDAY(s)" "NEXT(s)" "DONE(d)")))
...

The doc string for org-todo-keywords (C-h v org-todo-keywords RET) says:

Each sequence starts with a symbol, either ‘sequence’ or ‘type’, indicating if the keywords should be interpreted as a sequence of action steps, or as different types of TODO items. The first keywords are states requiring action - these states will select a headline for inclusion into the global TODO list Org produces. If one of the "keywords" is the vertical bar, "|", the remaining keywords signify that no further action is necessary. If "|" is not found, the last keyword is treated as the only DONE state of the sequence.

So to be absolutely sure, it's probably best to include a "|" element in the list. That's necessary if you have more than one DONE state, but it's good practice in general:

...
'(org-todo-keywords
   '((sequence "TODO(t)" "WAITING(w)" "SOMEDAY(s)" "NEXT(s)" "|" "DONE(d)")))

Correct answer by NickD on November 30, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP