From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: org-babel-execute: being exported Date: Mon, 02 Mar 2015 08:34:47 +0200 Message-ID: <87vbijykjc.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSJwT-0004Bb-G6 for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 01:35:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSJwQ-0007hi-Br for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 01:35:01 -0500 Received: from plane.gmane.org ([80.91.229.3]:49420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSJwQ-0007hS-4a for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 01:34:58 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YSJwN-0000qt-SY for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 07:34:55 +0100 Received: from host-137-163-18-130.edu.hel.fi ([137.163.18.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Mar 2015 07:34:55 +0100 Received: from jarmo.hurri by host-137-163-18-130.edu.hel.fi with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Mar 2015 07:34:55 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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