From: Brad Knotwell <bknotwell@yahoo.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: java source block snippets
Date: Thu, 20 Dec 2018 08:02:25 +0000 (UTC) [thread overview]
Message-ID: <1333119044.599677.1545292945934@mail.yahoo.com> (raw)
In-Reply-To: 1333119044.599677.1545292945934.ref@mail.yahoo.com
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
Hello all--
I was trying to do a java source block and I got hello world working trivially. I then tried to move forward but I can't figure out how to get a java source block to accept input from org.
The following worked fine in C and allowed me to test the performance of a sha1 hash implementation:
#+BEGIN_SRC C :var indata=cleandata :exports both :results output :tangle t.c :includes '("<stdio.h>" "<string.h>" "<unistd.h>" "<sys/time.h>" "<openssl/ssl.h>" "<openssl/sha.h>") :libs -L /usr/local/Cellar/openssl/1.0.2q/lib -lcrypto
while I know the compilation method's nowhere near the same, I would've expected something like the following to work:
#+BEGIN_SRC java :results output :export both :var indata=cleandata :var x="hi" :tangle t.java
Looking at the tangled file, it's clear the :var header arguments are ignored. Since I have the data in an appendix, I can write some code to put cleandata in a file and read it directly but I was hoping there was a more consistent babel way to handle it.
Thx.
--Brad
[-- Attachment #2: Type: text/html, Size: 1766 bytes --]
parent reply other threads:[~2018-12-20 8:02 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1333119044.599677.1545292945934.ref@mail.yahoo.com>]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333119044.599677.1545292945934@mail.yahoo.com \
--to=bknotwell@yahoo.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.