emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lin


From: Sebastien Vauban
Subject: Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines
Date: Sat, 22 Oct 2011 09:08:13 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (windows-nt)

Hi Darlan,

Darlan Cavalcante Moreira wrote:
> It's excellent that now babel understands multiple values in the "var"
> property (I was one of the people that wanted this), but "There Is One More
> Thing".
>
> Would it be feasible to inherit variables from parent sub-trees?
> Effectively, I'd like to append new values in lower level sub-trees, but
> AFAIK setting the var property in a sub-tree will still replace the value
> set in the parent sub-tree.

#+PROPERTY:  var foo="level0"

* Overview

Global vars and local-to-this-subtree vars seem correctly handled.

Effectively, vars set in higher level trees are not passed correctly to the
code block.

* Test code
  :PROPERTIES:
  :var:      bar="level1"
  :END:

** Using the different vars
   :PROPERTIES:
   :var:      baz="level2"
   :END:

#+srcname: test
#+begin_src sh :var foo="valueforthiscodeblock"
echo $foo
echo $bar
echo $baz
#+end_src

#+results: test
| valueforthiscodeblock |
|                       |
| level2                |

As you can see, the "bar" variable is unknown to the code block.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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