all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: open files as root
Date: Sat, 29 Aug 2009 19:48:11 +0200	[thread overview]
Message-ID: <87k50mo6jo.fsf@tux.homenetwork> (raw)
In-Reply-To: 8763c661jq.fsf@online.de

Hi Henry,
you can use a function like this:

,----
| (defun find-file-as-root (file)
|   (interactive "fFindFileAsRoot: ")
|   (find-file (concat "/su::" (expand-file-name file))))
`----

Replace /su: by /sudo: if you are a sudo user (Debian?)

henry atting <nsmp_01@online.de> writes:

> On Sa, Aug 29 2009, David Kastrup wrote:
>
>> henry atting <nsmp_01@online.de> writes:
>>
>>> Is there another way as with tramp to open files as root within emacs?
>>
>> No.
>>
>>> (Since I am sure that tramp and I never will be friends in this life)
>>
>> Partners is all you need.
>
> Okay, tramp won, I switched from zsh (which impressing functionality I
> don't use anyway) back to bash.
>
> (I now the appropriate lines which are to add to .zshrc, but this time
> they don't work – another time they did.)
>
> henry

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France





  reply	other threads:[~2009-08-29 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-29 12:36 open files as root henry atting
2009-08-29 13:07 ` David Kastrup
2009-08-29 16:13   ` henry atting
2009-08-29 17:48     ` Thierry Volpiatto [this message]
2009-08-31 13:34     ` Anselm Helbig
2009-09-01  6:05       ` henry atting
2009-08-29 13:40 ` Neal Becker

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=87k50mo6jo.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --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.