help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sudo emacs


From: jpkotta
Subject: Re: sudo emacs
Date: Wed, 6 Feb 2013 08:32:59 -0800 (PST)
User-agent: G2/1.0

On Wednesday, February 6, 2013 4:06:18 AM UTC-6, drain wrote:
> This somewhat downgrades root privileges, but I cannot encrypt mail without
> 
> it. Hitherto I almost never ran Emacs with sudo.
> 
> 
> 
> The problem is, I cannot access any files without sudo. Now all of my inits
> 
> require it.
> 
> 
> 
> I was thinking of creating alternates. Is it possible for .emacs to be
> 
> instructed to ignore certain files and load others depending on privilege?
> 
> 
> 
> I *believe* I've seen people write code that enables Emacs to distinguish
> 
> between the OS it is running on and run the inits accordingly, etc.
> 
> 
> 
> 
> 
> 
> 
> --
> 
> View this message in context: 
> http://emacs.1067599.n5.nabble.com/sudo-emacs-tp277339.html
> 
> Sent from the Emacs - Help mailing list archive at Nabble.com.

You can use tramp to edit files as root (instead of finding "/home/user/file", 
find "/sudo:root@hostname:/home/user/file").  Maybe there's a way to 
automatically prepend the tramp sudo stuff for certain files.  Take a look at 
http://www.emacswiki.org/emacs/OpenWith for one possible method.

You can certainly split your init file, but that seems like it's solving the 
wrong problem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]