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

Re: ftp oddities

>>>>> In [emacs-w3m : No.07963] Elias Oltmanns wrote:

> Hi altogether,

> I just noticed that emacs-w3m's ftp implementation seems to be rather
> odd. Since I'm behind a firewall, I use
> (setq ange-ftp-try-passive-mode t)

I'm normally behind the firewall but I've never needed that.
I tried it and I got an error at the first time about to connect
to the ftp server using ange-ftp, not emacs-w3m.  This is an
error, not a warning.  Even so, the ftp connection was still
activated then, so I was successful to list the remote directory
for the second time.

> However, as long as w3m-use-ange-ftp is nil, the following message
> appears in the echo area when I go to ftp://ftp.gwdg.de/pub/
> Cannot retrieve URL: ftp://ftp.gwdg.de/pub/ (exit status: 0)

Probably, it is because the firewall doesn't allow the ftp
connection or you haven't set the ftp_proxy environment variable.
I've set ftp_proxy as the same value as http_proxy.

> Yet, the contents of the directory is listed correctly and I can
> browse the ftp-server without any difficulties.

I'm confused.  Is it a problem related to emacs-w3m?  In other
words, did you write about when you used emacs-w3m, setting
w3m-use-ange-ftp as t?  Emacs-w3m uses neither ange-ftp nor
ange-ftp-try-passive-mode if w3m-use-ange-ftp is nil.  In the
case where you used emacs-w3m, setting w3m-use-ange-ftp as t, it
will stop if the value of ange-ftp-try-passive-mode is not
suitable to the connection, because of an error.

> Moreover, this message doesn't appear in the *Messages* buffer where
> everything looks all right at the first glance.

If you wrote about the `Cannot retrieve URL...' message, I'll
fix it so that it is put into not only the echo area but also
the *Messages* buffer.

> A bit strange though that there is a line saying
> Trying passive mode ... failed.

It is issued by ange-ftp together with an error signal.

> Also, only messages referring to the first ftp-server I enter in a
> single session seem to appear in *Messages*.
> Maybe the last things I mentioned are actually related to
> ange-ftp. The error message I cited in the beginning though is
> definitely caused by emacs-w3m and should be dealt with.

Since emacs-w3m issues a lot of messages, we use the w3m-message
function which only displays messages in the echo area without
logging rather than the `message' function so as not to fill up
the *Messages* buffer.  Although I don't think it is important
to log all the messages, you can alter the behavior by
customizing the w3m-verbose variable (I noticed I should improve
the docstring for it ;-).