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():

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

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.