4

I practice python literate programming with tangling to generate a full project structure. There are dependencies between modules and packages, and so I will say in the C-c ':

#+begin_src python tangle: "src/foo/bar.py"
  def do_stuff():
      pass
#+end_src

#+begin_src python tangle: "src/foo/baz.py"
  from foo.bar import do_stuff
#+end_src

And so the project structure looks like this (omitting init.py):

  • project.org

    • src

      • foo

        • bar.py

        • baz.py

But the C-c ' edit buffer is in the same directory as project.org so anaconda-mode won't recognize the import statement. All code is run from the tangled source rather than within the project.org buffer.

I have the tangle file names and dirs as elisp variables. It would be nice if I could have anaconda completion on project source code.

Can I point anaconda-mode to look from within the tangle, ie. source code file path?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.