[Top][All Lists]

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

Re: simple useful functions

From: Stefan Monnier
Subject: Re: simple useful functions
Date: Mon, 06 Dec 2010 14:31:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> I partly understand the context.  But right here I think your script
>> fails to serve you: it uses `setenv' which affects all inferior
>> processes, so if you're working on several projects at the same time
>> from the same Emacs session (likely if you're using it as a work
>> environment, which is also the intended use to a large extent), you get
>> pollution from one project to the other.  I think this issue is
>> important, and I suspect that figuring out how it should be solved is
>> necessary to figure out what is a good/generic way to provide this
>> "source" feature.

> As long as the login script sets up the environment needed you just
> need to run a source command when switching between the projects to
> override the environment.

You may use the various projects "at the same time", so "switching" may
be annoying if not problematic.  Furthermore, sometimes you can't just
accumulate the changes and hope that things still work, so instead you
need to first undo one of the envs and then apply the other env.

> A cleaner solution would be to attach the environment to a project
> concept within Emacs, but when someone offers a shed it seems unfair
> to ask them to build the whole city around it.

If it sounded like I was asking him to write an IDE as a prerequisite
for his change, I'm sorry for it, that was not my intention.  We already
have .dir-local.el which we might be able to use for that: a command
that extracts the env from a setup script and puts the result in some
var in a .dir-local.el; and then tweak things like M-x compile to pay
attention to that var.


reply via email to

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