all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to make emacs stop trying to load /home/sb/.emacs after su to root?
@ 2019-07-08 22:16 Steinar Bang
  2019-07-08 23:20 ` Stefan Monnier
  2019-07-09  0:40 ` Perry Smith
  0 siblings, 2 replies; 20+ messages in thread
From: Steinar Bang @ 2019-07-08 22:16 UTC (permalink / raw)
  To: help-gnu-emacs

 debian 10.0 "buster", amd64
 emacs 26.1

I do /bin/su to change the user to root.
HOME is set to /root

However emacs still tries to load /home/sb/.emacs

How can I make emacs stop loading the original user's .emacs when logged
in as root?

Thanks!


- Steinar



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  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-09  0:40 ` Perry Smith
  1 sibling, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2019-07-08 23:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Steinar,

>  debian 10.0 "buster", amd64
>  emacs 26.1
>
> I do /bin/su to change the user to root.
> HOME is set to /root

Good.

> However Emacs still tries to load /home/sb/.emacs

Weird.
I suggest you file a bug report.


        Stefan




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  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-09  0:40 ` Perry Smith
  2019-07-09 19:00   ` Tomas Nordin
  1 sibling, 1 reply; 20+ messages in thread
From: Perry Smith @ 2019-07-09  0:40 UTC (permalink / raw)
  To: Steinar Bang; +Cc: help-gnu-emacs


> On Jul 8, 2019, at 5:16 PM, Steinar Bang <sb@dod.no> wrote:
> 
> debian 10.0 "buster", amd64
> emacs 26.1
> 
> I do /bin/su to change the user to root.
> HOME is set to /root
> 
> However emacs still tries to load /home/sb/.emacs
> 
> How can I make emacs stop loading the original user's .emacs when logged
> in as root?

Can you do “id” after you do the su?  Usually “su - root” is the suggested method.
The ‘-‘ causes the users environment to get loaded or something.  Never looked
too deep into it.

I suspect one of your uid’s is not root… euid, ruid, etc. and emacs is doing
some type of get user attributes and its returning the real user’s home rather
than the effective user’s home.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-09  0:40 ` Perry Smith
@ 2019-07-09 19:00   ` Tomas Nordin
  2019-07-09 19:15     ` tomas
  0 siblings, 1 reply; 20+ messages in thread
From: Tomas Nordin @ 2019-07-09 19:00 UTC (permalink / raw)
  To: Perry Smith, Steinar Bang; +Cc: help-gnu-emacs

Perry Smith <pedz@easesoftware.com> writes:

>> On Jul 8, 2019, at 5:16 PM, Steinar Bang <sb@dod.no> wrote:
>> 
>> debian 10.0 "buster", amd64
>> emacs 26.1

Same here but emacs 27.

>> 
>> I do /bin/su to change the user to root. HOME is set to /root
>> 
>> However emacs still tries to load /home/sb/.emacs

I had the same happen here.

>> 
>> How can I make emacs stop loading the original user's .emacs when
>> logged in as root?
>
> Can you do “id” after you do the su?  Usually “su - root” is the suggested method.
> The ‘-‘ causes the users environment to get loaded or something.  Never looked
> too deep into it.

After su;

# id
uid=0(root) gid=0(root) groups=0(root)

After su - root;

# id
uid=0(root) gid=0(root) groups=0(root)

but after this latter way of getting root emacs did not try to load
/home/tomas/.emacs

Just metooing

Best regards
--
Tomas



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-09 19:00   ` Tomas Nordin
@ 2019-07-09 19:15     ` tomas
  2019-07-09 20:04       ` Tomas Nordin
  0 siblings, 1 reply; 20+ messages in thread
From: tomas @ 2019-07-09 19:15 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: Perry Smith, help-gnu-emacs, Steinar Bang

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

On Tue, Jul 09, 2019 at 09:00:11PM +0200, Tomas Nordin wrote:
> Perry Smith <pedz@easesoftware.com> writes:

[...]

> >> How can I make emacs stop loading the original user's .emacs when
> >> logged in as root?
> >
> > Can you do “id” after you do the su?  Usually “su - root” is the suggested method.
> > The ‘-‘ causes the users environment to get loaded or something.  Never looked
> > too deep into it.
> 
> After su;
> 
> # id
> uid=0(root) gid=0(root) groups=0(root)
> 
> After su - root;
> 
> # id
> uid=0(root) gid=0(root) groups=0(root)
> 
> but after this latter way of getting root emacs did not try to load
> /home/tomas/.emacs
> 
> Just metooing

Have you checked the environment? What does $HOME say? (although the
"su -" part lets one expect that the HOME var is set anew: checking
won't hurt :-)

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-09 19:15     ` tomas
@ 2019-07-09 20:04       ` Tomas Nordin
  2019-07-09 20:20         ` tomas
  0 siblings, 1 reply; 20+ messages in thread
