1

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?

  • after some further research I found this and this question which is about the same topic. Lentic is suggested, the question is not resolved, though, because it does not do what is expeced. – kuzcoTheGreat Sep 6 '18 at 14:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.