Greg Minshall <minsh...@umich.edu> writes:

>> This is because Org mode currently cannot distinguish between babel
>> backends that simply do not support variable assignments and babel
>> backends that are not loaded.
>
> currently, is it possible to see well enough what is going on to
> generate an error and abort the tangle?
>
> (off the top of my head i would think a `:var` in either of the
> situations you describe might be described as an error -- albeit a user
> error.)

Not necessarily.

Consider something like


#+property: header-args :var common_variable = "foo"

#+begin_src elisp
(message "variable is %S" common_variable)
#+end_src

#+RESULTS:
: variable is "foo"

#+begin_src python :result value
return f"variable is \"{common_variable}\""
#+end_src

#+RESULTS:
: variable is "foo"

Below, ob-dot does not implement variable assignments.
Throwing an error here would be unexpected.

#+begin_src dot :file foo.png
digraph G {
a -> b
}
#+end_src

#+RESULTS:
[[attachment:foo.png]]

We may, theoretically, only throw an error when the variable assignments
are not inherited, but that will create even more confusion - sometimes,
the error will be thrown, and sometimes not.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to