Skip to content

Conversation

@jennykwan
Copy link

Fixes #28.

Detects virtualenv for buffer based on the directory.

  1. Not recursive.
  2. Includes a stupid trim function; not sure what's in the Elisp ecosystem built-in for this.

LMK what how you want to integrate this into tracking mode. I'll update this PR.

@jorgenschaefer
Copy link
Owner

Very nice, thanks a lot for your work! I did add a few comments to the patch. :-)

@jennykwan
Copy link
Author

OK! I had some questions. Please respond. Also, there's no tests, so yeah... I'll turn it around.

There was my original question on tracking mode integration. Also, do you want a recursive directory-crawling-up-towards-home-or-root behavior?

@jorgenschaefer
Copy link
Owner

There was my original question on tracking mode integration.

Integrating with pyvenv-tracking-mode would simply require setting pyvenv-activate or pyvenv-workon, wouldn't it? I think it would be a good idea to set either one from the code, yes.

Also, do you want a recursive directory-crawling-up-towards-home-or-root behavior?

The .project file has a pretty specific location. What crawling were you thinking of?

@jennykwan
Copy link
Author

Sorry for the late response. Got buried.

I was under the impression that .project is in the directory of the virtualenv itself. Is that the case?

@jorgenschaefer
Copy link
Owner

I was under the impression that .project is in the directory of the virtualenv itself. Is that the case?

That is indeed the case. $VIRTUAL_ENV/.project, to be exact.

($VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME, really, but newer versions of virtualenvwrapper do not export most $VIRTUALENVWRAPPER_* environment variables anymore, and I don't think many people customize this, so that can easily be ignored until we get bug reports about it.)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants