Michael Albinus <[email protected]> writes:

> Live System User <[email protected]> writes:
>
>> Hi,
>
> Hi,
>
>>         I am experiencing some problems with TRAMP and the
>>         sudo method.
>
>> 15:48:28.041632 tramp-sh-handle-vc-registered (3) # Checking `vc-registered' 
>> for /sudo:root@localhost:/usr/lib64/virtualbox/SUPInstall...
>> 15:48:45.914624 tramp-sh-handle-vc-registered (3) # Error in 1st pass of 
>> `vc-registered': (user-error Not a Tramp file name: "~")
>
> Strange. The file name in both lines shall be the same
> (/sudo:root@localhost:/usr/lib64/virtualbox/SUPInstall). I have no idea
> why in the second line it is "~". Maybe some configuration change?
>
> Do you experience the same problem when using "emacs -Q"?

  I use 'sudo-edit'


(with-eval-after-load "tramp"
  (add-to-list 'tramp-default-proxies-alist
               '(nil "\\`root\\'" "/ssh:%h:"))
  (add-to-list 'tramp-default-proxies-alist
               '((regexp-quote (system-name)) nil nil)))


(defun sudo-edit (&optional arg)
  (interactive "P")
  (if (or arg (not buffer-file-name))
      (find-file (concat "/sudo:root@localhost:"
                         (ido-read-file-name "File: ")))
    (let ((position (point)))
      (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))
      (goto-char position))))

>
> Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to