1

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.

kokoro
  • 33
  • 4
  • it's here: https://emacs.stackexchange.com/q/57801/11477 third comment of accepted answer. Also here https://emacs.stackexchange.com/q/58835/11477 – Muihlinn Jun 12 '20 at 14:51
  • 1
    Does this answer your question? [When exporting an org file to html, how do I only get the html body, ignoring other parts?](https://emacs.stackexchange.com/questions/57801/when-exporting-an-org-file-to-html-how-do-i-only-get-the-html-body-ignoring-ot) – Muihlinn Jun 12 '20 at 14:52
  • 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 '20 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 '20 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 '20 at 17:39
  • Thanks @Muihlinn, prefacing the command with `C-u` will do for now, good idea :) I see what you're saying about 'Body only' not applying to all the export formats, but then it is up there with the other general options so it does seem odd. – kokoro Jun 12 '20 at 17:42

0 Answers0