From ff2304d0d8b1eae53f929142751514c0f14d38d8 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 16 Jul 2023 18:58:20 -0400 Subject: Add support for drawing diagrams in org-mode --- init.el | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 1d22647..40640db 100644 --- a/init.el +++ b/init.el @@ -1143,6 +1143,26 @@ :hook (org-mode . org-fragtog-mode)) +;; --------------------------------- +;; Diagrams +;; -------- +;; Ditaa, GraphViz, and PlantUML +;; --------------------------------- + +;; PlantUML +(use-package plantuml-mode + :straight t + :config + (setq plantuml-executable-path "/usr/bin/plantuml" + org-plantuml-executable-path "/usr/bin/plantuml" + plantuml-default-exec-mode 'executable + org-plantuml-exec-mode 'plantuml)) + +;; Ditaa +(setq org-ditaa-jar-path "/usr/share/ditaa/lib/ditaa.jar" + org-ditaa-jar-option "-oS --svg") + + ;; --------------------------------------------------------------------- @@ -1276,16 +1296,25 @@ (org-babel-do-load-languages 'org-babel-load-languages - '((emacs-lisp . t) - (lisp . t) + '(;; Programming languages (C . t) - (makefile . t) + (emacs-lisp . t) (latex . t) + (lisp . t) + (makefile . t) (python . t) - (racket . t))) + (racket . t) + ;; Diagrams + (ditaa . t) + (dot . t) + (plantuml . t))) +;; Don't ask every time I want to evaluate something (setq org-confirm-babel-evaluate nil) +;; Redisplay inline images after execute code block +(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images) + -- cgit v1.2.3