Consider the following file:

* My Book
#+OPTIONS: toc:nil
#+OPTIONS: num:nil
** DONE chapter 1 [2/2]
*** DONE section 1.1
*** DONE section 1.2 
** DONE chapter 2 
** TODO chapter 3 
** superseded  :noexport:

I place my point at the top heading (My Book) and press C-c C-e C-s l o

This produces a pdf file with the following headings:

DONE chapter 1 [2/2]
DONE section 1.1
DONE section 1.2
DONE chapter 2
TODO chapter 3

However, I want the exported pdf file to look like this:

chapter 1
section 1.1
section 1.2 
chapter 2 
chapter 3

I tried to use the option #+OPTIONS: tasks:nil with the effect that the DONE headings are not exported at all. Ideally, I could choose that the DONE keyword should not be exported with the heading, while e.g. the TODO keyword should be exported.

1 Answer 1



#+OPTIONS: todo:nil stat:nil

The full set of options is described in the manual in the section Export Settings. You can read that section in Emacs as well with C-h i g(org) RET m export settings RET.

The relevant snippets are:

     Toggle inclusion of statistics cookies

     Toggle inclusion of tasks (TODO items); or ‘nil’ to remove all
     tasks; or ‘todo’ to remove done tasks; or list the keywords to keep
     Toggle inclusion of TODO keywords into exported text

You can use

#+OPTIONS: tasks:todo

to exclude DONE tasks, but AFAIK, you cannot select which TODO keywords should be exported: it's all or nothing.

Do C-h v org-export-with-tasks for more information on this variable and similarly for org-export-with-todo-keywords and org-export-with-statistics-cookies for the others.

EDIT: the syntax for setting tasks to a list of keywords is


But I had to do a bit of trial-and-error; I didn't find it in the docs.

  • Thank you NickD. The manual mentions in the 'tasks' section that one could list the keywords to keep. How would one list them?
    – GNUmon
    Nov 8 at 20:31
  • 1
    Edited the answer with the additional info.
    – NickD
    Nov 8 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.