pyvenv
pyvenv copied to clipboard
Have `pyvenv-workon` do nothing if the requested environment is already active
Many of my projects have a .dir-locals.el that does something like this:
((nil . ((eval . (unless (and (boundp 'pyvenv-virtual-env-name) (equal pyvenv-virtual-env-name "my-project"))
(pyvenv-workon "my-project")))
)))
I do this check because apparently magit opens a lot of buffers in some of its operations, and simply callinv pyvenv-workon in dir-locals made magit very, very slow.
Could we add a flag to pyvenv-workon that did something like this, i.e. do nothing if the requested environment is active? I'd be happy to do the work.
Hm. Considering you can reset the environment using deactivate + workon, I think this is fine. If you want to do the work, please go ahead! :-)
Excellent. I might even be able to get to it this weekend.