From bbc3f977d6b98240834af8fb009a2a080813f30b Mon Sep 17 00:00:00 2001 From: Jarmo Hurri Date: Wed, 6 Nov 2019 12:21:16 +0200 Subject: [PATCH] ob-java.el: Add header argument to pass command line args. * lisp/ob-java.el (org-babel-execute:java): Handle new header argument `:cmdargs` and pass its value as the last element in call to java. --- lisp/ob-java.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-java.el b/lisp/ob-java.el index b055f85e5..80308ec32 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -58,6 +58,7 @@ parameters may be used, like javac -verbose" (src-file (concat classname ".java")) (cmpflag (or (cdr (assq :cmpflag params)) "")) (cmdline (or (cdr (assq :cmdline params)) "")) + (cmdargs (or (cdr (assq :cmdargs params)) "")) (full-body (org-babel-expand-body:generic body params))) (with-temp-file src-file (insert full-body)) (org-babel-eval @@ -66,7 +67,7 @@ parameters may be used, like javac -verbose" (unless (or (not packagename) (file-exists-p packagename)) (make-directory packagename 'parents)) (let ((results (org-babel-eval (concat org-babel-java-command - " " cmdline " " classname) ""))) + " " cmdline " " classname " " cmdargs) ""))) (org-babel-reassemble-table (org-babel-result-cond (cdr (assq :result-params params)) (org-babel-read results) -- 2.21.0