GNU bug report logs - #36583
26.1; emacs 26 tries loading original user's .emacs after su to root

Previous Next

Package: emacs;

Reported by: Steinar Bang <sb <at> dod.no>

Date: Wed, 10 Jul 2019 20:24:02 UTC

Severity: minor

Merged with 19477, 36604

Found in version 26.1

Full log


Message #76 received at 36583 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Steinar Bang <sb <at> dod.no>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 36583 <at> debbugs.gnu.org,
 Richard Stallman <rms <at> gnu.org>
Subject: Re: bug#36583: 26.1;
 emacs 26 tries loading original user's .emacs after su to root
Date: Tue, 23 Jul 2019 10:30:27 -0400
> FWIW What broke things for me, was that it reads the .emacs file from
> /home/sb directory, but it doesn't read /home/sb/.emacs.d/elpa/ and
> therefore doesn't find the packages my .emacs refers to, so that startup
> breaks in the middle of the setup and nothing works as expected.

Indeed, as a first-approximation, it uses "~$LOGNAME/.emacs" but "$HOME/.emacs.d/elpa/".

In many circumstances "~$LOGNAME/" is the same as "$HOME/", and in yet
other circumstances Emacs uses "$HOME/.emacs" (which I find very handy)
rather than "~$LOGNAME/.emacs".

I'd rather we drop this special case of using "~$LOGNAME/.emacs" when we
decide that we're in "su".  I know it's long standing behavior, but
there are many other ways for the user to get the same result, so
I think we can get rid of this dangerous quirk.


        Stefan





This bug report was last modified 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.