If I am editing a python file, and start a python shell using elpy-shell-switch-to-shell
the process appears to set the working directory as the containing directory of the file.
However, the file itself is in a subfolder of a git repo. So, I would expect the working directory to be that of the containing .git directory.
I set the project root directory using elpy-set-project-root
but that didn't seem to change the behaviour of elpy-shell-switch-to-shell
.
What am I doing wrong here?
vc-root-dir
can give you the root of whatever version control repository you are in. I'm not familiar withelpy-switch-to-shell
, but you can probably create aelpy-switch-to-shell-in-root
that automatically opens the root dir (Alan's answer) before running theelpy
command