tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp-dissect-file-name new user-error message


From: Michael Albinus
Subject: Re: tramp-dissect-file-name new user-error message
Date: Thu, 28 Mar 2013 12:43:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Thierry Volpiatto <address@hidden> writes:

>> You only need to wrap around `file-name-all-completions' call.
> I don't use this.

"or whatever you apply to get completion candidates" :-)

> I use `tramp-dissect-file-name' since some years now with no problems:
> (this is now called with non-essential let-bound to t)
>
> (defun helm-create-tramp-name (fname)
>   "Build filename for `helm-pattern' like /su:: or /sudo::."
>   (apply #'tramp-make-tramp-file-name
>          (loop with v = (tramp-dissect-file-name fname)
>                for i across v collect i)))
>
> So what should I use instead ?

In your special case (since you don't use `file-name-all-completions') I
cannot tell what to use else. I just wanted to point out, that there's no
guarantee that `tramp-dissect-file-name' will always do it the same way.

Honestly, I even don't understand what `helm-create-tramp-name' is good
for ...

If you only want to expand default values of a Tramp file name, then you
could do like this (using "/su::" as example):

(concat (file-remote-p "/su::") (file-remote-p "/su::" 'localname))

Best regards, Michael.



reply via email to

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