help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use project.el


From: Dmitry Gutov
Subject: Re: How to use project.el
Date: Tue, 24 Nov 2020 00:19:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 23.11.2020 18:22, excalamus--- via Users list for the GNU Emacs text editor wrote:

21 nov. 2020 à 21:55 de dgutov@yandex.ru:

  For instance, if you are working on a Python project, shouldn't there be some 
file in the project root directory which will indicate which virtualenv to use?

Maybe? I've never heard of such a file being used with the venv module or conda 
environments.

OK, I'm not well-versed in Python ecosystem, but there is pyenv:

  https://github.com/pyenv/pyenv

which apparently supports reading the python version from a file called .python-version, and an Emacs package that provides some sort of integration with it:

  https://github.com/pythonic-emacs/pyenv-mode

But even if those packages don't work to your liking, or together with "conda" (whatever that is), I think the general idea could be implemented in Emacs Lisp: you call (project-root (project-current)) and see if there is a file with a predetermined name inside that root. That file could point to a specific virtualenv which you would then switch to.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]