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

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

Re: setenv


From: Thomas F. Burdick
Subject: Re: setenv
Date: 25 Sep 2001 16:03:32 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.105

rms@gnu.org (Richard Stallman) writes:

>       (4) getenv and setenv both work on process-environment as they do
>         now, but before returning, ensure that Emacs' actual environment
>         reflects the content of this variable.  This will allow the
>         Elisp user to modify Emacs' own actual environment, won't
>         require any special knowledge of the system, and won't break any
>         existing code that may modify process-environment directly.
> 
> Option 3 works completely when users modify process-environment
> directly.  Option 4 does not.  So if option 3 is not too terribly
> hard, it is better.  I think it is not too terribly hard.
> 
> To tell people that modifying process-environment directly is not
> reliable isn't totally out of the question, but it is ugly.  If it
> is the only way that works, we can do it.  But it is worth a small
> amount of work to avoid the ugliness of this.

I really should have separated my proposal into two parts:

  (4.a) Make getenv and setenv work on process-environment, as the
        currently do, but have them (or even just setenv) make sure
        that both environments are in sync.

  (4.b) Optional: given that the Emacs maintainers are human, and may
        miss some cases where the C environment should be synchronized
        with the contents of process-environment, and that many users
        cannot update their Emacs installation at will, expose to
        Elisp a mechanism for forcing this synchronization.  This
        would give the users the ability to fix some otherwise
        impossible-to-fix bugs.  These bugs would still be bugs, just
        not as hopeless as they would otherwise be.

> If we needed to be absolutely certain these problems would never
> happen, we would have to be extremely careful.  But this kind of
> problem is not terribly serious even when it bites, and it is
> very unlikely to bite also.

Not terribly serious, but *really* annoying.  Losing a week's worth of
state because Emacs crashed because it didn't update its environment
is no fun.  Not being able to work around it is worse.



reply via email to

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