emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org b5f0efc049: ob-plantuml: Allow setting PlantUML arg


From: ELPA Syncer
Subject: [elpa] externals/org b5f0efc049: ob-plantuml: Allow setting PlantUML args for jar file
Date: Sun, 8 May 2022 02:58:06 -0400 (EDT)

branch: externals/org
commit b5f0efc0491c0c1b354ca2b8686e2f5aa8e6ee11
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    ob-plantuml: Allow setting PlantUML args for jar file
    
    * lisp/ob-plantuml.el (org-plantuml-args): Rename
    `org-plantuml-executable-args' to `org-plantuml-args'.
    (org-babel-execute:plantuml): Use `org-plantuml-args' when calling
    jar.
    * lisp/org-compat.el (org-plantuml-executable-args): Obsolete old
    variable name.
    * etc/ORG-NEWS (=org-plantump-executable-args= is renamed and applies
    to jar as well): Document change.
    
    See the discussion in 
https://list.orgmode.org/orgmode/87y23hr045.fsf@localhost/
---
 etc/ORG-NEWS        |  5 +++++
 lisp/ob-plantuml.el | 14 +++++++-------
 lisp/org-compat.el  |  2 ++
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 1e8558c7b8..27de6da624 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -224,6 +224,11 @@ files that are exported to Texinfo.
 
 =org-at-heading-p= now returns t by default on headings inside folds.
 Passing optional argument will produce the old behaviour.
+** Removed or renamed functions and variables
+*** =org-plantump-executable-args= is renamed and applies to jar as well
+
+The new variable name is =org-plantuml-args=.  It now applies to both
+jar PlantUML file and executable.
 
 ** Miscellaneous
 
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index d237b0fe3d..6e1b1b1710 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -65,8 +65,8 @@ You can also configure extra arguments via 
`org-plantuml-executable-args'."
   :package-version '(Org . "9.4")
   :type 'string)
 
-(defcustom org-plantuml-executable-args (list "-headless")
-  "The arguments passed to plantuml executable when executing PlantUML."
+(defcustom org-plantuml-args (list "-headless")
+  "The arguments passed to plantuml when executing PlantUML."
   :group 'org-babel
   :package-version '(Org . "9.4")
   :type '(repeat string))
@@ -116,15 +116,15 @@ This function is called by `org-babel-execute-src-block'."
         (java (or (cdr (assq :java params)) ""))
         (executable (cond ((eq org-plantuml-exec-mode 'plantuml) 
org-plantuml-executable-path)
                           (t "java")))
-        (executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) 
org-plantuml-executable-args)
+        (executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) 
org-plantuml-args)
                                ((string= "" org-plantuml-jar-path)
                                 (error "`org-plantuml-jar-path' is not set"))
                                ((not (file-exists-p org-plantuml-jar-path))
                                 (error "Could not find plantuml.jar at %s" 
org-plantuml-jar-path))
-                               (t (list java
-                                        "-Djava.awt.headless=true"
-                                        "-jar"
-                                        (shell-quote-argument 
(expand-file-name org-plantuml-jar-path))))))
+                               (t `(,java
+                                    "-jar"
+                                    ,(shell-quote-argument (expand-file-name 
org-plantuml-jar-path))
+                                     ,@org-plantuml-args))))
         (full-body (org-babel-plantuml-make-body body params))
         (cmd (mapconcat #'identity
                         (append
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index f599e246e4..a29f206a4b 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -471,6 +471,8 @@ Counting starts at 1."
 (define-obsolete-variable-alias 'org-reveal-start-hook
   'org-fold-reveal-start-hook "9.6")
 (define-obsolete-function-alias 'org-file-url-p 'org-url-p "9.6")
+(define-obsolete-variable-alias 'org-plantuml-executable-args 
'org-plantuml-args
+  "Org 9.6")
 (defun org-in-fixed-width-region-p ()
   "Non-nil if point in a fixed-width region."
   (save-match-data



reply via email to

[Prev in Thread] Current Thread [Next in Thread]