unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What about a seperate "HOME" environment variable under w32?
@ 2005-04-25 12:08 Sun Yijiang
  2005-04-25 15:35 ` Benjamin Riefenstahl
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sun Yijiang @ 2005-04-25 12:08 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 418 bytes --]

The %HOME% environment variable is used by many programs under w32, so it's 
really a mess sometime. I suggest Emacs use a different HOME variable 
underw32, something like %EMACS_HOME% or %EHOME%. This can be backward 
compatible if Emacs first look for %EHOME% variable, and if not found, 
search for %HOME% instead. User can also set simply set %EHOME% to %HOME% to 
get backward compatibility.
 Sun Yijiang

[-- Attachment #1.2: Type: text/html, Size: 479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 12:08 What about a seperate "HOME" environment variable under w32? Sun Yijiang
@ 2005-04-25 15:35 ` Benjamin Riefenstahl
  2005-04-25 16:34 ` Eli Zaretskii
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Benjamin Riefenstahl @ 2005-04-25 15:35 UTC (permalink / raw)
  Cc: emacs-devel

Hi Sun Yijiang,

Sun Yijiang writes:
> The %HOME% environment variable is used by many programs under w32,
> so it's really a mess sometime.

The HOME environment variable is used by almost every program with a
Unix heritage.  But it seems pretty clear to me what HOME is.  It's
the place where user-level configuration files are stored and on Unix
it's also the place where the user can store his/her other personal
files.  Windows has other places for the latter purpose, but that is
not relevant here, I think.

> I suggest Emacs use a different HOME variable underw32, something
> like %EMACS_HOME% or %EHOME%.

You can achieve that effect with other means, like starting Emacs from
a batch that sets HOME.  Or let the ~/.emacs in your standard HOME
jkust be a short stub that points to another file in some other
directory like e.g.

  (setenv "HOME" "x:/some/other/directory")
  (load "~/.emacs)

That way all subsequent references to HOME are redirected. 

benny

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 12:08 What about a seperate "HOME" environment variable under w32? Sun Yijiang
  2005-04-25 15:35 ` Benjamin Riefenstahl
@ 2005-04-25 16:34 ` Eli Zaretskii
  2005-04-25 17:04   ` David Kastrup
  2005-04-25 18:56 ` Stefan Monnier
  2005-04-25 21:27 ` Lennart Borgman
  3 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2005-04-25 16:34 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Mon, 25 Apr 2005 20:08:51 +0800
> From: Sun Yijiang <sunyijiang@gmail.com>
> 
> The %HOME% environment variable is used by many programs under w32, so it's
> really a mess sometime.

Is HOME used for any other purpose than Emacs does: to store the
user's private init files?  If some programs use HOME for conflicting
purposes, could you please name those programs and describe the
details?

> I suggest Emacs use a different HOME variable=20
> underw32, something like %EMACS_HOME% or %EHOME%.

I don't think we should introduce such a variable without a very good
reason; hence the questions above.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 16:34 ` Eli Zaretskii
@ 2005-04-25 17:04   ` David Kastrup
  2005-04-25 18:15     ` Eli Zaretskii
  2005-04-27 17:54     ` Jason Rumney
  0 siblings, 2 replies; 12+ messages in thread
From: David Kastrup @ 2005-04-25 17:04 UTC (permalink / raw)
  Cc: Sun Yijiang, emacs-devel

"Eli Zaretskii" <eliz@gnu.org> writes:

>> Date: Mon, 25 Apr 2005 20:08:51 +0800
>> From: Sun Yijiang <sunyijiang@gmail.com>
>> 
>> The %HOME% environment variable is used by many programs under w32, so it's
>> really a mess sometime.
>
> Is HOME used for any other purpose than Emacs does: to store the
> user's private init files?  If some programs use HOME for conflicting
> purposes, could you please name those programs and describe the
> details?
>
>> I suggest Emacs use a different HOME variable=20
>> underw32, something like %EMACS_HOME% or %EHOME%.
>
> I don't think we should introduce such a variable without a very good
> reason; hence the questions above.

kpathsea, the library for most TeX systems, has a scheme where you can
override most environment variables on a per-application base.

An analog construction for Emacs would be to something like
(or (getenv "HOME.emacs") (getenv "HOME"))

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 17:04   ` David Kastrup
@ 2005-04-25 18:15     ` Eli Zaretskii
  2005-04-25 18:26       ` David Kastrup
  2005-04-27 17:54     ` Jason Rumney
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2005-04-25 18:15 UTC (permalink / raw)
  Cc: sunyijiang, emacs-devel

