Let user customize conda root, and check env vars. #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following up from #32 (comment)_
Currently it's required for the
prefix
field to be set in a file'senvironment.yml
in order forpet-virtualenv-root
to find the right environment. I don't have this in any of myenvironment.yml
s though, and it's keeping emacs-pet from finding the place where my environments live.https://github.com/wyuenho/emacs-pet/blob/cc086d91a9e6ab0158335d37a774356414746e17/pet.el#L605C1-L609C155
I could of course add a prefix line, and doing so fixes the issue, but if I'm working on a library that's going to be used by anybody else, that line shouldn't be getting checked into the repo. It would be nice if it were possible to point emacs-pet to the micromamba (or conda, mamba - I assume) root prefix in some other way.
This PR adds a custom variable
pet-condaish-root
that the user can set to point to whatever folder contains theirenvs/
, andpet-condaish-env-path
to check that as well as the environment variablesCONDA_ROOT
andMAMBA_ROOT_PREFIX
beforepet-virtualenv-root
errors out.The prefix line in the
environment.yml
gets priority right now, thenpet-condaish-root
, and then the environmental variables, though I'm not sure if that's the best order or not.