diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-04-19 11:17:47 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-04-19 11:17:47 +0100 |
commit | d066b6c848a48cb3cd6ac1562eb840c4a10101e0 (patch) | |
tree | a891a0135a27224b76480396de5e45280726c4b1 /doom | |
parent | 873a1990618334dd4a7aa8a93ebaecd95d71eab8 (diff) | |
download | dotfiles-d066b6c848a48cb3cd6ac1562eb840c4a10101e0.tar.gz dotfiles-d066b6c848a48cb3cd6ac1562eb840c4a10101e0.zip |
Add alectryon config
Diffstat (limited to 'doom')
-rw-r--r-- | doom/config.org | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doom/config.org b/doom/config.org index b99b2b2..2f18499 100644 --- a/doom/config.org +++ b/doom/config.org @@ -1005,7 +1005,19 @@ https://yannherklotz.com") :hook (coq-mode . alectryon-mode) :config (map! :map alectryon-mode-map - "C-c u t" #'alectryon-toggle)) + "C-c u t" #'alectryon-toggle + "C-c u p" #'ymhg/alectryon-preview) + (defun ymhg/alectryon-preview () + "Display an HTML preview of the current buffer." + (interactive) + (let* ((html-fname (make-temp-file "alectryon" nil ".html")) + (args `("-r" "5" "-" ,html-fname))) + (apply #'call-process-region nil nil "rst2html5" nil nil nil args) + (message "Compilation complete") + (browse-url html-fname)))) + +(use-package! ox-context + :after org) (use-package! ox-tufte :after org |