emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org Babel resolution of `:var` value reference inconsistent


From: Andreas Leha
Subject: Re: [O] Org Babel resolution of `:var` value reference inconsistent
Date: Mon, 02 Nov 2015 09:01:21 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

Hi myq,

myq <address@hidden> writes:
> 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:
>
> * test
>
> #+BEGIN_SRC R :var dat=table-data
>   print(summary(dat));
> #+END_SRC
>
> ** COMMENT
>
> #+TBLNAME: table-data
> | number | measurement |
> |--------+-------------|
> | 1      | 10          |
>
>
> 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:
>
> #+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
>
> This seems to be a bug, but perhaps there is a reason for this new
> behaviour?
>
> Thank you in advance for any insights.

There are two ways to exclude subtrees from export: the COMMENT keyword
and the :noexport: tag.  I think what you want to use here is the
:noexport: tag.

Here is the difference:

- COMMENTing a subtree is meant to be (roughly?) the same as putting '# '
  at the beginning of all the lines from that region.

- The :noexport: tag will simply skip the region from export.

So, to me it is more surprising that the manual execution works.  For
instance, I might have two tables with the same name.  Then, COMMENTing
one of them should ensure that the other one is used.

HTH,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]