Sometime since Org version 8.3beta and now, the way Org Babel resolves the value of the `:var` header argument when assigned to a reference has changed.
Previously, the following would work when exporting: --8<---------------cut here---------------start------------->8--- * test #+BEGIN_SRC R :var dat=table-data print(summary(dat)); #+END_SRC ** COMMENT #+TBLNAME: table-data | number | measurement | |--------+-------------| | 1 | 10 | --8<---------------cut here---------------end--------------->8--- The above /still/ works when manually evaluating the block (C-c C-c whil in the block), but when exporting, the following error is thrown: `org-babel-ref-resolve: Reference `table-data' not found in this buffer` Curiously, the following tweak works for both manual evaluation and for exporting and produces the same results that the above file used to produce: --8<---------------cut here---------------start------------->8--- #+OPTIONS: inline:nil * test #+BEGIN_SRC R :var dat=table-data print(summary(dat)); #+END_SRC *************** test #+TBLNAME: table-data | number | measurement | |--------+-------------| | 1 | 10 | *************** END --8<---------------cut here---------------end--------------->8--- This seems to be a bug, but perhaps there is a reason for this new behaviour? Thank you in advance for any insights.