set pyenv-mode when changing buffers.
Thank you for useful package. I love to use it. The submitted modification is trying to set pyenv properly not only when reading files but when moving between buffers with different pyenvs. It is realized using switch-buffer-functions.el. Thank you very much for reviewing.
Hi! Thank you for contribution. I am though about this some time and not sure this behaviour should be by default because of filesystem traversal cost.
Maybe remove find-file-hook at all and add recipe to README for both switch-buffer and find-file? Or make this configurable so user can choose himself what will work best for him?
What you think @hjmr ?
Thank you for reply! I didn't consider about computational cost of filesystem traversal. I have luckily felt no lags in changing between buffers with this modification so far, but it might certainly become problem in some environments such as when handling projects with very deep directory trees.
I still prefer this new behavior, so I appreciate if, whichever mentioning in README or configurable (sorry, this should require bit more modification), you will leave choices to users.