The Org manual says:
C-c ' for editing the current code block. It opens a new major-mode edit buffer containing the body of the ‘src’ code block, ready for any edits.
This feature is sweet.
However, since only the current code block is edited, previous code blocks in the same session/tangle are not evaluated. Hence, imports and variables are missing and produce errors in e.g. flycheck.
Code completion does not work. Is there a way to change this? For example, include all code in the edit buffer?
For example:
#+BEGIN_SRC ipython +n :session :tangel yes :results output
previously_defined_axes.plot(previously_defined_list)
os.li<TAB>
This produces error messages because of undefined names previously_defined_axes
and previously_defined_list
, although they were defined in the previous code block.
Also, os
is not treated as imported and tab completion fails.
Any ideas how to circumvent this?