emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Buffer-local process environments


From: Augusto Stoffel
Subject: Re: [PATCH] Buffer-local process environments
Date: Sat, 28 Aug 2021 14:55:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

On Sat, 28 Aug 2021 at 15:37, Eli Zaretskii <eliz@gnu.org> wrote:

> And I'm not sure I understand the rationale, and you didn't describe
> it.  Environment variables and PATH in particular are generally global
> on the entire system, so what does this feature correspond to?
> separate environment variables in each shell window?  Why would anyone
> want to do that?  And why should we make it easier by providing
> buffer-local values of those, instead of letting each Lisp program
> that needs it let-bind the variables instead?

Yes, sorry for suddenly reviving an old discussion.

Many languages and build tools rely on environment variables, so those
variables are not global, but rather local to a project.  In Python, for
instance, the standard way to choose a particular version of the
interpreter and of various packages is by setting the PATH and perhaps
PYTHONPATH variables.  It's a dumb and simple system, which has its
advantages.

If you are working on two projects with different requirements, you need
to either launch an Emacs instance for each project, which is the
pedestrian option, or have buffer-local environment variables.

There are packages out there to help setting the environment on a
buffer-local basis, e.g. https://melpa.org/#/envrc



reply via email to

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