8

I have a large org-mode file containing handouts for a class. Each handout is a separate toplevel subtree (*). At the top of my org file, I have options:

#+OPTIONS: author:nil email:nil 

This is followed by various handouts subtrees:

* Handout #1 ** Some things about this handout ** Other things * Handout #2 ** Some things ** More things 

On these individual handouts, I sometimes wish to override the OPTIONS settings at the top when I export to PDF. In the export settings section of the org manual, it suggests you can set specific export settings for a subtree, viz:

* Handout #1 #+EXPORT_OPTIONS: email:t ** Things ** More things 

I've tried this, but it doesn't work as I'd like. Here, for instance, when I export the subtree for Handout #1 (C-c C-e C-s l o) my email does appear at the top of the PDF, but then it also appears at the top of the Handout #2 PDF when I export the Handout #2 subtree.

I'd like to set persistent OPTIONS at the top of the file that can be turned on or off for a subtree without affecting other subtrees. How could this be done? If it can't be, is there an approach that would work similarly to what I'm searching for?

1 Answer 1

7

You have to use PROPERTIES for that. Try the following:

* Handout #1 :PROPERTIES: :EXPORT_OPTIONS: email:t :END: ** Things ** More things 

EDITED This does work, but only when Export scope is set to subtree and not buffer. (Thanks to @michael-muldoon)

4
  • Yes, I've started learning about :properties: this month, and this fits perfectly into what I've been reading. Thank you! Commented Nov 11, 2015 at 19:58
  • I'm doing this (specifically changing H:1 to suppress deeper headlines) but it doesn't seem to have any effect. Any idea what I'm missing? Commented Aug 9, 2016 at 17:40
  • Sorry for the late reply - are you doing subtree exporting or are you exporting the whole document? I think this only works in subtree exporting. That is a reason why it does not work on top of my head. Commented Apr 3, 2017 at 17:41
  • As described by @joon above, this does work, but only when Export scope is set to subtree and not buffer. I don't fully understand why. ``` * Handout #1 :PROPERTIES: :EXPORT_OPTIONS: email:t :END: ** Things ** More things ``` Commented Jul 6, 2021 at 16:57

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.