* emacs 21.3.1 not loading .emacs
@ 2006-02-01 5:48 pranavtiwari
2006-02-01 13:42 ` Maarten Bergvelt
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: pranavtiwari @ 2006-02-01 5:48 UTC (permalink / raw)
On my Unix machine, emacs is not loading .emacs.
If I start emacs as:
% emacs -u $USER
emacs starts up correctly with my .emacs loaded. However, if I start it
without -u option, it ignores my .emacs.
Can someone suggest what the problem could be?
thx,
-p
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs 21.3.1 not loading .emacs
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>
2 siblings, 0 replies; 5+ messages in thread
From: Maarten Bergvelt @ 2006-02-01 13:42 UTC (permalink / raw)
In article <1138772912.268515.75560@f14g2000cwb.googlegroups.com>,
pranavtiwari@gmail.com wrote:
> On my Unix machine, emacs is not loading .emacs.
>
> If I start emacs as:
>
> % emacs -u $USER
>
> emacs starts up correctly with my .emacs loaded. However, if I start it
> without -u option, it ignores my .emacs.
>
> Can someone suggest what the problem could be?
Maybe emacs is aliased to something else?
For instance, I have df aliased. I can see it by
$ alias df
alias df='df -h'
--
Maarten Bergvelt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs 21.3.1 not loading .emacs
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>
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-02-01 20:13 UTC (permalink / raw)
pranavtiwari@gmail.com wrote:
> On my Unix machine, emacs is not loading .emacs.
>
> If I start emacs as:
>
> % emacs -u $USER
>
> emacs starts up correctly with my .emacs loaded. However, if I start it
> without -u option, it ignores my .emacs.
>
> Can someone suggest what the problem could be?
What do these commands tell you:
C-h v user-login-name
C-h v user-real-login-name
C-h v user-init-file
C-h v init-file-user
Does the problem persist when you start emacs as:
emacs --debug-init
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs 21.3.1 not loading .emacs
[not found] ` <mailman.549.1138826204.3044.help-gnu-emacs@gnu.org>
@ 2006-02-02 8:10 ` pranavtiwari
2006-02-02 19:31 ` Kevin Rodgers
0 siblings, 1 reply; 5+ messages in thread
From: pranavtiwari @ 2006-02-02 8:10 UTC (permalink / raw)
Kevin Rodgers wrote:
> pranavtiwari@gmail.com wrote:
> > On my Unix machine, emacs is not loading .emacs.
> >
> > If I start emacs as:
> >
> > % emacs -u $USER
> >
> > emacs starts up correctly with my .emacs loaded. However, if I start it
> > without -u option, it ignores my .emacs.
> >
> > Can someone suggest what the problem could be?
>
> 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?
> C-h v user-real-login-name
pranav (correct)
> C-h v user-init-file
nil (i assume default will be meaningful)
> 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?
regards,
-p
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacs 21.3.1 not loading .emacs
2006-02-02 8:10 ` pranavtiwari
@ 2006-02-02 19:31 ` Kevin Rodgers
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-02-02 19:31 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-02 19:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.