Skip to content

Instantly share code, notes, and snippets.

@freetonik
Created March 13, 2019 07:40
Show Gist options
  • Save freetonik/0b9369eacbd0e9ed217e8badf8902d35 to your computer and use it in GitHub Desktop.
Save freetonik/0b9369eacbd0e9ed217e8badf8902d35 to your computer and use it in GitHub Desktop.
(defun org-mode-export-myfile ()
"Export org document to HTML automatically on change"
(when (equal (buffer-file-name) "/path/to/links.org")
(progn
(org-html-export-to-html)
(message "HTML exported"))))
(add-hook 'after-save-hook 'org-mode-export-myfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment