3

I'm doing literate programming with Python. In my workflow I like to test the block with python-shell-send-buffer and ipdb debugger. However if the block contains a noweb reference then the code is not expanded when sent to the shell and causes syntax error.

Alternatively I can C-c C-c C-v (org-babel-expand-src-block) and get a read-only version of the buffer with noweb expanded and send this instead. This is not great for interactive work though.

Can I cause python-shell-send-buffer to call org-babel-expand-src-block beforehand, and maintain the noweb references in the C-c ' edit buffer?

  • 1
    It sounds like you've hit a bug. What version of emacs & org-mode are you using? – Melioratus Dec 18 '16 at 1:34
  • 1
    Windows (i686-pc-mingw32) spacemacs develop distribution. Emacs version 24.5.1, org-mode 8.3.5. As a note, imports/etc.. are correctly carried over into pylint evaluation of C-c ' buffer (though anaconda S-k documentation check doesn't work, but that's another issue). – Eric Kaschalk Dec 18 '16 at 1:39
  • Did you figure out a workaround or a fix? – Melioratus Jan 22 '18 at 17:23

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.