> Cc: Sun Yijiang <sunyijiang@gmail.com>, emacs-devel@gnu.org
> From: David Kastrup <dak@gnu.org>
> Date: Mon, 25 Apr 2005 19:04:34 +0200
> 
> kpathsea, the library for most TeX systems, has a scheme where you can
> override most environment variables on a per-application base.

I know all about Kpathsea, but I don't think there's any reason to go
to such complexities in Emacs.  Kpathsea does that because it is a
library that is supposed to be linked into many applications, each one
with its own peculiar configuration files and auxiliary file directory
trees, with complex requirements like ability to be installed both in
and outside the TDS tree.  Emacs doesn't come anywhere near such
issues.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 18:15     ` Eli Zaretskii
@ 2005-04-25 18:26       ` David Kastrup
  2005-04-25 20:59         ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: David Kastrup @ 2005-04-25 18:26 UTC (permalink / raw)
  Cc: sunyijiang, emacs-devel

"Eli Zaretskii" <eliz@gnu.org> writes:

>> Cc: Sun Yijiang <sunyijiang@gmail.com>, emacs-devel@gnu.org
>> From: David Kastrup <dak@gnu.org>
>> Date: Mon, 25 Apr 2005 19:04:34 +0200
>> 
>> kpathsea, the library for most TeX systems, has a scheme where you can
>> override most environment variables on a per-application base.
>
> I know all about Kpathsea, but I don't think there's any reason to
> go to such complexities in Emacs.

I was not suggesting we implement kpathsea's search semantics.  I was
merely saying that there was already a well-established scheme for
application specific overrides of general environment variables.

And that makes HOME.emacs for such an environment variable the natural
choice.  This is not complicated at all, and I see no reason not to
just follow that practice _if_ we decide that being able to override
HOME would be a good idea.  I am not sure about that, but the
complexity of kpathsea is completely irrelevant for resolving that
question.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 12:08 What about a seperate "HOME" environment variable under w32? Sun Yijiang
  2005-04-25 15:35 ` Benjamin Riefenstahl
  2005-04-25 16:34 ` Eli Zaretskii
@ 2005-04-25 18:56 ` Stefan Monnier
  2005-04-25 21:27 ` Lennart Borgman
  3 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2005-04-25 18:56 UTC (permalink / raw)
  Cc: emacs-devel

> The %HOME% environment variable is used by many programs under w32, so it's 
> really a mess sometime.

The above doesn't make any sense: the $HOME envvar is used by many/all
programs under Unix and it's not a mess at all.

Could you explain why under w32 it creates a mess?  E.g. give examples of
conflicting requirements.  That will help us better assess the problem and
the potential solutions,


        Stefan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 18:26       ` David Kastrup
@ 2005-04-25 20:59         ` Eli Zaretskii
  2005-04-25 21:06           ` David Kastrup
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2005-04-25 20:59 UTC (permalink / raw)
  Cc: sunyijiang, emacs-devel

> Cc: sunyijiang@gmail.com, emacs-devel@gnu.org
> From: David Kastrup <dak@gnu.org>
> Date: Mon, 25 Apr 2005 20:26:22 +0200
> 
> I am not sure about that, but the complexity of kpathsea is
> completely irrelevant for resolving that question.

It's relevant: I wouldn't want to ever see Emacs in the need of
something like kpsewhich to figure out where HOME (or any other
variable related to Emacs) points this week.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 20:59         ` Eli Zaretskii
@ 2005-04-25 21:06           ` David Kastrup
  0 siblings, 0 replies; 12+ messages in thread
From: David Kastrup @ 2005-04-25 21:06 UTC (permalink / raw)
  Cc: sunyijiang, emacs-devel

"Eli Zaretskii" <eliz@gnu.org> writes:

>> Cc: sunyijiang@gmail.com, emacs-devel@gnu.org
>> From: David Kastrup <dak@gnu.org>
>> Date: Mon, 25 Apr 2005 20:26:22 +0200
>> 
>> I am not sure about that, but the complexity of kpathsea is
>> completely irrelevant for resolving that question.
>
> It's relevant: I wouldn't want to ever see Emacs in the need of
> something like kpsewhich to figure out where HOME (or any other
> variable related to Emacs) points this week.

Looks like Guy Fawkes celebrations must be near.  Straw men seem all
the rage.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 12:08 What about a seperate "HOME" environment variable under w32? Sun Yijiang
                   ` (2 preceding siblings ...)
  2005-04-25 18:56 ` Stefan Monnier
@ 2005-04-25 21:27 ` Lennart Borgman
  3 siblings, 0 replies; 12+ messages in thread
