From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: [Fwd: Location of .emacs file under `su` and `su -`?] Date: Tue, 22 Aug 2006 14:12:24 +0200 Message-ID: <44EAF4A8.9030708@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156248879 29248 80.91.229.2 (22 Aug 2006 12:14:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2006 12:14:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 22 14:14:33 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GFV9M-0004br-NK for ged-emacs-devel@m.gmane.org; Tue, 22 Aug 2006 14:14:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GFV9M-0005vX-1g for ged-emacs-devel@m.gmane.org; Tue, 22 Aug 2006 08:14:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GFV7Z-0004Pn-Qo for emacs-devel@gnu.org; Tue, 22 Aug 2006 08:12:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GFV7V-0004MA-4B for emacs-devel@gnu.org; Tue, 22 Aug 2006 08:12:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GFV7U-0004Lm-Mp for emacs-devel@gnu.org; Tue, 22 Aug 2006 08:12:36 -0400 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GFVF5-000647-GK for emacs-devel@gnu.org; Tue, 22 Aug 2006 08:20:28 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn2.hy.skanova.net (7.2.075) id 44E9C463000441DC for emacs-devel@gnu.org; Tue, 22 Aug 2006 14:12:30 +0200 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) Original-To: Emacs Devel X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58710 Archived-At: 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 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"?