Date: Mon, 1 Jun 1998 19:42:14 +0300 (IDT) From: Eli Zaretskii 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: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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\. 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.