I'm playing with the idea of "literate devops" with org-mode. To simplify scripts i've extracted common values into :PROPERTIES: drawer, which looks like this:

* Scripts
** Subscripts-A
*** Subscrtips-B
:header-args: :dir ./folder
:header-args: :results output
:header-args: :var NAME='Alex'

echo "NAME:" $NAME

The snippet above produces the following output:

: /Users/4lex1v/folder

So ':var' arguments are ignored, while :dir and :results are fine, am i doing something wrong?


If you want to add to the value of an existing property, append a ‘+’ to the property name.

(info "(org) Property syntax")

That means your property drawer should be

:header-args: :dir ./folder
:header-args+: :results output
:header-args+: :var NAME='Alex'
  • Oh, i've tried this, but added + to :var, works now. Thanks
    – 4lex1v
    Apr 12 '17 at 17:59
  • Is there anyway to make that automatic? i.e merge these properties without using +?
    – 4lex1v
    Apr 12 '17 at 18:00
  • You could put them in one line if that's an option: :header-args: :dir ./folder :results output.
    – mutbuerger
    Apr 12 '17 at 18:18

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.