3

I'm trying to export subtrees using #+PROPERTY: EXPORT_FILE_NAME filename as described in the Org manual at bottom here.

I have a test file called test.org:

* This Is A Test
  #+PROPERTY: EXPORT_FILE_NAME export-test
  here is some content
* This Is Another Test
  #+PROPERTY: EXPORT_FILE_NAME another-export-test
  here is some more content.

When I put point on either * heading and export with C-c C-e C-s l o the resulting PDF file has the correct content, but is not called "export-test" or "another-export-test" but instead "test.pdf". I'm a beginner at this, and can't fathom what I'm doing wrong.

Org 8.3.1

Emacs 24.5.1

1
  • Hi Steven, you probably took the wrong property name from me, please check my updated answer. Sep 11, 2015 at 18:39

1 Answer 1

9

Please try it with property drawers:

* This Is A Test 
:PROPERTIES:
:EXPORT_FILE_NAME: export-test
:END:

Then put the cursor on this headline and export explicitly only above tree with C-c C-e C-s l o

11
  • Apologies, that was a mistake in my question but not in my approach, and thank you for catching it. I've fixed it in the post---the problem includes me using using C-c C-e C-s l o Sep 11, 2015 at 4:41
  • 1
    I'm sorry I've put the wrong property name into my example. With the right one - I updated - it is working under Emacs-24.5 with org-mode 8.2.10. Sep 11, 2015 at 18:19
  • 1
    That did it---thank you for your help! This will be a huge aid to me this week. Sep 12, 2015 at 1:50
  • 1
    @Dieter.Wilhelm hey, sorry about that. I can export org files to TeX without any issues. When I add the properties drawer with the EXPORT_FILE_NAME to a subtree, select it and export it, I don't get any errors. The file is successfully exported with the default name. I'm on Mac High Sierra and have Mactex 2017 installed. Jun 6, 2018 at 21:22
  • 1
    @GuilhermeSalomé: The difference is that when not using C-s the whole buffer (file) will be exported and the property for the file name is not used! ;-) With C-s org-mode is exporting only the current (sub)-tree and only then the respective tree properties are effective. Jun 6, 2018 at 22:00

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.