[Top][All Lists]

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

Re: emacs idiom for sudo

From: David Kastrup
Subject: Re: emacs idiom for sudo
Date: Wed, 23 May 2007 00:53:19 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Amy Templeton <address@hidden> writes:

> Tim X <address@hidden> wrote:
>> "Rustom Mody" <address@hidden> writes:
>> > Is there a more convenient way for doing 'root-things' than
>> > -- get out of emacs (maybe suspend)
>> > -- start a shell
>> > -- sudo editor (usually vi) OR su ... password... editor
>> I use tramp to do this. Essentially, using either a 'su' or 'sudo' tramp 
>> method
>> to edit a local file. This is described in the tramp manual.
> What about executing some elisp code as root (obviously including a
> password prompt, not just executing it without any question)? Or is
> it necessary to just start a whole new Emacs? I didn't see anything
> about this in the tramp manual, but I might not be looking hard
> enough.

M-x eshell RET
cd /sudo::/etc RET

and then working on will do quite a number of things at priviledged

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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