emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* declaring :var in a property drawer
@ 2021-05-23 14:25 Greg Minshall
  2021-05-24  8:57 ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Minshall @ 2021-05-23 14:25 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-24  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 14:25 declaring :var in a property drawer Greg Minshall
2021-05-24  8:57 ` Eric S Fraga
2021-05-24  9:22   ` Greg Minshall

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).