[Top][All Lists]

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

Re: sudo error

From: Live System User
Subject: Re: sudo error
Date: Sun, 18 Nov 2018 06:29:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Albinus <address@hidden> writes:

> Live System User <address@hidden> 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:address@hidden:/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:address@hidden:/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:address@hidden:"
                         (ido-read-file-name "File: ")))
    (let ((position (point)))
      (find-alternate-file (concat "/sudo:address@hidden:" buffer-file-name))
      (goto-char position))))

> Best regards, Michael.

reply via email to

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