[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs 21.3.1 not loading .emacs
From: |
Kevin Rodgers |
Subject: |
Re: emacs 21.3.1 not loading .emacs |
Date: |
Thu, 02 Feb 2006 12:31:38 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
pranavtiwari@gmail.com wrote:
> Kevin Rodgers wrote:
> > What do these commands tell you:
> > C-h v user-login-name
>
> root (wrong)
>
> Where is this picked up from? Help says "The user's name, taken from
> environment variables if possible.". My $USER is set correctly. What
> other variable could it be trying to use?
The value of the user-login-name variable should be the same as the
result of the user-login-name function; is it?
,----[ C-h f user-login-name RET ]
| user-login-name is a built-in function.
| (user-login-name &optional UID)
|
| Return the name under which the user logged in, as a string.
| This is based on the effective uid, not the real uid.
| Also, if the environment variable LOGNAME or USER is set,
| that determines the value of this function.
|
| If optional argument UID is an integer, return the login name of the user
| with that uid, or nil if there is no such user.
`----
> > C-h v user-real-login-name
>
> pranav (correct)
Again, see the corresponding function:
,----[ C-h f user-real-login-name RET ]
| user-real-login-name is a built-in function.
| (user-real-login-name)
|
| Return the name of the user's real uid, as a string.
| This ignores the environment variables LOGNAME and USER, so it differs
from
| `user-login-name' when running under `su'.
`----
My guess is that you logged in as root, then su'ed to pranav without the
- argument.
> > C-h v user-init-file
>
> nil (i assume default will be meaningful)
No, it's more complicated than that. It gets set to t by the
command-line function in startup.el, then reset either to the actual
file name (by a call to load) or to nil (if load can't find the file).
> > C-h v init-file-user
>
> root
>
> > Does the problem persist when you start emacs as:
> > emacs --debug-init
>
>
> Yes it does.
>
> BTW, when I start emacs with -u pranav, the values are:
>
> user-login-name : root (wrong)
> user-real-login-name: pranav (correct)
> user-init-file: /users/pranav/.emacs
> init-file-user: pranav
>
> user-init-file in the normal case is suspect. Given that .emacs is not
> being read, how is it supposed to be set before reading the init file?
It's not, see the command-line function in startup.el.
--
Kevin Rodgers