emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: org-babel-execute: being exported
Date: Mon, 02 Mar 2015 08:34:47 +0200	[thread overview]
Message-ID: <87vbijykjc.fsf@iki.fi> (raw)


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

             reply	other threads:[~2015-03-02  6:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02  6:34 Jarmo Hurri [this message]
2015-03-02 12:25 ` org-babel-execute: being exported Aaron Ecay
2015-03-03 10:36   ` Jarmo Hurri

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=87vbijykjc.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).