[Top][All Lists]

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

Re: /sudo:<user>@<file> works, /sudo:<user>@localhost:/<file>

From: Michael Albinus
Subject: Re: /sudo:<user>@<file> works, /sudo:<user>@localhost:/<file> doesn't
Date: Wed, 23 Jan 2008 09:46:14 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

Gilles Pion <address@hidden> writes:

>> (defalias 'tramp-local-host-p 'ignore)
> fixed, thanks

OK, here is a real fix: could you, please, test?

(defun tramp-local-host-p (vec)
  "Return t if this points to the local host, nil otherwise."
  ;; We cannot use `tramp-file-name-real-host'.  A port is an
  ;; indication for an ssh tunnel or alike.
  (let ((host (tramp-file-name-host vec)))
     (stringp host)
      (concat "^" (regexp-opt (list "localhost" (system-name)) t) "$") host)
     ;; The local temp directory must be writable for the other user.
       (tramp-file-name-method vec)
       (tramp-file-name-user vec)

> Gilles

Best regards, Michael.

reply via email to

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