aboutsummaryrefslogtreecommitdiffstats
path: root/doom
diff options
context:
space:
mode:
Diffstat (limited to 'doom')
-rw-r--r--doom/config.org14
-rw-r--r--doom/packages.el2
2 files changed, 15 insertions, 1 deletions
diff --git a/doom/config.org b/doom/config.org
index 3ebd1e0..b35d7fd 100644
--- a/doom/config.org
+++ b/doom/config.org
@@ -1017,7 +1017,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
diff --git a/doom/packages.el b/doom/packages.el
index 6b5f23c..9089104 100644
--- a/doom/packages.el
+++ b/doom/packages.el
@@ -8,6 +8,8 @@
(package! ox-gfm)
(package! ox-tufte
:recipe (:host nil :repo "https://git.sr.ht/~ymherklotz/ox-tufte"))
+(package! ox-context
+ :recipe (:host github :repo "Jason-S-Ross/ox-context"))
(package! org-transclusion
:recipe (:host github :repo "nobiot/org-transclusion"))
(package! org-zettelkasten