From 243223d73afba5242220bcc8e37d98dece2b7742 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 9 Oct 2016 23:02:10 -0700 Subject: [PATCH] [Emacs] Handle plantuml not present in macOS --- dotfiles/emacs.d/README.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 03f9b50b..48a8f5dc 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3105,8 +3105,10 @@ This mode seems to be better maintained than plantuml-mode (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))) + (when (file-exists-p plantuml-dir) + (--first (s-ends-with? ".jar" it) (directory-files plantuml-dir)))) + (filepath (when filename + (imalison:join-paths plantuml-dir filename)))) (setq puml-plantuml-jar-path filepath org-plantuml-jar-path filepath))) ((equal system-type 'gnu/linux)