1

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.

1

1 Answer 1

2
(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 #+OPTIONS line: 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
================================
13
  • 1
    Should be (setq org-export-with-tasks 'todo), but otherwise points in the right direction.
    – Daniel
    Jul 12, 2019 at 21:40
  • What about headings without todo keywords?
    – Tobias
    Jul 13, 2019 at 4:12
  • ah that is what is target, than I corrected it, thank you for pointing
    – Jean Louis
    Jul 13, 2019 at 8:37
  • 1
    Can you elaborate?
    – user12563
    Jul 13, 2019 at 11:29
  • What @DoMiNeLa10 said. Please say how this answers the question.
    – Drew
    Jul 13, 2019 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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