* org-babel-execute: being exported
@ 2015-03-02 6:34 Jarmo Hurri
2015-03-02 12:25 ` Aaron Ecay
0 siblings, 1 reply; 3+ messages in thread
From: Jarmo Hurri @ 2015-03-02 6:34 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-babel-execute: being exported
2015-03-02 6:34 org-babel-execute: being exported Jarmo Hurri
@ 2015-03-02 12:25 ` Aaron Ecay
2015-03-03 10:36 ` Jarmo Hurri
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Ecay @ 2015-03-02 12:25 UTC (permalink / raw)
To: Jarmo Hurri, emacs-orgmode
Hi Jarmo,
2015ko martxoak 2an, Jarmo Hurri-ek idatzi zuen:
[...]
> 1. How can I identify, in org-babel-execute:processing, if the code is
> executed for export or for some other reason?
I think the test (not (null org-babel-exp-reference-buffer)) should thee
you when you’re being called as part of export.
--
Aaron Ecay
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-babel-execute: being exported
2015-03-02 12:25 ` Aaron Ecay
@ 2015-03-03 10:36 ` Jarmo Hurri
0 siblings, 0 replies; 3+ messages in thread
From: Jarmo Hurri @ 2015-03-03 10:36 UTC (permalink / raw)
To: emacs-orgmode
Aaron Ecay <aaronecay@gmail.com> writes:
> Hi Jarmo,
>
> 2015ko martxoak 2an, Jarmo Hurri-ek idatzi zuen:
>
> [...]
>
>> 1. How can I identify, in org-babel-execute:processing, if the code is
>> executed for export or for some other reason?
>
> I think the test (not (null org-babel-exp-reference-buffer)) should thee
> you when you’re being called as part of export.
Seems to work, thanks!
Jarmo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-03 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 6:34 org-babel-execute: being exported Jarmo Hurri
2015-03-02 12:25 ` Aaron Ecay
2015-03-03 10:36 ` Jarmo Hurri
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).