* [babel] Questions about export and :var. Possible bug.
@ 2010-05-28 21:38 Nicolas Goaziou
2010-06-01 22:57 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Goaziou @ 2010-05-28 21:38 UTC (permalink / raw
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [babel] Questions about export and :var. Possible bug.
2010-05-28 21:38 [babel] Questions about export and :var. Possible bug Nicolas Goaziou
@ 2010-06-01 22:57 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2010-06-01 22:57 UTC (permalink / raw
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 <n.goaziou@gmail.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-02 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 21:38 [babel] Questions about export and :var. Possible bug Nicolas Goaziou
2010-06-01 22:57 ` Eric Schulte
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.