Improve guess for python-shell-virtualenv-root initialization

This commit is contained in:
Gerard Vermeulen 2022-06-12 15:05:22 +02:00
parent f85ec4dbe4
commit 1807a3e369

View File

@ -3140,7 +3140,8 @@ of [[https://github.com/jorgenschaefer/pyvenv#readme][pyvenv]]). Therefore, thi
pyenv-versions
pyenv-virtualenvs))
(setq python-shell-virtualenv-root
(pyenv-full-path (or (car (pyenv-virtualenvs))
(pyenv-full-path (or (car `(,(pyenv-version-name)))
(car (pyenv-virtualenvs))
(car (pyenv-versions)))))
(message "Now `python-shell-virtualenv-root' equals \"%s\""
python-shell-virtualenv-root)