Re: tramp (2.3.1-pre); Can't open file due to wrong local path under MS-Windows
From: Michael Albinus Subject: Re: tramp (2.3.1-pre); Can't open file due to wrong local path under MS-Windows Date: Mon, 19 Sep 2016 14:32:53 +0200 Hello Michael, > Hi Chris, > >> With Tramp in master branch of Emacs, I can't open file through >> "/sshx:" under MS-Windows. The recipe starting from "emacs -Q" looks >> like: >> >> C-x C-f /sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py RET > > It took me a while to reproduce. The usual test cases don't show up this > error. > >> The related messages look like: >> >> Tramp: Inserting ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’... >> Tramp: Encoding remote file >> ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’ with ‘base64 <%s’...done >> Tramp: Decoding local file ‘z:/TEMP/tramp.16808GLL.py’ with >> ‘base64-decode-region’...done >> Tramp: Inserting ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’...failed >> Removing old name: No such file or directory, /TEMP/tramp.16808GLL.py > > Well, you have your temporary directory at z:/TEMP. Per default (at > least in the environment I could use for test), it is C:/Temp or > C:/Users/USER/AppData/Local/Temp or so. > > Since "/Temp" is the same directory as "C:/Temp" in Emacs, the problem > didn't appear to the tests. I didn't notice this. Maybe this is the cause of the bug. And indeed in another bug report (http://misohena.jp/blog/2016-04-23-tramp-error-because-expand-file-name-and-cygwin-drive.html, in Japanese) the temporary directory is also nonstandard. >> I think the problem is due to the commit >> >> c5f466db6f6b8196b8429db8bb7b74f8090d5d3e >> Fix Bug#20821 >> >> * lisp/net/tramp.el (tramp-file-name-handler): >> * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): >> Use `tramp-drop-volume-letter'. (Bug#20821) >> >> Since the volume letter ("z:") is dropped, the path becomes wrong. I >> have read the original report of Bug#20821, but have no idea why the >> `tramp-drop-volume-letter' was used here. Comment out the first call >> to `tramp-drop-volume-letter' in `tramp-sh-handle-expand-file-name' >> did fix the problem for me. Could you please have a look on it? > > I've checked the whole story of that bug. The first change in > `tramp-file-name-handler' is still needed for fixing the bug. But as > you've said, calling `tramp-drop-volume-letter' in > `tramp-sh-handle-expand-file-name' is not needed anymore. I don't recall > why I have applied it that time; maybe it was also needed, and it is now > superfluous due to other changes in Tramp. > > Anyway, I have removed that call as proposed by you, committed to the > repositories. Could you, pls, check? It is fixed for me. Thank you very much. And I will call others to test. >> With many thanks, >> >> Chris > > Best regards, Michael. Regards, Chris ___ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel
Re: tramp (2.3.1-pre); Can't open file due to wrong local path under MS-Windows
Chris Zheng writes: > Hello, Michael. Hi Chris, > With Tramp in master branch of Emacs, I can't open file through > "/sshx:" under MS-Windows. The recipe starting from "emacs -Q" looks > like: > > C-x C-f /sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py RET It took me a while to reproduce. The usual test cases don't show up this error. > The related messages look like: > > Tramp: Inserting ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’... > Tramp: Encoding remote file > ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’ with ‘base64 <%s’...done > Tramp: Decoding local file ‘z:/TEMP/tramp.16808GLL.py’ with > ‘base64-decode-region’...done > Tramp: Inserting ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’...failed > Removing old name: No such file or directory, /TEMP/tramp.16808GLL.py Well, you have your temporary directory at z:/TEMP. Per default (at least in the environment I could use for test), it is C:/Temp or C:/Users/USER/AppData/Local/Temp or so. Since "/Temp" is the same directory as "C:/Temp" in Emacs, the problem didn't appear to the tests. > I think the problem is due to the commit > > c5f466db6f6b8196b8429db8bb7b74f8090d5d3e > Fix Bug#20821 > > * lisp/net/tramp.el (tramp-file-name-handler): > * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): > Use `tramp-drop-volume-letter'. (Bug#20821) > > Since the volume letter ("z:") is dropped, the path becomes wrong. I > have read the original report of Bug#20821, but have no idea why the > `tramp-drop-volume-letter' was used here. Comment out the first call > to `tramp-drop-volume-letter' in `tramp-sh-handle-expand-file-name' > did fix the problem for me. Could you please have a look on it? I've checked the whole story of that bug. The first change in `tramp-file-name-handler' is still needed for fixing the bug. But as you've said, calling `tramp-drop-volume-letter' in `tramp-sh-handle-expand-file-name' is not needed anymore. I don't recall why I have applied it that time; maybe it was also needed, and it is now superfluous due to other changes in Tramp. Anyway, I have removed that call as proposed by you, committed to the repositories. Could you, pls, check? > With many thanks, > > Chris Best regards, Michael. ___ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel
tramp (2.3.1-pre); Can't open file due to wrong local path under MS-Windows
Hello, Michael. With Tramp in master branch of Emacs, I can't open file through "/sshx:" under MS-Windows. The recipe starting from "emacs -Q" looks like: C-x C-f /sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py RET The related messages look like: Tramp: Inserting ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’... Tramp: Encoding remote file ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’ with ‘base64 <%s’...done Tramp: Decoding local file ‘z:/TEMP/tramp.16808GLL.py’ with ‘base64-decode-region’...done Tramp: Inserting ‘/sshx:r...@xxx.xxx.xxx.xx#x:/root/htpasswd.py’...failed Removing old name: No such file or directory, /TEMP/tramp.16808GLL.py I think the problem is due to the commit c5f466db6f6b8196b8429db8bb7b74f8090d5d3e Fix Bug#20821 * lisp/net/tramp.el (tramp-file-name-handler): * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): Use `tramp-drop-volume-letter'. (Bug#20821) Since the volume letter ("z:") is dropped, the path becomes wrong. I have read the original report of Bug#20821, but have no idea why the `tramp-drop-volume-letter' was used here. Comment out the first call to `tramp-drop-volume-letter' in `tramp-sh-handle-expand-file-name' did fix the problem for me. Could you please have a look on it? Please let me know if you want more information. With many thanks, Chris ___ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel