Subject: Re: bug#8221: 24.0.50; Allowed names for the init file. Windows/POSIX inconsistency

From: Juanma Barranquero <[email-masked]>
Date: Fri, 11 Mar 2011 03:49:58 +0100

On Fri, Mar 11, 2011 at 00:35, Dani Moncayo <[email-masked]> wrote:

> On one hand, it doesn't seem to be the documented behavior in the node
> "Windows HOME" of the manual. It refers to the init file as `.emacs',
> and says nothing about possible alternatives.

The alternatives are documented on "53.6 The Init File, `~/.emacs'";
there's no need to duplicate it on "G.5 HOME and Startup Directories
on MS-Windows".

> On the other hand, and according to the same info node, C:\ is checked
> as one possible "home" directory.

I think you're reading more that the info node says. What it says is
that Emacs is looking for HOME (the environment variable) and if it
finds it, it looks there for the "init file". If that fails, it looks
for ".emacs" in C:\; and if that fails, it looks for the AppData dir
(which is an alternative to HOME, not to C:\). So it is clear (if a
bit inconsistent) that looking for .emacs (specifically) on C:\
(specifically) is something done just because of back compatibility.

> Thus, init files such as
> "C:\.emacs.el" or "C:\.emacs.d\init.el" should be valid ones. But I've
> just tested those two and Emacs don't find them.

If you ask me, not even C:\.emacs should be valid; "set HOME=C:\"
should be required for that.

    Juanma