aboutsummaryrefslogtreecommitdiffstats
path: root/doom
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-04-19 11:17:47 +0100
committerYann Herklotz <git@yannherklotz.com>2022-04-19 11:17:47 +0100
commitd066b6c848a48cb3cd6ac1562eb840c4a10101e0 (patch)
treea891a0135a27224b76480396de5e45280726c4b1 /doom
parent873a1990618334dd4a7aa8a93ebaecd95d71eab8 (diff)
downloaddotfiles-d066b6c848a48cb3cd6ac1562eb840c4a10101e0.tar.gz
dotfiles-d066b6c848a48cb3cd6ac1562eb840c4a10101e0.zip
Add alectryon config
Diffstat (limited to 'doom')
-rw-r--r--doom/config.org14
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