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

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

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


From: Dani Moncayo
Subject: bug#8221: 24.0.50; Allowed names for the init file. Windows/POSIX inconsistency
Date: Fri, 11 Mar 2011 09:26:20 +0100

Hi Juanma,

On Fri, Mar 11, 2011 at 03:49, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Fri, Mar 11, 2011 at 00:35, Dani Moncayo <dmoncayo@gmail.com> 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".
>

Indeed, that is the node which explains the alternatives, and of
course I agree that such info shouldn't be duplicated in any other
node of the Manual. Instead of duplicating, the others nodes (IMO)
should refer to the init file as `init file' (maybe giving a link to
the suitable node), but not as `.emacs', as we currently have in node
"Windows HOME".


>> 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.
>

Yes, I got a bit confused about the exact procedure. Maybe I was
somewhat biased, but IMO the current wording is a bit confusing:
>    The home directory is where your init file `.emacs' is stored.  When
> Emacs starts, it first checks whether the environment variable `HOME'
> is set.  If it is, it looks for the init file in the directory pointed
> by `HOME'.  If `HOME' is not defined, Emacs checks for an existing
> `.emacs' file in `C:\', the root directory of drive `C:'(1).  If
> there's no such file in `C:\', Emacs next uses the Windows system calls
> to find out the exact location of your application data directory.  If
> that system call fails, Emacs falls back to `C:\'.

That made me think that the principle was (a) Try to find a suitable
init file in several directories, and (b) Once an init file is found,
the "home" directory is thereafter established accordingly.

Thus, I suggest to revise the wording in that node, to avoid this confusion.

>> 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.
>
I agree, because IMO the init file should always be user-specific, and
C:\ isn't a user-specific directory.


-- 
Dani Moncayo





reply via email to

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