From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adam Funk Newsgroups: gmane.emacs.help Subject: Location of .emacs file under `su` and `su -`? Date: Tue, 22 Aug 2006 12:26:27 +0100 Message-ID: <386rr3-n6k.ln1@news.ducksburg.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1156246891 22206 80.91.229.2 (22 Aug 2006 11:41:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2006 11:41:31 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 22 13:41:29 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GFUdB-00066P-Bz for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Aug 2006 13:41:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GFUdA-0007oU-UZ for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Aug 2006 07:41:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsserver.news.garr.it!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-X-Trace: individual.net jUvTlGxcKRsvXpJCmcLo8gVzK2P0CMXjBbZOLWF05Ed+jhwmXq X-Orig-Path: news.ducksburg.com!news User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Xref: shelby.stanford.edu gnu.emacs.help:141215 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36838 Archived-At: 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"?