From 60a96fdc82efe186c243e14ec46454e12491df04 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 20 Sep 2016 01:44:50 -0700 Subject: [PATCH] [Emacs] Add linux support for puml-mode --- dotfiles/emacs.d/README.org | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index c2ce1e3f..8d64c4fb 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2949,14 +2949,18 @@ This mode seems to be better maintained than plantuml-mode :mode ("\\.puml\\'" "\\.plantuml\\'") :preface (progn - (if (equal system-type 'darwin) - (let* ((plantuml-dir - (s-trim (shell-command-to-string "brew --prefix plantuml"))) - (filename - (--first (s-ends-with? ".jar" it) (directory-files plantuml-dir))) - (filepath (imalison:join-paths plantuml-dir filename))) - (setq puml-plantuml-jar-path filepath - org-plantuml-jar-path filepath))) + (cond ((equal system-type 'darwin) + (let* ((plantuml-dir + (s-trim (shell-command-to-string "brew --prefix plantuml"))) + (filename + (--first (s-ends-with? ".jar" it) (directory-files plantuml-dir))) + (filepath (imalison:join-paths plantuml-dir filename))) + (setq puml-plantuml-jar-path filepath + org-plantuml-jar-path filepath))) + ((equal system-type 'gnu/linux) + (let ((filepath "/opt/plantuml/plantuml.jar")) + (setq puml-plantuml-jar-path filepath + org-plantuml-jar-path filepath)))) (add-to-list 'org-src-lang-modes '("plantuml" . puml)))) #+END_SRC