[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make emacs stop trying to load /home/sb/.emacs after su to ro
From: |
Steinar Bang |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt) |
>>>>> 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.
- How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/08
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Stefan Monnier, 2019/07/08
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Perry Smith, 2019/07/11
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/12
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Stefan Monnier, 2019/07/12
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/12
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/13
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Perry Smith, 2019/07/13
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/13
Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Perry Smith, 2019/07/08