delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/01/12:42:41

Date: Mon, 1 Jun 1998 19:42:14 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: davep DOT news2 AT hagbard DOT demon DOT co DOT uk
cc: djgpp AT delorie DOT com
Subject: Re: emacs getting confused about location of ~/.emacs
In-Reply-To: <slrn6mveqn.fn.davep.news2@hagbard.demon.co.uk>
Message-ID: <Pine.SUN.3.91.980601194146.16341G-100000@is>
MIME-Version: 1.0

On Sat, 30 May 1998, Dave Pearson wrote:

>   Set DJGPP=C:\DJGPP\DJGPP.ENV
>   Set LOGNAME=davep

This is the source of your grief.  You set LOGNAME, but DJGPP.ENV (or
some other piece of software) sets USER, and I guess the value of
these two is different.  Try evaluating (user-login-name) and
(user-real-login-name), and see what they print.  Any difference
between these two causes Emacs to decide that your real login name is
different from your login name (as if you did an "su" on Unix), and
therefore Emacs tries to get the home directory of a user davep
instead of using HOME.  But DJGPP only supports a single user at a
time, whose name is taken from USER, so looking for ~davep fails, and
you are left with ~davep verbatim.

You need to make sure that both LOGNAME and USER have the same value.
Alternatively, you could undefine LOGNAME (Emacs will then use USER
for both purposes).

> Ok, this is curious. If I unset LOGNAME then emacs *does* find it's _emacs
> file (in C:\Home\davep\_emacs), but this only appears to be an issue on my
> new machine.

Maybe because USER is undefined, or you didn't use DJGPP.ENV, on the
other machine.

> If I create C:\dave on the bad machine, copy my _emacs file to there and
> then set HOME=C:\dave it works, emacs finds the init-file. It would appear
> that emacs gets confused if your HOME points to C:\Home\<whatever>. Let me
> test this on the "good" machine.... Nope, no effect. No matter which way
> round I do things on the "good" (OSR1) machine emacs can find it's
> init-file, on the "bad" machine (OSR2) it doesn't like it if the home
> directory is in C:\Home\davep *and* LOGNAME is set.

One thing to try is to play with the letter case of ``Home''.  You
could also try to trace what happens inside startup.el where Emacs
computes the location of your init file.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019