From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Nick Dokos Newsgroups: gmane.emacs.help Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root? Date: Wed, 10 Jul 2019 10:42:16 -0400 Message-ID: <87lfx62bp3.fsf@alphaville.usersys.redhat.com> References: <864l3w18ae.fsf@dod.no> <48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com> <8736jf2fus.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <20190709191532.GE15938@tuxteam.de> <87wogr0ybf.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <20190709202047.GF15938@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="53823"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 10 16:42:48 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlDnz-000DuL-OS for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jul 2019 16:42:47 +0200 Original-Received: from localhost ([::1]:34216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlDny-00047r-PJ for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jul 2019 10:42:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54060) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlDnl-00046P-7Y for help-gnu-emacs@gnu.org; Wed, 10 Jul 2019 10:42:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlDnj-00070w-LY for help-gnu-emacs@gnu.org; Wed, 10 Jul 2019 10:42:33 -0400 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:51924 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlDnj-0006w5-F1 for help-gnu-emacs@gnu.org; Wed, 10 Jul 2019 10:42:31 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hlDnf-000DVn-2l for help-gnu-emacs@gnu.org; Wed, 10 Jul 2019 16:42:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:IklajFloJwoCsgJF1kA0gvwNIgs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121144 Archived-At: tomas@tuxteam.de writes: > ... > But we don't know (yet) whether an env variable is the culprit > (although it seems compelling...) > man su says: For backward compatibility, su defaults to not change the current directory and to only set the environment variables HOME and SHELL (/plus USER and LOGNAME if the target user is not root/). It is recommended to always use the --login option (instead of its shortcut -) to avoid side effects caused by mixing environments. [emphasis added]. That might have something to do with it. What happens with ~ might also matter. How does emacs find the init file? -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler