From: Steinar Bang <sb@dod.no>
To: help-gnu-emacs@gnu.org
Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
Date: Thu, 11 Jul 2019 20:41:32 +0200 [thread overview]
Message-ID: <86v9w8wh0j.fsf@dod.no> (raw)
In-Reply-To: <86zhlkwhsf.fsf@dod.no> (Steinar Bang's message of "Thu, 11 Jul 2019 20:24:48 +0200")
>>>>> Steinar Bang <sb@dod.no>:
>> https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init
>> "However, if you run Emacs from a shell started by su, Emacs tries to
>> find your own .emacs, not that of the user you are currently pretending
>> to be. The idea is that you should get your own editor customizations
>> even if you are running as the super user."
>> Hm... this is annoying and new behaviour with emacs 26.
>> Does anyone know if there is a way to get the emacs 25 behaviour back...?
> I've been looking at the code in startup.el but I haven't been able to
> determine where the cause of the new behaviour is.
> Is it somewhere in startup--load-user-init-file ?
It has to be the function find-init-path, I think...?
So, the culprit is whatever sets init-file-user (that find-init-path
uses)...?
Let me see:
If I do a plain su, then init-file-user is "sb"
If I do "/bin/su - root" then init-file-user is ""
But there may not be an easy way to undo this behaviour by setting
init-file-user, because by its nature this variable is used before any
init files are loaded... hm.
next prev parent reply other threads:[~2019-07-11 18:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 22:16 How to make emacs stop trying to load /home/sb/.emacs after su to root? Steinar Bang
2019-07-08 23:20 ` Stefan Monnier
2019-07-11 17:59 ` Steinar Bang
2019-07-11 18:09 ` Steinar Bang
2019-07-11 18:24 ` Steinar Bang
2019-07-11 18:41 ` Steinar Bang [this message]
2019-07-11 19:03 ` Steinar Bang
2019-07-12 2:56 ` Perry Smith
2019-07-12 16:11 ` Steinar Bang
2019-07-12 16:33 ` Stefan Monnier
2019-07-12 21:41 ` Steinar Bang
2019-07-13 5:30 ` Steinar Bang
2019-07-13 15:04 ` Perry Smith
2019-07-13 18:04 ` Steinar Bang
2019-07-09 0:40 ` Perry Smith
2019-07-09 19:00 ` Tomas Nordin
2019-07-09 19:15 ` tomas
2019-07-09 20:04 ` Tomas Nordin
2019-07-09 20:20 ` tomas
2019-07-10 14:42 ` Nick Dokos
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86v9w8wh0j.fsf@dod.no \
--to=sb@dod.no \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.