(I now submitted this as an issue in GitHub: https://github.com/jorgenschaefer/elpy/issues/1249)
I'm using Emacs 25.3.1, Elpy v20171212.850, and Python 3.6.3 on MacOS 10.13.2 .
I have a project tracked with Git in ~/MyProject
, with the usual git data in ~/MyProject/.git
and ~/MyProject/.gitignore
. I have some Python modules in ~/MyProject/Python
. If, for example, I open one of these modules and, from that buffer, call elpy-shell-switch-to-shell
, or elpy-shell-send-region-or-buffer
, then Elpy starts a new Python process in ~/MyProject
instead of ~/MyProject/Python
. This odd behaviour has only started occurring recently (might be since the last Elpy upgrade, but not sure - I upgrade fairly frequently).
Interestingly, if I delete the Git data and kill/reopen the Python module (simply killing the Python REPL buffer is insufficient), then Elpy behaves properly, starting the Python process in ~/MyProject/Python
.
Any idea how I can debug this?