necaris / conda.el

Emacs helper library (and minor mode) to work with conda environments
MIT License
153 stars 49 forks source link

Is it possible that the conda-env-autoactivate-mode also deactivates the environment automatically? #64

Open SimeonEhrig opened 4 years ago

SimeonEhrig commented 4 years ago

Hi, nice project. Is it possible that conda.el automatically deactivates the conda environment if no conda-project-env-name is activated in conda-env-autoactivate-mode? I develop many different projects with different languages and dependencies in the same Emacs. I use projectile to manage the projects and I want to use conda.el to automatically activate the right environment. But sometimes I want to edit files which are not managed by projectile in a clean environment so I don't have unnecessary dependencies. In this case conda.el should simply deactivate the environment.

necaris commented 4 years ago

Thanks! Let me check that I've understood what you're asking:

That seems like a reasonable feature to add. I guess it would require some rethinking of how conda-env-autoactivate-mode is currently working -- which needs to be done anyway, because #29 is still not fixed -- so I might not get to it right away.

SimeonEhrig commented 4 years ago

Yes, you understand it correct and it would be great, if you implement it.

At the moment I have a workaround with conda run -n <env_name> <command> for my build and run commands, so it is not a show stopper. But with the workaround I have to set the path for certain tools, like company, manually. In this case the conda-env-autoactivate-mode would make it much easier.