Skip to content

Instantly share code, notes, and snippets.

@fasheng
Created October 6, 2013 10:32
Show Gist options
  • Save fasheng/6852271 to your computer and use it in GitHub Desktop.
Save fasheng/6852271 to your computer and use it in GitHub Desktop.
Change theme before publishing, for getting a good html code highlight style through htmlize.
(defadvice org-publish (around fsh-org-publish-advice
(project &optional force async) activate)
"Change theme before publishing, for getting a good html code highlight style through
htmlize."
(let ((thems custom-enabled-themes))
(dolist (theme thems)
(disable-theme theme))
(load-theme 'github)
ad-do-it
(disable-theme 'github)
(dolist (theme thems)
(enable-theme theme))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment