Emacs C-c C-c For Python Code
Solution 1:
The error shown results from a bug in python-mode.el, which is fixed in trunk. AFAIK the bug only occurs when executing a non-saved buffer, so saving the buffer first makes C-c C-c work.
BTW py-execute-region RET is C-c |, while C-c C-c will always send the whole buffer, regardless of an existing region. If C-c C-c should honor a region, that might be worth a feature request. If interested, please file it here:
https://bugs.launchpad.net/python-mode
Still a personal view: marking a region as such is a costly--e.g. a laborious thing, as it requires some attention defining the borders right, which is spent better at the issue at stake itself. Python-mode will take a lot of this work from you by offering a couple of commands what-to-execute. Maybe have a look into the menu "Python", see section "Execute..." and button "More...". In a similar way a couple of other edits should be made easier.
Post a Comment for "Emacs C-c C-c For Python Code"