unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: emacs 21.3.1 not loading .emacs
Date: Thu, 02 Feb 2006 12:31:38 -0700	[thread overview]
Message-ID: <drtmmu$k56$1@sea.gmane.org> (raw)
In-Reply-To: <1138867816.266631.86230@g14g2000cwa.googlegroups.com>

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

      reply	other threads:[~2006-02-02 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-01  5:48 emacs 21.3.1 not loading .emacs pranavtiwari
2006-02-01 13:42 ` Maarten Bergvelt
2006-02-01 20:13 ` Kevin Rodgers
     [not found] ` <mailman.549.1138826204.3044.help-gnu-emacs@gnu.org>
2006-02-02  8:10   ` pranavtiwari
2006-02-02 19:31     ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='drtmmu$k56$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).