GNU bug report logs -
#19463
25.0.50; Files with special chars in the name cannot be written on MS Windows
Previous Next
Reported by: Michael Albinus <michael.albinus <at> gmx.de>
Date: Mon, 29 Dec 2014 15:58:02 UTC
Severity: normal
Found in version 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19463 in the body.
You can then email your comments to 19463 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Mon, 29 Dec 2014 15:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Michael Albinus <michael.albinus <at> gmx.de>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Mon, 29 Dec 2014 15:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The following problem I have observed when running tramp-tests.el on MS
Windows. It isn't a Tramp problem, 'tho.
Files with special characters in their file name cannont be written
locally. The following test is derived from tramp-test30-special-characters.
Note, that this testcase runs w/o problems under GNU/Linux.
--8<---------------cut here---------------start------------->8---
(dolist
(file
'(" foo\tbar baz\t"
"$foo$bar$$baz$"
"-foo-bar-baz-"
"%foo%bar%baz%"
"&foo&bar&baz&"
"?foo?bar?baz?"
"*foo*bar*baz*"
"'foo\"bar'baz\""
"#foo~bar#baz~"
"!foo|bar!baz|"
":foo;bar:baz;"
"<foo>bar<baz>"
"(foo)bar(baz)"
"[foo]bar[baz]"
"{foo}bar{baz}"))
(condition-case err
(write-region file nil (expand-file-name file temporary-file-directory))
(error (message "%s" (error-message-string err)))))
=>
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/ foo bar baz
Wrote c:/Users/Michael/AppData/Local/Temp/$foo$bar$$baz$
Wrote c:/Users/Michael/AppData/Local/Temp/-foo-bar-baz-
Wrote c:/Users/Michael/AppData/Local/Temp/%foo%bar%baz%
Wrote c:/Users/Michael/AppData/Local/Temp/&foo&bar&baz&
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/?foo?bar?baz?
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/*foo*bar*baz*
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/'foo"bar'baz"
Wrote c:/Users/Michael/AppData/Local/Temp/#foo~bar#baz~
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/!foo|bar!baz|
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/:foo;bar:baz;
Opening output file: invalid argument, c:/Users/Michael/AppData/Local/Temp/<foo>bar<baz>
Wrote c:/Users/Michael/AppData/Local/Temp/(foo)bar(baz)
Wrote c:/Users/Michael/AppData/Local/Temp/[foo]bar[baz]
Wrote c:/Users/Michael/AppData/Local/Temp/{foo}bar{baz}
--8<---------------cut here---------------end--------------->8---
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Mon, 29 Dec 2014 16:38:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19463 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Mon, 29 Dec 2014 16:56:48 +0100
>
>
> The following problem I have observed when running tramp-tests.el on MS
> Windows. It isn't a Tramp problem, 'tho.
It's a basic documented limitation of the file APIs, at least on the
level that Emacs on Windows uses them. See
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
(look under "Naming Conventions").
> Files with special characters in their file name cannont be written
> locally. The following test is derived from tramp-test30-special-characters.
> Note, that this testcase runs w/o problems under GNU/Linux.
This is expected. What exactly do you want us to do with this issue?
Unless we radically change the way we do file I/O (similarly to what
Cygwin does), which is a very large job, this issue cannot be
resolved.
We simply should not use such file names on Windows.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Mon, 29 Dec 2014 21:56:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 19463 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> It's a basic documented limitation of the file APIs, at least on the
> level that Emacs on Windows uses them. See
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
>
> (look under "Naming Conventions").
Thanks for the link. So I will adapt that test for the MS-Windows case.
>> Files with special characters in their file name cannont be written
>> locally. The following test is derived from tramp-test30-special-characters.
>> Note, that this testcase runs w/o problems under GNU/Linux.
>
> This is expected. What exactly do you want us to do with this issue?
> Unless we radically change the way we do file I/O (similarly to what
> Cygwin does), which is a very large job, this issue cannot be
> resolved.
>
> We simply should not use such file names on Windows.
At least we shall mention this restriction, for example in
(info "(emacs) Windows Files")
For me as native user it is not obvious, that " " is allowed, but "\t" isn't.
In your reference link, other reserved file names are also mentioned,
like NUL etc. This is something one shall know as well.
Maybe it is not necessary to document all those restrictions in the
Emacs manual. But a hint might be useful, combined with a reference
(maybe the link you have given).
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Tue, 30 Dec 2014 03:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 19463 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: 19463 <at> debbugs.gnu.org
> Date: Mon, 29 Dec 2014 22:55:13 +0100
>
> > This is expected. What exactly do you want us to do with this issue?
> > Unless we radically change the way we do file I/O (similarly to what
> > Cygwin does), which is a very large job, this issue cannot be
> > resolved.
> >
> > We simply should not use such file names on Windows.
>
> At least we shall mention this restriction, for example in
> (info "(emacs) Windows Files")
I don't mind documenting it, but traditionally there was objection to
talking too much about Windows in our manuals.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Tue, 30 Dec 2014 08:30:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 19463 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> At least we shall mention this restriction, for example in
>> (info "(emacs) Windows Files")
>
> I don't mind documenting it, but traditionally there was objection to
> talking too much about Windows in our manuals.
The section I have referenced to is called "G.3 File Names on MS-Windows".
Maybe it is acceptable to add a paragraph there :-)
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Tue, 30 Dec 2014 16:03:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 19463 <at> debbugs.gnu.org (full text, mbox):
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: 19463 <at> debbugs.gnu.org
> Date: Tue, 30 Dec 2014 09:29:16 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> At least we shall mention this restriction, for example in
> >> (info "(emacs) Windows Files")
> >
> > I don't mind documenting it, but traditionally there was objection to
> > talking too much about Windows in our manuals.
>
> The section I have referenced to is called "G.3 File Names on MS-Windows".
> Maybe it is acceptable to add a paragraph there :-)
That's the User Manual. I thought you were talking about the ELisp
manual, which is where I think this kind of information belongs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#19463; Package
emacs.
(Tue, 30 Dec 2014 17:40:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 19463 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Michael Albinus <michael.albinus <at> gmx.de>
>> Cc: 19463 <at> debbugs.gnu.org
>> Date: Tue, 30 Dec 2014 09:29:16 +0100
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> >> At least we shall mention this restriction, for example in
>> >> (info "(emacs) Windows Files")
>> >
>> > I don't mind documenting it, but traditionally there was objection to
>> > talking too much about Windows in our manuals.
>>
>> The section I have referenced to is called "G.3 File Names on MS-Windows".
>> Maybe it is acceptable to add a paragraph there :-)
>
> That's the User Manual. I thought you were talking about the ELisp
> manual, which is where I think this kind of information belongs.
This information is important for the User Manual. People like me, who
don't know too much about MS Windows, would check this first. And even
MS Windows aficionados might not know such details about file names.
In the Elisp Manual, something is already said about these restrictions
("... On some filesystems (notably, MS-Windows), trailing whitespace
characters in file names are silently and automatically ignored.") This
could be extended of course. But I believe it would be sufficient to
give a reference to the User Manual. It doesn't happen too often, that a
developer must parse file names dedicated to MS Windows.
Best regards, Michael.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility.
(Sat, 31 Jan 2015 16:35:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Michael Albinus <michael.albinus <at> gmx.de>:
bug acknowledged by developer.
(Sat, 31 Jan 2015 16:35:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 19463-done <at> debbugs.gnu.org (full text, mbox):
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: 19463 <at> debbugs.gnu.org
> Date: Tue, 30 Dec 2014 18:38:57 +0100
>
> This information is important for the User Manual. People like me, who
> don't know too much about MS Windows, would check this first. And even
> MS Windows aficionados might not know such details about file names.
OK, done on the release branch.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Sun, 01 Mar 2015 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.