0

In org-export-dispatch (C-c C-e), there is an option for Export-scope from (Buffer vs Subtree) which is bind for (C-s). I frequently use this Subtree when exporting to LaTeX PDF.

Problem: So I frequently do: C-c C-e C-s l p. This feels too much key-strokes.

Question: How to export with Subtree option using elisp function, so that I can bind it to fewer key-stokes.

1 Answer 1

1

Oops sorry, it was too trivial:

(org-latex-export-to-pdf nil t)

When the 2-nd argument is non-nil as like above, it exports only subtree.

/However, not sure why it fails to produce PDF (at least in my case) when 1-st argument is t/

1
  • 1
    "... not sure why it fails to produce PDF (at least in my case) when 1-st argument is t" : that argument is the async argument which is what is set with C-c C-e C-a ... in the interactive dispatcher. To debug, set org-export-async-debug to t first, try the export and then visit the buffer *Org Export Process* to see what went wrong.
    – NickD
    Apr 3 at 18:08

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.