emacs-orgmode
[Top][All Lists]
Advanced

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

header-args property


From: Michael Gauland
Subject: header-args property
Date: Thu, 1 Apr 2021 21:23:05 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

I'm confused about the use of the header-args property. It works as
expected when I
export a file, but not when I evaluate a code block manually. For example,
consider this file:

    #+PROPERTY: header-args :var x="Hello" :exports both

    #+begin_src shell
      echo X is $x
    #+end_src

When I export, the result of the code block is "X is Hello", but when I
use C-c
C-c to evaluate the block in emacs, I get "X is"--the variable isn't
defined.

In practice, this means I generally define things like :session for each
block,
rather than using a file-level property. Is this behaviour expected? 

Kind regards,

Mike




reply via email to

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