tramp-devel
[Top][All Lists]
Advanced

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

Re: The “//” fix confuses cygwin-mount


From: Andy Moreton
Subject: Re: The “//” fix confuses cygwin-mount
Date: Fri, 28 Sep 2018 18:15:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

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:address@hidden:/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 "/")




reply via email to

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