From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [babel] Questions about export and :var. Possible bug. Date: Fri, 28 May 2010 23:38:18 +0200 Message-ID: <871vcvso51.wl%n.goaziou@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=42440 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI7Fx-0000O7-O2 for emacs-orgmode@gnu.org; Fri, 28 May 2010 17:38:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI7Fw-0007Ih-Gu for emacs-orgmode@gnu.org; Fri, 28 May 2010 17:38:17 -0400 Received: from mail-wy0-f180.google.com ([74.125.82.180]:59649) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI7Fw-0007IV-Ct for emacs-orgmode@gnu.org; Fri, 28 May 2010 17:38:16 -0400 Received: by wyb42 with SMTP id 42so115221wyb.39 for ; Fri, 28 May 2010 14:38:14 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List Hello. I tried to export something like this (git head) : #+begin_src R :var num=3 :exports results runif(n=num, min=0, max=1) #+end_src While it is fine when run with C-c C-c, I get the following error when trying to export the file : progn: reference '3' not found in this buffer So I investigated a bit and found something odd : - `org-babel-exp-results' adds `org-current-export-file' to any assignment, even if num=/path/to/file/exported:3 doesn't make sense; - `org-babel-resolve-reference' doesn't filter out bad references like this and throws the error above. So my questions are : - do we really need the "reference '%s' not found in this buffer" error, as it only means %s was a literal value ? - or is it better to modify org-babel-exp-results to check the sanity of the references it creates so that it doesn't add that reference to the original file ? - Nicolas