From d4b1408e218f81c3e97848cacb578474877f66db Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 21 Apr 2020 18:49:26 +0200 Subject: emacs: fixed html generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently soria's `soria-theme-purple-identifiers' does not behave correctly with the HTML exported of org-mode. This took me way longer to figure out that I'd like to admit... Signed-off-by: Miquel Sabaté Solà --- .emacs.d/init.org | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 92978c1..f39e64d 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -1,6 +1,8 @@ #+TITLE: mssola's GNU Emacs configuration #+AUTHOR: Miquel Sabaté Solà #+EMAIL: mikisabate@gmail.com +#+HTML_HEAD: +#+HTML_HEAD: #+BABEL: :cache yes #+PROPERTY: header-args :tangle ~/.emacs.d/init.el @@ -94,7 +96,10 @@ on each change, the following function is provided: ;; Avoid running hooks when tangling (let ((prog-mode-hook nil)) (org-babel-tangle) - (byte-compile-file (concat user-emacs-directory "init.el"))))) + (byte-compile-file (concat user-emacs-directory "init.el")) + (remove-hook 'emacs-lisp-mode-hook 'soria-theme-purple-identifiers) + (org-html-export-to-html) + (add-hook 'emacs-lisp-mode-hook 'soria-theme-purple-identifiers)))) (add-hook 'after-save-hook 'tangle-init) #+END_SRC @@ -1693,7 +1698,8 @@ blocks to be converted into HTML as well, so we can properly colorize it). #+BEGIN_SRC elisp (use-package htmlize - :ensure t) + :ensure t + :after org) #+END_SRC And now let's set all the related settings. @@ -2483,7 +2489,7 @@ Yeah, I've been on the salty road... ** Others -The [[https;//github.com/mssola/soria][soria]] theme has the =soria-theme-purple-identifiers= hook. This hook instructs +The [[https://github.com/mssola/soria][soria]] theme has the =soria-theme-purple-identifiers= hook. This hook instructs the theme to use purple for identifiers instead of the default color. This is a remnant from my Vim times, and I only apply it to some languages (random criteria really). -- cgit v1.2.3