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

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

Open
SimeonEhrig opened this issue Jul 8, 2020 · 2 comments

Comments

@SimeonEhrig
Copy link

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
Copy link
Owner

necaris commented Jul 8, 2020

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

  • currently, conda-env-autoactivate-mode does the "right thing" by activating the environment if conda-project-env-name is set (e.g. via your project- or dir-locals)
  • you'd like it to automatically deactivate if no conda-project-env-name can be found for the current buffer. For example, if you switch from a Python buffer in one project to a JS buffer in another project, you would like your work in the JS buffer not to have the conda environment variables active?

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
Copy link
Author

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.

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

No branches or pull requests

2 participants