From: Lennart Borgman @ 2005-04-25 21:27 UTC (permalink / raw)


Please see also the discussion in oct 2004 in the archives about "$HOME
default on w32".


----- Original Message ----- 
From: "Sun Yijiang" <sunyijiang@gmail.com>
To: <emacs-devel@gnu.org>
Sent: Monday, April 25, 2005 2:08 PM
Subject: What about a seperate "HOME" environment variable under w32?


The %HOME% environment variable is used by many programs under w32, so it's
really a mess sometime. I suggest Emacs use a different HOME variable
underw32, something like %EMACS_HOME% or %EHOME%. This can be backward
compatible if Emacs first look for %EHOME% variable, and if not found,
search for %HOME% instead. User can also set simply set %EHOME% to %HOME% to
get backward compatibility.
 Sun Yijiang



----------------------------------------------------------------------------
----


> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-25 17:04   ` David Kastrup
  2005-04-25 18:15     ` Eli Zaretskii
@ 2005-04-27 17:54     ` Jason Rumney
  2005-04-27 18:59       ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2005-04-27 17:54 UTC (permalink / raw)
  Cc: Eli Zaretskii, Sun Yijiang, emacs-devel

David Kastrup wrote:

>"Eli Zaretskii" <eliz@gnu.org> writes:
>
>  
>
>>>Date: Mon, 25 Apr 2005 20:08:51 +0800
>>>From: Sun Yijiang <sunyijiang@gmail.com>
>>>
>>>The %HOME% environment variable is used by many programs under w32, so it's
>>>really a mess sometime.
>>>      
>>>
>>Is HOME used for any other purpose than Emacs does: to store the
>>user's private init files?  If some programs use HOME for conflicting
>>purposes, could you please name those programs and describe the
>>details?
>>
>>    
>>
>>>I suggest Emacs use a different HOME variable=20
>>>underw32, something like %EMACS_HOME% or %EHOME%.
>>>      
>>>
>>I don't think we should introduce such a variable without a very good
>>reason; hence the questions above.
>>    
>>
>
>kpathsea, the library for most TeX systems, has a scheme where you can
>override most environment variables on a per-application base.
>
>An analog construction for Emacs would be to something like
>(or (getenv "HOME.emacs") (getenv "HOME"))
>
>  
>
If HOME is not set as an environment variable on w32, Emacs will read it 
from the registry (also used as the equivalent of .Xdefaults). Perhaps 
we could change the priority of these, so that the registry overrides 
the environment, since users are unlikely to set a specific HOME for 
Emacs in the registry and then expect to override it by changing their 
environment.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: What about a seperate "HOME" environment variable under w32?
  2005-04-27 17:54     ` Jason Rumney
@ 2005-04-27 18:59       ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2005-04-27 18:59 UTC (permalink / raw)
  Cc: Eli Zaretskii, Sun Yijiang, emacs-devel

> If HOME is not set as an environment variable on w32, Emacs will read it
> from the registry (also used as the equivalent of .Xdefaults). Perhaps we
> could change the priority of these, so that the registry overrides the
> environment, since users are unlikely to set a specific HOME for Emacs in
> the registry and then expect to override it by changing their environment.

Until someone actually shows us some concrete scenario where the current
behavior is a problem, I don't see any need to change anything and I don't
think making blind changes like that would help much either.

I for one occasionally like to change my HOME envvar for a particular
process, typically to make sure no other ~/.foo file influences
the behavior, or as a user-level variant of chrooting.  Of course, it's
typically under GNU/Linux, so it may not be pertinent for w32.


        Stefan

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-04-27 18:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-25 12:08 What about a seperate "HOME" environment variable under w32? Sun Yijiang
2005-04-25 15:35 ` Benjamin Riefenstahl
2005-04-25 16:34 ` Eli Zaretskii
2005-04-25 17:04   ` David Kastrup
2005-04-25 18:15     ` Eli Zaretskii
2005-04-25 18:26       ` David Kastrup
2005-04-25 20:59         ` Eli Zaretskii
2005-04-25 21:06           ` David Kastrup
2005-04-27 17:54     ` Jason Rumney
2005-04-27 18:59       ` Stefan Monnier
2005-04-25 18:56 ` Stefan Monnier
2005-04-25 21:27 ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).