tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.6.0 nil/nil); sudo method: with tramp 2.6.0 connection prob


From: Michael Albinus
Subject: Re: tramp (2.6.0 nil/nil); sudo method: with tramp 2.6.0 connection problem
Date: Sun, 01 Jan 2023 11:55:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

"C. Conrad" <electric.monk@posteo.net> writes:

Hi,

> Since 2.6.0 - this worked with prior tramp versions (from melpa):
>
> Opening a file as non-root in /etc/...
>
> then M-x sudo-edit
>
> (defun sudo-edit (&optional arg)
>   "Edit currently visited file as root."
>   (interactive "P")
>   (if (or arg (not buffer-file-name))
>       (find-file (concat "/sudo:root@localhost:"
>                          (ido-read-file-name "Find file(as root): ")))
>     (find-alternate-file (concat "/sudo:root@localhost:"
> buffer-file-name))))
>
> =>
>
> tramp-error: Tramp failed to connect.  If this happens repeatedly, try
>     ‘M-x tramp-cleanup-this-connection’
>
> Did a tramp-cleanup-all-connections before.

I've tried to reproduce it in a clean environment. I did the following:

- ~/src/emacs-28/src/emacs -Q -L ~/.emacs.d/elpa/tramp-2.6.0 -l ido /etc/hosts

- Eval your sudo-edit function in *scratch*

- In buffer "hosts", call M-x sudo-edit

Everything works as expected. Could you pls try to reproduce it similarly?

Best regards, Michael.



reply via email to

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