How do I set org-export-dispatch to default to exporting the body html instead of the entire html file? As in the setting which you hit C-b in order to set?

I'm sure there must be a variable but I can't find it anywhere. Thanks!

Edit: To clarify, this is a question about how to default to export the body html, not how to export the body html itself which I appreciate I can do with C-c C-e C-b h.

  • it's here: emacs.stackexchange.com/q/57801/11477 third comment of accepted answer. Also here emacs.stackexchange.com/q/58835/11477
    – Muihlinn
    Jun 12, 2020 at 14:51
  • 1
  • Alas this doesn't answer the question. What I'm after is how to set that to be the default. In the same way that if I want the initial scope to be the subtree instead of the whole document I would set (setq org-export-initial-scope (quote subtree)).
    – kokoro
    Jun 12, 2020 at 15:52
  • 1
    Last time I checked there it wasn't a default for it (or I wasn't able to find it) because body-only isn't supported by all exporters. Best approach was using C-u C-c C-e after the first export, or making my own command calling the exporter with the options I needed. Although you possibly can hack org-dispatch-last-action to fake a previous call forcing the exporter to behave as you wish.
    – Muihlinn
    Jun 12, 2020 at 17:19
  • Thanks @NickD but I'm not sure I follow whether this is an answer to exporting the body of the html tags only?
    – kokoro
    Jun 12, 2020 at 17:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.