From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: [PATCH] ob-java.el: Add header argument to pass command line args
Date: Wed, 06 Nov 2019 12:29:57 +0200 [thread overview]
Message-ID: <8736f18fh6.fsf@iki.fi> (raw)
[-- Attachment #1: Type: text/plain, Size: 22 bytes --]
... attached
Jarmo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 1497 bytes --]
From bbc3f977d6b98240834af8fb009a2a080813f30b Mon Sep 17 00:00:00 2001
From: Jarmo Hurri <jarmo.hurri@iki.fi>
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
next reply other threads:[~2019-11-06 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 10:29 Jarmo Hurri [this message]
2019-11-22 5:12 ` [PATCH] ob-java.el: Add header argument to pass command line args Jarmo Hurri
2019-11-24 9:14 ` Nicolas Goaziou
2019-12-01 10:33 ` Jarmo Hurri
2019-12-27 8:00 ` Jarmo Hurri
2019-12-27 8:58 ` Nicolas Goaziou
2020-02-12 11:54 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736f18fh6.fsf@iki.fi \
--to=jarmo.hurri@iki.fi \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).