From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Babel questions for finalising Processing support Date: Fri, 06 Mar 2015 12:29:11 +0200 Message-ID: <87vbiee7wo.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTpVb-0005aM-KW for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 05:29:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTpVW-0007ne-Gx for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 05:29:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:35222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTpVW-0007nM-9R for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 05:29:26 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YTpVT-0008LB-Nk for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 11:29:23 +0100 Received: from 62-78-164-169.bb.dnainternet.fi ([62.78.164.169]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2015 11:29:23 +0100 Received: from jarmo.hurri by 62-78-164-169.bb.dnainternet.fi with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2015 11:29:23 +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. My implementation of Processing support in Babel is proceeding really well! I have now both external viewing of sketches and export to html (sketches drawn by browser) working. There are a number of details to fix, though. 1. When editing Processing code with C-c ' I get an error from processing-mode. Editing with C-c ' works just fine, but the error is annoying. It seems to me the error is caused by the fact that processing-mode refers to buffer-file-name, which is not valid in a temporary buffer. Any ideas on how to fix this inside org? (Wouldn't want to get involved with processing-mode if it can be avoided.) Is there for example a hook I could use to set buffer-file-name to some temporary value? 2. When processing code is executed with C-c C-c, it shows the sketch in an external viewer. When exported, the results are html code. To this end I have set default header arguments for Processing to be ":results html" and ":exports results". With C-c C-c execution, org-babel-execute:processing returns nil. This works fine otherwise, but even C-c C-c execution produces an empty results section: #+RESULTS: #+BEGIN_HTML #+END_HTML This is a nuisance, since C-c C-c execution always also changes the current file (even though nothing changes). Is there a way to avoid this? 3. In ob-processing.el I (require 'ob). However, to avoid a compiler warning about a free variable I still need to declare (eval-when-compile (defvar org-babel-temporary-directory)) Is this ok? 4. Processing support in Babel will depend on processing2-emacs module, which contains the function processing-sketch-run. Again, to avoid compiler warnings, I am declaring this by (declare-function processing-sketch-run "processing-mode.el" nil) Is this ok? Jarmo