From: Tomas Nordin @ 2019-07-09 20:04 UTC (permalink / raw)
  To: tomas; +Cc: Perry Smith, help-gnu-emacs, Steinar Bang

tomas@tuxteam.de writes:

> On Tue, Jul 09, 2019 at 09:00:11PM +0200, Tomas Nordin wrote:
>> Perry Smith <pedz@easesoftware.com> writes:
>
> [...]
>
>> >> How can I make emacs stop loading the original user's .emacs when
>> >> logged in as root?
>> >
>> > Can you do “id” after you do the su?  Usually “su - root” is the suggested method.
>> > The ‘-‘ causes the users environment to get loaded or something.  Never looked
>> > too deep into it.
>> 
>> After su;
>> 
>> # id
>> uid=0(root) gid=0(root) groups=0(root)
>> 
>> After su - root;
>> 
>> # id
>> uid=0(root) gid=0(root) groups=0(root)
>> 
>> but after this latter way of getting root emacs did not try to load
>> /home/tomas/.emacs
>> 
>> Just metooing
>
> Have you checked the environment? What does $HOME say? (although the
> "su -" part lets one expect that the HOME var is set anew: checking
> won't hurt :-)

echo $HOME gave /root after both su methods

>
> Cheers
> -- t



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-09 20:04       ` Tomas Nordin
@ 2019-07-09 20:20         ` tomas
  2019-07-10 14:42           ` Nick Dokos
  0 siblings, 1 reply; 20+ messages in thread
From: tomas @ 2019-07-09 20:20 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: Perry Smith, help-gnu-emacs, Steinar Bang

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

On Tue, Jul 09, 2019 at 10:04:20PM +0200, Tomas Nordin wrote:
> tomas@tuxteam.de writes:
> 
> > On Tue, Jul 09, 2019 at 09:00:11PM +0200, Tomas Nordin wrote:
> >> Perry Smith <pedz@easesoftware.com> writes:
> >
> > [...]
> >
> >> >> How can I make emacs stop loading the original user's .emacs when
> >> >> logged in as root?
> >> >
> >> > Can you do “id” after you do the su?  Usually “su - root” is the suggested method.
> >> > The ‘-‘ causes the users environment to get loaded or something.  Never looked
> >> > too deep into it.
> >> 
> >> After su;
> >> 
> >> # id
> >> uid=0(root) gid=0(root) groups=0(root)
> >> 
> >> After su - root;
> >> 
> >> # id
> >> uid=0(root) gid=0(root) groups=0(root)
> >> 
> >> but after this latter way of getting root emacs did not try to load
> >> /home/tomas/.emacs
> >> 
> >> Just metooing
> >
> > Have you checked the environment? What does $HOME say? (although the
> > "su -" part lets one expect that the HOME var is set anew: checking
> > won't hurt :-)
> 
> echo $HOME gave /root after both su methods

Hm. Was somewhat to be expected. Still... bizarre. You could try to
compare the result of "set" (displays the whole environment) after
both "su" variants: perhaps you find an environment variable which
could explain this behaviour. As a guide you can look up the env
variables relevant to Emacs in the manual; online here [1] [2].

But we don't know (yet) whether an env variable is the culprit
(although it seems compelling...)

Cheers

[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html#General-Variables
[2] https://www.gnu.org/software/emacs/manual/html_node/emacs/Misc-Variables.html#Misc-Variables

-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-09 20:20         ` tomas
@ 2019-07-10 14:42           ` Nick Dokos
  0 siblings, 0 replies; 20+ messages in thread
From: Nick Dokos @ 2019-07-10 14:42 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-08 23:20 ` Stefan Monnier
@ 2019-07-11 17:59   ` Steinar Bang
  2019-07-11 18:09     ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2019-07-11 17:59 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:

> I suggest you file a bug report.

Tried to.  But it was appearently resolved as won't-fix:
 https://debbugs.gnu.org/db/36/36583.html

Not a very friendly and helpful response on the resolve, I might note.

(I didn't get any acknowledgement for this bug report and didn't find
anything on the first search, so I reported another today, and didn't
see the response until I found a better way to search for the new bug)




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-11 17:59   ` Steinar Bang
@ 2019-07-11 18:09     ` Steinar Bang
  2019-07-11 18:24       ` Steinar Bang
  2019-07-12  2:56       ` Perry Smith
  0 siblings, 2 replies; 20+ messages in thread
From: Steinar Bang @ 2019-07-11 18:09 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:

>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:
>> I suggest you file a bug report.

> Tried to.  But it was appearently resolved as won't-fix:
>  https://debbugs.gnu.org/db/36/36583.html

> Not a very friendly and helpful response on the resolve, I might note.

Google was more helpful:
 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...?


- Steinar



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-11 18:09     ` Steinar Bang
@ 2019-07-11 18:24       ` Steinar Bang
  2019-07-11 18:41         ` Steinar Bang
  2019-07-12  2:56       ` Perry Smith
  1 sibling, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2019-07-11 18:24 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> 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 ?

(I figure that if I can look at the code doing it, I can find a way to
undo it... this is emacs, after all...:-) )



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-11 18:24       ` Steinar Bang
@ 2019-07-11 18:41         ` Steinar Bang
  2019-07-11 19:03           ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2019-07-11 18:41 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> 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.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-11 18:41         ` Steinar Bang
@ 2019-07-11 19:03           ` Steinar Bang
  0 siblings, 0 replies; 20+ messages in thread
From: Steinar Bang @ 2019-07-11 19:03 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:

> 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.

Hm... looks like the only way to fix this is to hack the C code and
start using my own fork of emacs.

A bit on the drastic side to fix what is in the large scheme of things,
a minor annoyance.

I'll think about what to do when I calm down. :-)




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-11 18:09     ` Steinar Bang
  2019-07-11 18:24       ` Steinar Bang
@ 2019-07-12  2:56       ` Perry Smith
  2019-07-12 16:11         ` Steinar Bang
  1 sibling, 1 reply; 20+ messages in thread
From: Perry Smith @ 2019-07-12  2:56 UTC (permalink / raw)
  To: Steinar Bang; +Cc: help-gnu-emacs



> On Jul 11, 2019, at 1:09 PM, Steinar Bang <sb@dod.no> wrote:
> 
> Google was more helpful:
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init
From your reference:

More precisely, Emacs first determines which user's init file to use. It gets your user name from the environment variables LOGNAME andUSER; if neither of those exists, it uses effective user-ID. If that user name matches the real user-ID, then Emacs uses HOME; otherwise, it looks up the home directory corresponding to that user name in the system's data base of users.

Is USER or LOGNAME set?  If not, would setting one of those be easier?

You said this is new behavior.  Are you sure of that?  The page your reference seems all perfectly normal way things work.

Last, in another email you said that if you “su - root”, then it is set to “”.  That seems weird too.  Is that before ~root/.emacs.el et. al. doesn’t exist?

pedz





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-12  2:56       ` Perry Smith
@ 2019-07-12 16:11         ` Steinar Bang
  2019-07-12 16:33           ` Stefan Monnier
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2019-07-12 16:11 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Perry Smith <pedz@easesoftware.com>:

> You said this is new behavior.  Are you sure of that? 

Compared to emacs 25 on debian 9.9, this is new behaviour.

I'm sure of this because I have a computer still debian 9.9 and mosh in
and /bin/su and then start emacs is something I do a lot, and I did that
in a different window at the same time as I had the issues on debian 10.

I don't think this is something the debian maintainers have changed.

(and no, it doesn't have anything to do with mosh. It works the same way
with SSH. I can't try on the console, because it's a VPS without a
console )

And the difference is more drastic than it would appear to be, because
emacs loads the .emacs file in my home directory, and then fails
miserably because that confif files expects a lot of emacs packages that
emacs is unable to find (ie. it does not use the packages under the
original user, ie. ~sb/.emacs.d/elpa/ ).

So... the resulting emacs starts up in a broken middle-of-configuration
state.  It does not have my own user's complete configuration.  And it
does not have user root's perfectly valid (but far less extensive)
configuration (it mainly configures stuff that annoys me, such as the
default of splitting windows vertically).

> The page your reference seems all perfectly normal way things work.

Actually it doesn't work (see the above paragraphs).

Of course I can *make* it work by typing "/bin/su - root" instead of
"/bin/su", but the need to do so... annoys me deeply.

> Last, in another email you said that if you “su - root”, then it is
> set to “”.  That seems weird too.  Is that before ~root/.emacs.el
> et. al. doesn’t exist?

I don't understand the question...?

~sb/.emacs exists
~root/.emacs also exists (but is far less extensive than ~sb/.emacs) 

(and they both exists both before and after emacs is started... have
existed for years, in fact...)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-12 16:11         ` Steinar Bang
@ 2019-07-12 16:33           ` Stefan Monnier
  2019-07-12 21:41             ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2019-07-12 16:33 UTC (permalink / raw)
  To: help-gnu-emacs

>> You said this is new behavior.  Are you sure of that? 
> Compared to emacs 25 on debian 9.9, this is new behaviour.

I can't find any relevant change in Emacs in that timeframe.
OTOH it seems that the `su` that comes with Debian may have changed
between Debian 9 and Debian 10 (tho whether you see the change or not
might depend on whether you did an upgrade or a fresh install).

https://wiki.debian.org/NewInBuster says:

    The `su` command in buster is provided by the `util-linux` source
    package, instead of the `shadow` source package, and no longer alters
    the `PATH` variable by default.

the change mentioned doesn't explain the difference you're seeing, but
maybe this other `su` has other changes (w.r.t $LOGNAME and $USER)
which do.


        Stefan "who always uses `su -`"




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  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
  0 siblings, 2 replies; 20+ messages in thread
From: Steinar Bang @ 2019-07-12 21:41 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:

> I can't find any relevant change in Emacs in that timeframe.
> OTOH it seems that the `su` that comes with Debian may have changed

Hm... so I may have been barking up the wrong tree...?

> between Debian 9 and Debian 10 (tho whether you see the change or not
> might depend on whether you did an upgrade or a fresh install).

> https://wiki.debian.org/NewInBuster says:

>     The `su` command in buster is provided by the `util-linux` source
>     package, instead of the `shadow` source package, and no longer alters
>     the `PATH` variable by default.

(I didn't even think about su changing.  It's so basic, it's just part
of the background)

> the change mentioned doesn't explain the difference you're seeing, but
> maybe this other `su` has other changes (w.r.t $LOGNAME and $USER)
> which do.

Thanks for the pointer.  I will dig down and report back.

>         Stefan "who always uses `su -`"

Ah well... old habits are so hard to break. :-)

