The following parts of tramp-test04-substitute-in-file-name are failing on Cygwin (and probably also on MS-Windows, but I can't easily test that): (should (string-equal (substitute-in-file-name "/method:host://foo") "/method:host:/foo")) (should (string-equal (substitute-in-file-name "/method:host:/path///foo") "/foo")) (should (string-equal (substitute-in-file-name "/method:host://~foo") "/~foo")) Here are the corresponding evaluations: (substitute-in-file-name "/method:host://foo") "/method:host://foo" (substitute-in-file-name "/method:host:/path///foo") "//foo" (substitute-in-file-name "/method:host://~foo") "//~foo" This is a consequence of the fact that Tramp calls substitute-in-file-name on the local part of the file name: (substitute-in-file-name "//foo") "//foo" (substitute-in-file-name "/path///foo") "//foo" (substitute-in-file-name "//~foo") "//~foo" "//" has a special meaning at the beginning of a file name on Cygwin and MS-Windows; see the comment near the beginning of search_embedded_absfilename. So I don't think there's a real bug here. Maybe the expected result of the test should simply be adjusted, as in the attached patch. Someone who builds on MS-Windows would have to check this. Ken