With Org-Mode 8.3 and Emacs 24.5.1, the accepted answer creates the *Org HTML Export* pseudo-buffer, which you must save manually, and the Cc Ce hh key saves the file more conveniently directly.
To really auto-expose in the background, try the following code:
# Local variables:
You can combine this solution with the following function in .emacs :
(defun toggle-html-export-on-save () "Enable or disable export HTML when saving current buffer." (interactive) (when (not (eq major-mode 'org-mode)) (error "Not an org-mode file!")) (if (memq 'org-html-export-to-html after-save-hook) (progn (remove-hook 'after-save-hook 'org-html-export-to-html t) (message "Disabled org html export on save")) (add-hook 'after-save-hook 'org-html-export-to-html nil t) (set-buffer-modified-p t) (message "Enabled org html export on save")))
Andreas Spindler
source share