Rick Rankin wrote:
> > |+
> > | And another thing, using (getenv "HOME") is probably the right
thing to use
> > | for `user-home-directory' under Cygwin32. BASH and TCSH both use
> > | (getenv "HOME") to determine `~', so XEmacs should probably
also...
> > |-
> >
> > I propose the following order of precedence:
> > Highest: Registry setting (when available).
> > 2. HOME
> > 3. HOMEDRIVE/HOMEPATH
>
> I would have thought that HOME should be first, as I would presume
> that it is easier to temporarily change the value of HOME than the
> registry setting (I don't use Windows, so I don't know this for a
> fact).
Debatable. Using the registry has the advantage that any change is immediate
and permanent without logging off/on or rebooting. It has the disadvantage
that editing the registry can be very dangerous if you don't know what
you're doing.
I'm aware of programs that have taken one path or the other. In each case,
users get confused. I think I prefer having the registry take precedence,
but only if, for the faint of heart, there's a simple mechanism for setting
the appropriate values without hand-editing the registry.
> Also, it would seem (to me) sensible for ~ to mean the same thing to
> both XEmacs and the shell in as many cases as possible.
A mechanism could be provided to set an environment variable from the
registry setting. For example,
bash: export HOME=$(getreg HOME)
cmd: getreg HOME HOME
The question is whether (shell-command "cat ~/foo") will show you the
same file as `C-x C-f ~/foo RET' when the registry's idea of the
user's home directory differs from what is contained in $HOME.
--
Glynn Clements <glynn(a)sensei.co.uk>