7

When playing with the literate aspects of Org-mode I found a description here of how you can set up a var property of a node and how this would then be inherited by enclosed code blocks as a variable binding. So you could do something like:

* Some node
  :PROPERTIES:
  :var:      x=123
  ...
  :END:

And this would be equivalent to something like:

#+BEGIN_SRC emacs-lisp :var x=123
  ...
#+END_SRC

Unfortunately, this doesn't seem to be the case in my Org mode, as I'm getting eval: Symbol’s value as variable is void: x when trying to execute the code block. I'm using Org-mode version 9.0.7 from Elpa. I've tried looking at variable org-use-property-inheritance, but was unable to get this to work. Any hints or ideas will be much appreciated.

8

You are using Org Mode 9. In contrast to Org Mode 8, you now have to specify header arguments within a header argument property:

* Some node
  :PROPERTIES:
  :header-args: :var x=123
  :END:

You can check out the documentation here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.