delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/30/04:46:49

From: davep DOT news2 AT hagbard DOT demon DOT co DOT uk (Dave Pearson)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: emacs getting confused about location of ~/.emacs
Date: Sat, 30 May 1998 07:55:05 GMT
Organization: Hagbard's World (A Private Internet Host)
Sender: usenet AT hagbard DOT demon DOT co DOT uk
Message-ID: <slrn6mveqn.fn.davep.news2@hagbard.demon.co.uk>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980528195601 DOT 1138O-100000 AT is>
Reply-To: davep DOT news2 AT hagbard DOT demon DOT co DOT uk
Lines: 97
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 28 May 1998 19:56:24 +0300 (IDT), Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

> > [SNIP emacs not finding ~/_emacs on one machine, but does on another]
> 
> Please describe the shortest way to reproduce these problems, including
> the exact text of the lines in your AUTOEXEC.BAT which set HOME,

Ok, here are the lines from AUTOEXEC.BAT that do or might have some bearing
on this:

  Rem Environment for Unix-a-like stuff
  Set DJGPP=C:\DJGPP\DJGPP.ENV
  Set LOGNAME=davep
  Set HOME=c:\home\davep
  Set TZ=GMT0BST

those lines on the machine where emacs can find it's ~/_emacs file are:

  Rem Environment for Unix-a-like stuff
  Set DJGPP=C:\DJGPP\DJGPP.ENV
  Set LOGNAME=davep
  Set HOME=c:\dave
  Set TZ=GMT0BST

The emacs section from DJGPP.ENV looks like:

  [emacs]
  INFOPATH=%/>;INFOPATH%%DJDIR%/info;%DJDIR%/gnu/emacs/info
  TERM=
  SHELL=c:/djgpp/bin/bash
  SUSPEND=c:/4dos/4dos.com

this is exactly the same as that on the machine where emacs can find it's
~/_emacs file.

> how you invoke Emacs (please use the -q switch), 

I simply run "emacs". My problem is that when I run it, it is as if I had
run it with the -q switch.

> and in what directory.  

Any directory. For example (obviously, without the -q switch):

  In             Evaluating (expand-file-name user-init-file) Gives
  -------------  --------------------------------------------------
  C:\            C:/~DAVEP/_emacs
  C:\FOO         C:/foo/~DAVEP/_emacs
  C:\HOME\DAVEP  C:/Home/davep/~DAVEP/_emacs

What I can't quite understand is where the "~DAVEP" is coming from. Hmm, I
wonder (tries something).

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.

On my existing machine, as you'll see from above, I have a LOGNAME and a
HOME and this doesn't bother emacs, but on my new machine, setting LOGNAME
upsets emacs because it appears to want to insert ~$(LOGNAME) into the
search path for the init-file.

(Tries something else). Got it! Ok, as you can see above the situation is:

Good Machine: Home=C:\dave 
Bad Machine:  Home=C:\Home\davep

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.

> I tried to reproduce this problem, but couldn't.  I use Emacs 20.2 for a
> long time, and never had such problems.

Same here, I've got it installed on two Win95 machines (OSR1, VFat), and on
my Linux box and I've got no problems. The only problem machine is this new
Win95 (OSR2, Fat32) machine.

I'm really stumped by this one.

For the moment the workaround would appear to be adding "LOGNAME=" to the
[emacs] section of DJGPP.ENV. If the OS level isn't the issue (and I'm
inclined to agree with you that it isn't) I can only think that there is
some subtle environment setting that I've overlooked.

CC: Eli

-- 
Take a look in Hagbard's World: |     w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard/ |  ng2html - The NG to HTML converter.
http://www.hagbard.demon.co.uk/ |       eg - Norton Guide reader for Linux.
Free software, including........|   dgscan - DGROUP scanner for Clipper.

- Raw text -


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