I use orgmode to export to latex using the subtree export command C-c C-e C-s l l. Suppose I have a .org file like below:

* My main project
** Chapter 1 - Done
** Chapter 2 - Partially Done
** Chapter 3 - Todo
** Many other chapters that are still not complete
* My other project
* Many other projects

And I want to export the tree named My main project, including Chapter 1, but excluding all other chapters.

The easiest way to do this is to add the tag noexport to Chapter 2 onwards. However, if there are many Chapters, this can get tedious.

Question: Is it possible to create a tag, say noexportonwards, that when added to a subtree, like Chapter 1, will make org export ignore all subsequent trees?

  • 2
    Not an answer, but you can easily set/unset a tag on all the following subtrees by selecting a region from there until the end of file, and then org-change-tag-in-region. – Jeeves Aug 15 '18 at 14:01
  • 1
    ... or you can add a first-level heading after Chapter 1 and tag it as "noexport". – NickD Aug 15 '18 at 21:02

Your Answer

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

Browse other questions tagged or ask your own question.