From 92fac88c68eb730ed1ef95efc7fbbb504e5052f1 Mon Sep 17 00:00:00 2001 From: Matt Trzcinski Date: Wed, 28 Aug 2019 19:36:09 -0400 Subject: [PATCH 1/6] Include configuration warning --- README.md | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1586899..c112ad5 100644 --- a/README.md +++ b/README.md @@ -13,21 +13,40 @@ A [PlantUML](http://plantuml.sourceforge.net/) major mode for Emacs. +# Quick Guide + +Install with + + M-x package-install + plantuml-mode + +Preview diagrams with `C-c C-c` (`plantuml-preview`). + +**WARNING:** This may send information to +`"https://www.plantuml.com/plantuml"`! Check that `plantuml-jar-path` +is correct for your use case and that `plantuml-default-exec-mode` is +set to `jar` before previewing any sensitive material. See [Execution modes](# Execution modes) for more information. + +```lisp + (setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar") + (setq plantuml-default-exec-mode 'jar) +``` + # Installation Make sure you have [MELPA](http://melpa.org/) enabled in your ``emacs.d``. Then, you can just - M-x package-install - plantuml-mode + M-x package-install + plantuml-mode Also, to enable preview you need to tell `plantuml-mode` where to locate the PlantUML JAR file. By default it will look for it in `~/plantuml.jar`, but you can specify any location with: - M-x customize-variable - plantuml-jar-path + M-x customize-variable + plantuml-jar-path You can also download the latest version of PlantUML straight into `plantuml-jar-path`: - M-x plantuml-download-jar + M-x plantuml-download-jar # Features @@ -40,8 +59,8 @@ You can also download the latest version of PlantUML straight into `plantuml-jar You can automatically enable `plantuml-mode` for files with extension `.plantuml` by adding the following to your `.emacsrc`: - ;; Enable plantuml-mode for PlantUML files - (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode)) + ;; Enable plantuml-mode for PlantUML files + (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode)) Of course, you can always enable manually the major mode by typing `M-x plantuml-mode` once in the desired PlantUML file buffer. @@ -63,11 +82,11 @@ If you want to force a specific output format, you can customize the variable `p The following shortcuts are enabled by default: - C-c C-c plantuml-preview: renders a PlantUML diagram from the current buffer in the best supported format + C-c C-c plantuml-preview: renders a PlantUML diagram from the current buffer in the best supported format - C-u C-c C-c plantuml-preview in other window + C-u C-c C-c plantuml-preview in other window - C-u C-u C-c C-c plantuml-preview in other frame + C-u C-u C-c C-c plantuml-preview in other frame ## Integration with `org-mode` From 7817db04ce3b77de38ade8ddf2fbb1cd2ca156c3 Mon Sep 17 00:00:00 2001 From: Matt Trzcinski Date: Wed, 28 Aug 2019 19:37:55 -0400 Subject: [PATCH 2/6] Fiddle with the formatting --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c112ad5..bc70e7f 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,14 @@ A [PlantUML](http://plantuml.sourceforge.net/) major mode for Emacs. # Quick Guide -Install with +1. Install with - M-x package-install - plantuml-mode +``` + M-x package-install + plantuml-mode +``` -Preview diagrams with `C-c C-c` (`plantuml-preview`). +2. Preview diagrams with `C-c C-c` (`plantuml-preview`). **WARNING:** This may send information to `"https://www.plantuml.com/plantuml"`! Check that `plantuml-jar-path` From 593962fd73d2c4da4116ef28b8779ce99fc99d95 Mon Sep 17 00:00:00 2001 From: Matt Trzcinski Date: Wed, 28 Aug 2019 19:40:43 -0400 Subject: [PATCH 3/6] Clearer langauge --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bc70e7f..57c46af 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,29 @@ A [PlantUML](http://plantuml.sourceforge.net/) major mode for Emacs. # Quick Guide -1. Install with +1. Install with `M-x package-install` +2. Enable mode for current buffer `M-x plantuml-mode` +3. Write some PlantUML: ``` - M-x package-install - plantuml-mode +@startuml +Alice -> Bob: Authentication Request +Bob --> Alice: Authentication Response + +Alice -> Bob: Another authentication Request +Alice <-- Bob: Another authentication Response +@enduml ``` -2. Preview diagrams with `C-c C-c` (`plantuml-preview`). +4. Preview diagrams with `C-c C-c` (`plantuml-preview`). **WARNING:** This may send information to -`"https://www.plantuml.com/plantuml"`! Check that `plantuml-jar-path` -is correct for your use case and that `plantuml-default-exec-mode` is -set to `jar` before previewing any sensitive material. See [Execution modes](# Execution modes) for more information. +`"https://www.plantuml.com/plantuml"`! + +Check that `plantuml-jar-path` is correct for your use case and that +`plantuml-default-exec-mode` is set to `jar` before previewing any +sensitive material. See [Execution modes](# Execution modes) for more +information. ```lisp (setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar") From 647c2a50228c4c11d8951affef51423de9a4731b Mon Sep 17 00:00:00 2001 From: Matt Trzcinski Date: Wed, 28 Aug 2019 19:41:54 -0400 Subject: [PATCH 4/6] Try to fix internal link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57c46af..418bba7 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Alice <-- Bob: Another authentication Response Check that `plantuml-jar-path` is correct for your use case and that `plantuml-default-exec-mode` is set to `jar` before previewing any -sensitive material. See [Execution modes](# Execution modes) for more +sensitive material. See [Execution modes](#execution-modes) for more information. ```lisp From 8abb3b4a9941474e258b3be19ff2812f32996063 Mon Sep 17 00:00:00 2001 From: Matt Trzcinski Date: Wed, 28 Aug 2019 19:43:25 -0400 Subject: [PATCH 5/6] Move important information to beginning of sentance --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 418bba7..fb37e90 100644 --- a/README.md +++ b/README.md @@ -34,16 +34,17 @@ Alice <-- Bob: Another authentication Response **WARNING:** This may send information to `"https://www.plantuml.com/plantuml"`! -Check that `plantuml-jar-path` is correct for your use case and that -`plantuml-default-exec-mode` is set to `jar` before previewing any -sensitive material. See [Execution modes](#execution-modes) for more -information. +Before previewing any sensitive material, check that +`plantuml-jar-path` is correct for your use case and that +`plantuml-default-exec-mode` is set to `jar`. ```lisp (setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar") (setq plantuml-default-exec-mode 'jar) ``` +See [Execution modes](#execution-modes) for more information. + # Installation Make sure you have [MELPA](http://melpa.org/) enabled in your ``emacs.d``. Then, you can just From a8a0eb3972abe28ba0e63b7ecbaf59079ae374f7 Mon Sep 17 00:00:00 2001 From: Matt Trzcinski Date: Thu, 5 Sep 2019 15:11:16 -0400 Subject: [PATCH 6/6] Make mention of alternative exec modes --- README.md | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index fb37e90..051c06f 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,18 @@ Alice <-- Bob: Another authentication Response 4. Preview diagrams with `C-c C-c` (`plantuml-preview`). **WARNING:** This may send information to -`"https://www.plantuml.com/plantuml"`! - -Before previewing any sensitive material, check that -`plantuml-jar-path` is correct for your use case and that -`plantuml-default-exec-mode` is set to `jar`. +`"https://www.plantuml.com/plantuml"`! Check that +`plantuml-default-exec-mode` is configured correctly for your use case +before previewing any sensitive material. ```lisp - (setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar") - (setq plantuml-default-exec-mode 'jar) + ;; Sample jar configuration + (setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar") + (setq plantuml-default-exec-mode 'jar) + + ;; Sample executable configuration + (setq plantuml-executable-path "/path/to/your/copy/of/plantuml.bin") + (setq plantuml-default-exec-mode 'executable) ``` See [Execution modes](#execution-modes) for more information. @@ -49,17 +52,17 @@ See [Execution modes](#execution-modes) for more information. Make sure you have [MELPA](http://melpa.org/) enabled in your ``emacs.d``. Then, you can just - M-x package-install - plantuml-mode + M-x package-install + plantuml-mode Also, to enable preview you need to tell `plantuml-mode` where to locate the PlantUML JAR file. By default it will look for it in `~/plantuml.jar`, but you can specify any location with: - M-x customize-variable - plantuml-jar-path + M-x customize-variable + plantuml-jar-path You can also download the latest version of PlantUML straight into `plantuml-jar-path`: - M-x plantuml-download-jar + M-x plantuml-download-jar # Features @@ -72,8 +75,8 @@ You can also download the latest version of PlantUML straight into `plantuml-jar You can automatically enable `plantuml-mode` for files with extension `.plantuml` by adding the following to your `.emacsrc`: - ;; Enable plantuml-mode for PlantUML files - (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode)) + ;; Enable plantuml-mode for PlantUML files + (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode)) Of course, you can always enable manually the major mode by typing `M-x plantuml-mode` once in the desired PlantUML file buffer. @@ -95,11 +98,11 @@ If you want to force a specific output format, you can customize the variable `p The following shortcuts are enabled by default: - C-c C-c plantuml-preview: renders a PlantUML diagram from the current buffer in the best supported format + C-c C-c plantuml-preview: renders a PlantUML diagram from the current buffer in the best supported format - C-u C-c C-c plantuml-preview in other window + C-u C-c C-c plantuml-preview in other window - C-u C-u C-c C-c plantuml-preview in other frame + C-u C-u C-c C-c plantuml-preview in other frame ## Integration with `org-mode`