From: Michael Albinus <michael.albinus@gmx.de>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: File names with spaces and tramp/ftp
Date: Mon, 11 Feb 2008 16:39:28 +0100 [thread overview]
Message-ID: <nq7ihb8pu7.fsf@alcatel-lucent.de> (raw)
In-Reply-To: <47AA3211.3010804@gmail.com> (Lennart Borgman's message of "Wed, 06 Feb 2008 23:17:53 +0100")
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
Hi Lennart,
sorry for the delay; it's always a problem for me to catch a w32
machine for testing.
> There is a problem in tramp/ftp with file names that contains spaces,
> at least on w32. I do not know if it is possible to cure this and how
> to do it.
I can reproduce it here. Tested with GNU Emacs 22.1 and the default
"ftp.exe" binary found in "c:\WINDOWS\system32\", the machine runs
"Windows XP SP2".
My test case is copying the local file "u:\file name with spaces" to
the remote directory "/tmp".
The first problem is that ange-ftp does not encode the local file name
when passing to the "put" command. It uses the command
put u:/file name with spaces /tmp/file\ name\ with\ spaces
The result is an empty file "name" on the FTP server. But even
encoding the local file name like this does not work:
put u:/file\ name\ with\ spaces /tmp/file\ name\ with\ spaces
results in an empty file "name\" on the remote server. Note that with
an FTP client on a GNU/Linux machine, this runs OK.
A sufficient encoding seems to be using double quotes:
put "u:/file name with spaces" "/tmp/file name with spaces"
gives the expected results.
I could change ange-ftp to this encoding style of file names; but I am
anxious: it could break ange-ftp on other systems, where double quotes
might not be supported. No idea whether double quote encoding works
with all possible combinations of FTP clients and servers.
Maybe the best would be a user option to decide the kind of quoting
file names? Or is it already sufficient just to encode with double
quotes, when the local host is w32? What do people think?
Best regards, Michael.
PS: As far as I see, Tramp is not involved.
next prev parent reply other threads:[~2008-02-11 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 22:17 File names with spaces and tramp/ftp Lennart Borgman (gmail)
2008-02-11 15:39 ` Michael Albinus [this message]
2008-02-11 20:18 ` Eli Zaretskii
2008-02-12 3:16 ` Stefan Monnier
2008-02-12 13:00 ` Michael Albinus
2008-02-12 19:58 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nq7ihb8pu7.fsf@alcatel-lucent.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.