emacs-orgmode
[Top][All Lists]
Advanced

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

declaring :var in a property drawer


From: Greg Minshall
Subject: declaring :var in a property drawer
Date: Sun, 23 May 2021 17:25:49 +0300

hi.  i noticed the following behavior, and am curious if it is
intentional.

if i declare a :tangle and a :var in a property drawer and then, in that
subtree, have N>1 source blocks (which will all end up in the same
tangled file), the :var'iable will be assigned a value N times.  below i
have an example using bash source blocks, where it doesn't make sense,
afaics(ee).  (when exporting elisp blocks, each :var'iable is assigned a
value in a =let= form that surrounds the code for that block, so i guess
it makes sense.)

cheers, Greg

* :var's and property drawers
    :properties:
    :header-args: :tangle "foo.bar"
    :header-args+: :var x=1
    :end:

#+begin_src bash
  echo x is $x
#+end_src

#+begin_src bash
    echo "'x.*=.*1' occurences:"
    grep 'x.*=.*1' foo.bar | grep -v grep
#+end_src



reply via email to

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