porterjamesj/virtualenvwrapper.el

A suggestion of activate process

Closed this issue · 1 comments

When activate a virtualenv using terminal, a shell file will be executed, and sometimes i would put some shell configuration such like environment variable in this shell script, but when i use virutlaenvwrapper.el i found the process that switch between virtualenv is a simulation, not actually execute shell script.
Is there a way to make some shell configuration acitvated when switch between virtualenv?

@Csomnia sorry for taking forever to respond to this! Unfortunately, this isn't something that's possible. I'm assuming you're talking about things like virtualenvwrapper's postactivate script? The shell version of virtualenvwrapper can run shell scripts for e.g. modifying the enivornment easily it is a shell script itself. Since this is an emacs package, it's not possible to do the same thing. Also, what if you wanted to change e.g. an emacs variable when activating a certain environment. Happily, such a thing is possible using the hooks this package provides. If you want to run some code only in a specific environment.