Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyvenv-tracking-mode doesn't work (or it's not clear how it's supposed to work) #116

Open
posita opened this issue Mar 8, 2022 · 0 comments

Comments

@posita
Copy link
Contributor

posita commented Mar 8, 2022

I have pyvenv-tracking-mode set to t. I use pyvenv-workon via .dir-locals.el. I have:

+- proj_a
|   +- a.py
|   `- .dir-locals.el
`- proj_b
    +- a.py
    `- .dir-locals.el
% lsvirtualenv
proj_a
======


proj_b
======

;; proj_a/.dir_locals.el
(
 (python-mode
  (eval pyvenv-workon "proj_a"))
 )
;; proj_b/.dir_locals.el
(
 (python-mode
  (eval pyvenv-workon "proj_b"))
 )

I open …/proj_a/a.py and (pyvenv-workon "proj_a") is invoked for that buffer (M-x getenv PATH concurs).

Next, I open …/proj_b/b.py and (pyvenv-workon "proj_b") is invoked for that buffer (again, M-x getenv PATH concurs).

Now, I switch back to the already open buffer for …/proj_a/a.py. M-x getenv PATH still shows that proj_b is the active virtual environment.

#80 (comment) is vague. It suggests pyvenv-tracking-mode can be used, but fails to explain how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant