[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-babel-execute: being exported
From: |
Jarmo Hurri |
Subject: |
[O] org-babel-execute: being exported |
Date: |
Mon, 02 Mar 2015 08:34:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Greetings.
I have now partially implemented support for the Processing programming
language in Babel. In particular, in my working branch Babel now
recognizes Processing blocks, and shows the resulting sketch in an
external viewer when the block is executed.
The second part is HTML export. When the results are exported as HTML,
the Processing code will be embedded in HTML using processing.js
module. The browser then draws the sketch when the HTML is viewed. So
although technically the code is exported, in reality the results (the
sketch) are exported.
For the HTML export to work as described above, in the Org file one must
have ":exports results". The Processing code will thus be executed for
the results to be available for exporting. But as described above, I
want code execution to show the sketch when not exporting. So it seems
to me that function org-babel-execute:processing should work differently
during HTML export (produces a file with embedded Processing code) and
for example when the code is evaluated using C-c C-c (shows the sketch
in an external viewer).
Which brings me to my questions.
1. How can I identify, in org-babel-execute:processing, if the code is
executed for export or for some other reason?
2. Or do I need to navigate through this problem via another route: for
example, tie sketch viewing to another function/key sequence? In this
case evaluation of the code would _always_ produce the code embedded
in HTML.
Jarmo
- [O] org-babel-execute: being exported,
Jarmo Hurri <=