On Fri 28 Sep 2018, Michael Albinus wrote:
> Ahh, indeed. I could reproduce the problem then. The following patch
> seems to fix the problem, could you pls test? (The line numbers might
> differ a little bit)
>
> diff --git a/lisp/tramp.el b/lisp/tramp.el
> index 92d165e4..0d56ec91 100644
> --- a/lisp/tramp.el
> +++ b/lisp/tramp.el
> @@ -3625,7 +3625,11 @@ support symbolic links."
>           (setq filename
>                 (concat (file-remote-p filename)
>                         (replace-regexp-in-string
> -                           "\\`/+" "/" (substitute-in-file-name 
> localname)))))))
> +                           "\\`/+" "/"
> +                        ;; We must disable cygwin file name
> +                        ;; handlers and alike.
> +                        (tramp-run-real-handler
> +                         'substitute-in-file-name (list localname))))))))
>        ;; "/m:h:~" does not work for completion.  We use "/m:h:~/".
>        (if (and (stringp localname) (string-equal "~" localname))
>         (concat filename "/")

I assume your patch is against standalone tramp. After patching emacs
master, the problem is fixed:

(substitute-in-file-name "/method:host:/foo")
#("/method:ajm@host:/foo" 8 11 (tramp-default t))

Here is what I tested in emacs master:

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 567701a9b2..be843a4054 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3585,7 +3585,12 @@ tramp-handle-substitute-in-file-name
            (setq filename
                  (concat (file-remote-p filename)
                          (replace-regexp-in-string
-                           "\\`/+" "/" (substitute-in-file-name 
localname)))))))
+                           "\\`/+" "/"
+                          ;; We must disable cygwin file name
+                          ;; handlers and alike.
+                          (tramp-run-real-handler
+                           'substitute-in-file-name (list localname))))))))
       ;; "/m:h:~" does not work for completion.  We use "/m:h:~/".
       (if (and (stringp localname) (string-equal "~" localname))
          (concat filename "/")


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

Reply via email to