Hello,

I'd like to add :var support to ob-screen. The following returns nothing:

#+begin_src screen :var foo="bar"
echo ${foo}
#+end_src

I've added support for a screen-specific header arg before (:screenrc), but 
this feels different, because :var is generic across babel.

I've looked briefly in ob-core and not seen anything there. I've looked at the 
CHANGELOG and see that ob-calc recently added support for :var, but could not 
find that commit which I assumed might teach me how to add this feature for 
ob-screen. The ORG-NEWS commit is different than the code commit, and searching 
git for ob-calc file changes or changelog messages didn't seem to find it for 
me.

I have a temporary work-around: I can inject properties

#+begin_src screen :var foo="bar"
foo="<<get_property("foo")>>"
echo ${foo} # this works
#+end_src

Where get_property is a library of babel block:

#+NAME: get_property
#+BEGIN_SRC emacs-lisp :var prop_name="" :results silent
(org-with-point-at org-babel-current-src-block-location
  (org-entry-get nil prop_name t))
#+END_SRC

But I'd like to work with header args so that I can do this:

#+name: SCREEN_TEST
#+begin_src screen :var foo="bar"
echo ${foo}
#+end_src

#+CALL: SCREEN_TEST(foo="test")

Or better yet,

#+begin_src screen :var foo="bar"
<<SCREEN_TEST(foo="test)>>
#+end_src

Best,

  -k.


Reply via email to