From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Re: Babel questions for finalising Processing support Date: Sat, 07 Mar 2015 20:00:52 +0200 Message-ID: <87ioecznzf.fsf@iki.fi> References: <87vbiee7wo.fsf@iki.fi> <87sidgn9u1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUJ28-00054h-PC for emacs-orgmode@gnu.org; Sat, 07 Mar 2015 13:01:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUJ25-0005kQ-JR for emacs-orgmode@gnu.org; Sat, 07 Mar 2015 13:01:04 -0500 Received: from plane.gmane.org ([80.91.229.3]:56079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUJ25-0005kG-CH for emacs-orgmode@gnu.org; Sat, 07 Mar 2015 13:01:01 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YUJ23-0003QD-EO for emacs-orgmode@gnu.org; Sat, 07 Mar 2015 19:00:59 +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 ; Sat, 07 Mar 2015 19:00:59 +0100 Received: from jarmo.hurri by 62-78-164-169.bb.dnainternet.fi with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Mar 2015 19:00:59 +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 Aaron Ecay writes: >> 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? > > This looks bogus. The defvar for org-babel-temporary-directory is not > evaluated when noninteractive is true. I think the defvar should be > unconditional, but I also don’t understand why the code is like that in > the first place, so let’s see if someone knows why before changing it. Ok. On hold. >> 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? > > Are you not doing (require 'processing-mode)? If you do that, I don’t > understand why the declare-function is also needed. I am trying to be unselfish. :-) I have processing-mode.el in my system, but an average org mode user, who will byte compile org, will not have processing-mode.el in their system. A require would result in an error for this average user during the byte compilation of org. I can program, but I am no elisp expert, so this is just my understanding. Should I do something like: (if (null (require 'processing-mode nil :noerror)) (declare-function processing-sketch-run "processing-mode.el" nil)) >> 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.) > > Why not? It sounds like their code is causing the problem. Ahem. After some greps I found out today that I had myself specified a java hook which the processing hook inherited, and the reference to buffer-file-name was there. Issue solved. Jarmo