> In principle, I like your patch, but what happens for people
> using "\" in their filenames on Unix?
I'm well aware of this, but this file names will probably never work
with the windows native expand-file-name.
> Hm. Maybe tramp-handle-expand-file-name should do the work
> itself for the remote file name, rather than calling on the
> standard expand-file-name.
That is probably the clean way to do this.
> Could you look at the value of directory-sep-char on your
> If it is ?\\, then all is proper and we could just
> replace directory-sep-char with "/" always. Right?
Yes. Using this:
--- tramp.el 2002/01/06 14:02:38 2.68
+++ tramp.el 2002/01/10 07:51:37
@@ -2315,8 +2315,9 @@
;; expand-file-name (this does "/./" and "/../").
multi-method method user host
- (tramp-run-real-handler 'expand-file-name (list path))))))))
+ (let ((directory-sep-char ?/))
+ (tramp-run-real-handler 'expand-file-name (list path)))))))))
;; Remote commands.
instead of my original patch works. Please note that this does not solve
the above problem.
> What does (file-name-absolute-p "/foo/bar") return on your
> XEmacs? I wonder if I can use it.
> Also, what does (file-name-as-directory "foo/bar") return on
> your XEmacs? I'm afraid it might append a backslash rather
> than a slash :-(
> And finally, is there a variable like directory-sep-char in
> Emacs? Does it work to do
> (let ((directory-sep-char ?/))
> (expand-file-name "/foo/bar/./baz"))
> rather than calling it directly?
(let ((directory-sep-char ?/))
(\\dionysos\br.lehre is the current directory. In case you do not know
the windows UNC path syntax: this does mean: host "dionysos", share
"br.lehre", subdirectory foo/bar/baz)