Is it possible to have org-mode export ignore entries that are in a completed state (e.g., DONE, WONTFIX).
Note that I do not want to create a sparse tree and then export what's visible, that will not necessarily give the same result.
(setq org-export-with-tasks 'todo)
As from description of variable, it can be placed as file local variable. Or you could include at in the
tasks:todo, and you would get ignored DONE tasks by export. Review other options for this variable as well.
This may have the following values: t include tasks independent of state. ‘todo’ include only tasks that are not yet done. ‘done’ include only tasks that are already done. nil ignore all tasks. list of keywords include tasks with these keywords. This option can also be set with the OPTIONS keyword, e.g. "tasks:nil".
You can try this on following example:
#+TITLE: New title #+TODO: TODO(t) WAIT(w) SCHD(s) DEFR(r) PROJ(j) | DONE(d) WONT(x) SDAY(m) FAIL(f) * DEFR First * SDAY Second is done CLOSED: [2019-07-18 Do 04:13] * SDAY PENDING This is pending CLOSED: [2019-07-18 Do 04:18] * PROJ CANCELED This is canceled
Which gives following output:
____________ NEW TITLE Jean Louis ____________ Table of Contents _________________ 1. DEFR First 2. PROJ CANCELED This is canceled 1 DEFR First ============ 2 PROJ CANCELED This is canceled ================================
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.