[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File names with spaces and tramp/ftp

From: Michael Albinus
Subject: Re: File names with spaces and tramp/ftp
Date: Tue, 12 Feb 2008 14:00:48 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

Stefan Monnier <address@hidden> writes:

>>> 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.
>> Does it help to use shell-quote-argument?
> I doubt it: the FTP command is not passed through a shell.
> In some cases it may work, of course.

But it is a good approximation. Under GNU/Linux, we have

  (shell-quote-argument "file name with spaces 'and \"quotes")
    => "file\\ name\\ with\\ spaces\\ \\'and\\ \\\"quotes"

W32 systems do 

  (shell-quote-argument "file name with spaces 'and \"quotes")
    => "\"file name with spaces 'and \\\"quotes\""

Both quotations work with stock FTP clients except the quotation of
"\"" on W32 systems: it shall be "\"\" instead of "\\\"". But this
could be adapted, and "\"" isn't so usual on W32 file names. Btw, I
could not create the file "~/file name with spaces 'and \"quotes" on
W32 in Emacs; this worked only with Emacs under GNU/Linux.

Lennart (et al), could you, please, test whether the appended patch
works for you for file names with spaces? And that there isn't any
other regression?

The patch is towards ange-ftp.el in the trunk.

>         Stefan

Best regards, Michael.

Attachment: txtN1qQyyd6Xr.txt
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]