Thanks!



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-12 21:41             ` Steinar Bang
@ 2019-07-13  5:30               ` Steinar Bang
  2019-07-13 15:04               ` Perry Smith
  1 sibling, 0 replies; 20+ messages in thread
From: Steinar Bang @ 2019-07-13  5:30 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:

>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:
>> I can't find any relevant change in Emacs in that timeframe.
>> OTOH it seems that the `su` that comes with Debian may have changed

> Hm... so I may have been barking up the wrong tree...?

However, there is something that I would say actually is a bug, ie. this
bit, quoted from an earlier message:

>> And the difference is more drastic than it would appear to be, because
>> emacs loads the .emacs file in my home directory, and then fails
>> miserably because that confif files expects a lot of emacs packages that
>> emacs is unable to find (ie. it does not use the packages under the
>> original user, ie. ~sb/.emacs.d/elpa/ ).

IMO If emacs decides to load the .emacs from a different place, it
should also load all user specific config from that place (~/.emacs.d/
.gnus.el whatever).

(If emacs had loaded all of its config files from the same place it
loaded .emacs, I would never have noticed any breakage and would have
happily used my native emacs config as root)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  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
  1 sibling, 1 reply; 20+ messages in thread
From: Perry Smith @ 2019-07-13 15:04 UTC (permalink / raw)
  To: Steinar Bang; +Cc: help-gnu-emacs


> On Jul 12, 2019, at 4:41 PM, Steinar Bang <sb@dod.no> wrote:
> 
>>        Stefan "who always uses `su -`"
> 
> Ah well... old habits are so hard to break. :-)

Just trying to help …

You could alias su.  Personally I find aliases have problems.  So, what I find better are small trivial functions (assuming you are using bash/ksh/…) that changes the command you like to type into the command that “works” (by your definition of “works”)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
  2019-07-13 15:04               ` Perry Smith
@ 2019-07-13 18:04                 ` Steinar Bang
  0 siblings, 0 replies; 20+ messages in thread
From: Steinar Bang @ 2019-07-13 18:04 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Perry Smith <pedz@easesoftware.com>:

> You could alias su.  Personally I find aliases have problems.  So,
> what I find better are small trivial functions (assuming you are using
> bash/ksh/…) that changes the command you like to type into the command
> that “works” (by your definition of “works”)

Thanks!

My definition of "works" is "starting up without an error message
because emacs can't find all of the things referred to in the .emacs
file picked by emacs". :-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-07-13 18:04 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.