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

  • Hi Steven, you probably took the wrong property name from me, please check my updated answer. – Dieter.Wilhelm Sep 11 '15 at 18:39
8

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

  • 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 – Steven Arntson Sep 11 '15 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. – Dieter.Wilhelm Sep 11 '15 at 18:19
  • 1
    That did it---thank you for your help! This will be a huge aid to me this week. – Steven Arntson Sep 12 '15 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. – Guilherme Salomé Jun 6 '18 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. – Dieter.Wilhelm Jun 6 '18 at 22:00

Your Answer

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

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