unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* open files as root
@ 2009-08-29 12:36 henry atting
  2009-08-29 13:07 ` David Kastrup
  2009-08-29 13:40 ` Neal Becker
  0 siblings, 2 replies; 7+ messages in thread
From: henry atting @ 2009-08-29 12:36 UTC (permalink / raw)
  To: help-gnu-emacs

Is there another way as with tramp to open files as root within emacs?
(Since I am sure that tramp and I never will be friends in this life)

Regards
henry
-- 
http://literaturlatenight.de


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

* Re: open files as root
  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 13:40 ` Neal Becker
  1 sibling, 1 reply; 7+ messages in thread
From: David Kastrup @ 2009-08-29 13:07 UTC (permalink / raw)
  To: help-gnu-emacs

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.

-- 
David Kastrup


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

* Re: open files as root
  2009-08-29 12:36 open files as root henry atting
  2009-08-29 13:07 ` David Kastrup
@ 2009-08-29 13:40 ` Neal Becker
  1 sibling, 0 replies; 7+ messages in thread
From: Neal Becker @ 2009-08-29 13:40 UTC (permalink / raw)
  To: help-gnu-emacs

henry atting wrote:

> Is there another way as with tramp to open files as root within emacs?
> (Since I am sure that tramp and I never will be friends in this life)
> 
> Regards
> henry
If you have setup sudo:

/sudo:root@localhost:/tmp





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

* Re: open files as root
  2009-08-29 13:07 ` David Kastrup
@ 2009-08-29 16:13   ` henry atting
  2009-08-29 17:48     ` Thierry Volpiatto
  2009-08-31 13:34     ` Anselm Helbig
  0 siblings, 2 replies; 7+ messages in thread
From: henry atting @ 2009-08-29 16:13 UTC (permalink / raw)
  To: help-gnu-emacs

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

-- 
http://literaturlatenight.de


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

* Re: open files as root
  2009-08-29 16:13   ` henry atting
@ 2009-08-29 17:48     ` Thierry Volpiatto
  2009-08-31 13:34     ` Anselm Helbig
  1 sibling, 0 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2009-08-29 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

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





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

* Re: open files as root
  2009-08-29 16:13   ` henry atting
  2009-08-29 17:48     ` Thierry Volpiatto
@ 2009-08-31 13:34     ` Anselm Helbig
  2009-09-01  6:05       ` henry atting
  1 sibling, 1 reply; 7+ messages in thread
From: Anselm Helbig @ 2009-08-31 13:34 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 882 bytes --]

Hi!

At Sat, 29 Aug 2009 18:13:29 +0200,
henry atting <nsmp_01@online.de> wrote:
> 
> 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.)

No need to drop zsh, just set a proper regex for
tramp-shell-prompt-pattern. This is what works for me:

  (setq tramp-shell-prompt-pattern "^[^$>\n]*[#$%>] *\\(\[[0-9;]*[a-zA-Z] *\\)*")

HTH, 

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


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

* Re: open files as root
  2009-08-31 13:34     ` Anselm Helbig
@ 2009-09-01  6:05       ` henry atting
  0 siblings, 0 replies; 7+ messages in thread
From: henry atting @ 2009-09-01  6:05 UTC (permalink / raw)
  To: help-gnu-emacs

On Mo, Aug 31 2009, Anselm Helbig wrote:

> Hi!
>
> At Sat, 29 Aug 2009 18:13:29 +0200,
> henry atting <nsmp_01@online.de> wrote:
>> 
>> 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.)
>
> No need to drop zsh, just set a proper regex for
> tramp-shell-prompt-pattern. This is what works for me:
>
>   (setq tramp-shell-prompt-pattern "^[^$>\n]*[#$%>] *\\(\[[0-9;]*[a-zA-Z] *\\)*")
>
> HTH, 
>
> Anselm

Thanks Anselm, yes that helps.

Such a thrill: tramp and me are real partners now.

henry

-- 
http://literaturlatenight.de


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

end of thread, other threads:[~2009-09-01  6:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-08-31 13:34     ` Anselm Helbig
2009-09-01  6:05       ` henry atting
2009-08-29 13:40 ` Neal Becker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).