From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [babel] Questions about export and :var. Possible bug. Date: Tue, 01 Jun 2010 16:57:54 -0600 Message-ID: <878w6x1nib.fsf@gmail.com> References: <871vcvso51.wl%n.goaziou@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=47871 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJpYH-0005PV-3I for emacs-orgmode@gnu.org; Wed, 02 Jun 2010 11:08:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJpYC-0002WE-1Z for emacs-orgmode@gnu.org; Wed, 02 Jun 2010 11:08:16 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:38285) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJpYB-0002Vw-U6 for emacs-orgmode@gnu.org; Wed, 02 Jun 2010 11:08:11 -0400 Received: by iwn39 with SMTP id 39so1663396iwn.0 for ; Wed, 02 Jun 2010 08:08:10 -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: Nicolas Goaziou Cc: Org Mode List Hi Nicolas, Thanks for pointing out this error, and for the debugging work. This has been fixed by changing the `org-babel-exp-results' function so that it only prefixes actual references (i.e. not literal values, which is checked using the `org-babel-ref-literal' function). Thanks! -- Eric Nicolas Goaziou writes: > 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 > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode