[Top][All Lists]

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

Re: ange-ftp problem

From: Stefan Monnier
Subject: Re: ange-ftp problem
Date: 29 Jan 2004 17:24:21 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> Sorry, I assumed that you have all necessary tools to reproduce this
> problem.  I didn't expect you use neither dired nor ange-ftp with
> ftp server.

I do use ange-ftp, but with all the ftp servers I know of have been either
turned off or at least made read-only.

> One of the FTP servers that returns an error in case when the file name is
> used as a directory name is ProFTPD 1.2.9.

Returning an error is good.  It seems they all do.

>   ange-ftp-insert-directory("testfile" "--dired -ald" nil nil)

I see: dired expects to be able to say (insert-directory <file>) and get
the same as "ls <file>", i.e. a listing of that single file (i.e. a single
line that dired inserts in its buffer).

But ange-ftp doesn't know how to do that.  It is indeed due to the change
that Michael pointed out: we turn `ls -ald <path>' into `cd <path>;
ls -ald' which of course only works if <path> is a directory.  Problem is
that with many recent FTP servers nowadays we just can't do `ls -ald <path>'
because when there are two args, ls assumes that the first is a path and
the seconde is a local destination file into which we should put the
listing's content.
In the case of NetBSD, they justified this behavior by saying that Emacs
uses things that are not supported by the official FTP protocol.

I think in the particular case where FULL-DIRECTORY-P is nil,
ange-ftp-insert-directory might want to use ls-lisp to generate the one-line
of ls output.  Note that ls-lisp's insert-directory does not behave the same
as the one from files.el when it comes to (insert-directory "/usr" "-al")
and the docstring is sufficiently vague to know which one is wrong.


reply via email to

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