unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Subject: [Fwd: Location of .emacs file under `su` and `su -`?]
Date: Tue, 22 Aug 2006 14:12:24 +0200	[thread overview]
Message-ID: <44EAF4A8.9030708@student.lu.se> (raw)

How about this in Emacs 22?

-------- Original Message --------
Subject:     Location of .emacs file under `su` and `su -`?
Date:     Tue, 22 Aug 2006 12:26:27 +0100
From:     Adam Funk <a24061@yahoo.com>
To:     help-gnu-emacs@gnu.org
Newsgroups:     gnu.emacs.help


When I use `su` and run emacs, I get errors because it loads
~adam/.emacs as the init file, which contains 

  (add-to-list 'load-path "~/.local/site-lisp/")

but then doesn't find the *.el and *.elc files there, because (as far
as I can tell) it's looking in /root/.local/site-lisp/, which doesn't
exist.  Does that seem to be a correct interpretation?

When I use `su -` and run emacs, it loads ~root/.emacs as the init
file.

In both cases, `env` tells me
 
  EDITOR=/usr/bin/emacs
  HOME=/root
  USERNAME=root
  USER=root

so I think the difference is here:

  su      -->  LOGNAME=adam
  su -    -->  LOGNAME=root

When emacs starts up, does it actually look up "~${LOGNAME}/.emacs"
instead of (what I would expect) "${HOME}/.emacs"?

             reply	other threads:[~2006-08-22 12:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-22 12:12 Lennart Borgman [this message]
2006-08-22 15:18 ` [Fwd: Location of .emacs file under `su` and `su -`?] Chong Yidong
2006-08-22 15:42   ` Andreas Schwab
2006-08-22 18:17   ` Richard Stallman
2006-08-22 18:44     ` Chong Yidong
2006-08-23  4:06       ` Richard Stallman
2006-08-23 16:38         ` Chong Yidong

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=44EAF4A8.9030708@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).