# 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:

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

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

## Related Questions

### How to measure the performance of the mode-line?

1  Asked on December 7, 2021

### elfeed + olivetti modes

1  Asked on December 7, 2021 by luis-silva

### Restrict available command options in AuCTeX

1  Asked on December 5, 2021

### How to automatically remove a hook provided by a minor mode after disabling that mode?

1  Asked on December 5, 2021 by caseneuve

### SVG image display blurry

1  Asked on December 4, 2021

### Autoloaded variable overrides the one from the init file

1  Asked on December 4, 2021

### How to use keyword symbols in Emacs Lisp?

3  Asked on December 4, 2021

### How do I configure helm-git-grep candidates limit?

1  Asked on December 2, 2021 by wawrzyniec-pruski

2  Asked on November 30, 2021 by mmmmmm

### File within a root grandparent is detected by emacs as belonging to a directory that doesn’t exists

1  Asked on November 30, 2021

1  Asked on November 30, 2021

### eww browser is hanging at contacting duckduckgo

1  Asked on November 25, 2021 by cryptograthor

### How to move by defun without moving up a level?

0  Asked on November 25, 2021 by cammil

### Reset custom variable to default value programmatically

3  Asked on November 22, 2021 by itsjeyd

### How to make emacs automatically spell check all visible text?

2  Asked on November 22, 2021

2  Asked on November 20, 2021 by vince-w

### Symbol’s function definition is void

1  Asked on November 20, 2021 by 546756ryd

### How to pretty-format code (auto-insert newlines, indent, etc)?

7  Asked on November 18, 2021 by emmanuel-touzery

### org-latex-fragment gets cutoff

1  Asked on November 17, 2021 by quarky-quanta

### Display #+INCLUDE File Contents in Github README.org?

2  Asked on November 15, 2021 by matthew-zeng