RE: netrw v103b

2006-08-02 Thread Hugo Ahlenius
|Hmm, well using your example (http://www.grida.no/arctic/) both curl 
|and wget yield an empty file.

Maybe that was a very bad example, if you look at the headers in curl, that
yields a 302 redirect and not an empty page (which should be a 404) - my
wget follows that redirect (there might be a switch for curl to do that as
well). Try something else:
http://mysite.verizon.net/astronaut/vim/
http://maps.grida.no/
http://vim.sourceforge.net/scripts/

(all these return a 200 code, and html)

:)

/Hugo




Re: netrw v103b

2006-08-02 Thread Charles E Campbell Jr

Hugo Ahlenius wrote:


The "http" prefix should tell that this is a URL that should be retrieved
using the http protocol and nothing else. A URL with a trailing slash is
still a fully valid URL, and doesn't not signify directories or anything
like that on the www. I would really like netrw to just pass any
http-prefixed URLs directly to curl/wget, and definately not attaching
anything to them! :)


Hmm, well using your example (http://www.grida.no/arctic/) both curl and wget
yield an empty file.

Regards,
Chip Campbell




RE: netrw v103b

2006-08-02 Thread Hugo Ahlenius
| -Original Message-
| From: A.J.Mechelynck [mailto:[EMAIL PROTECTED]
| IIUC, when an http: URL ends in a slash, or when it names a directory 
| even without a slash, the server retrieves the default page (if any) 
| in the directory in question; and it is up to the server to determine 
| what this default page shall be. On user sites of my ISP, the default 
| page is one of index.htm, INDEX.HTM, index.html or INDEX.HTML, 
| whichever is present, or if none is, a server page saying "The page 
| you are trying to access is not present on this server" with the ISP 
| logo and blue-and-white color scheme; but I've seen other sites where 
| the default page is named index.php, default.html, ... You never get a 
| directory listing unless the default page itself includes a directory 
| listing (e.g., at http://ftp.vim.org/pub/vim/patches/7.0/ you get the 
| contents of the README file _plus_ a directory listing in HTML).

Yep. It is all up to the server, the http protocol doesn't really recognize
concepts such as directories or files, it is URLs. A trailing slash could
return a 30x redirect to a file (such as index|default.xxx) or return a html
web-page. That page, might look like a directory listing, as that
ftp.vim.org example - but the client or the protocol doesn't recognize it as
anything other than a normal http request...

/Hugo




Re: netrw v103b

2006-08-02 Thread A.J.Mechelynck

Hugo Ahlenius wrote:

Hi Charles,

Thanks for the response, I have just updated vimball + netrw again...

| >* URLs with question marks in them, like
| >http://www.grida.no/products.cfm?pageID=13
| I just tried it; this appears to work (under linux).  Is there still a 
| problem with windows/cygwin?


This is still a problem under windows/non-cygwin (I haven't tried under
cygwin). I get "E480: No match[...]"

| >* FTP listings from a windows ftp server
| I think the current version addresses this.

I just tried, and it doesn't seem like that. MS Windows IIS/ftp server
return a non-standard directory listing by default (can be set to do a
unix-type dir listing), and netrw is not parsing them properly. This should
be easy to test, one just needs to start up the ftp service on a windows
machine to see this...

| >* a http url with a trailing slash starts an ftp session, like 
| >http://maps.grida.no/arctic/
| The trailing slash indicates to netrw that its supposed to be handling 
| a directory.  Netrw only supports two methods for browsing 
| directories: ftp and ssh. If the file transfer protocol is either http 
| or ftp, then ftp is used (for browsing).  If the file transfer 
| protocol is anything else, then ssh is used.  Attempts to use wget or 
| curl (two of the programs used to handle http://... ) doesn't yield a 
| listing.

|  Perhaps you want netrw to attach an "index.html" automatically?

The "http" prefix should tell that this is a URL that should be retrieved
using the http protocol and nothing else. A URL with a trailing slash is
still a fully valid URL, and doesn't not signify directories or anything
like that on the www. I would really like netrw to just pass any
http-prefixed URLs directly to curl/wget, and definately not attaching
anything to them! :)

Cheers and thanks,
Hugo

--
Hugo Ahlenius
fraxinus (at) oxel.net
http://www.oxel.net 








IIUC, when an http: URL ends in a slash, or when it names a directory 
even without a slash, the server retrieves the default page (if any) in 
the directory in question; and it is up to the server to determine what 
this default page shall be. On user sites of my ISP, the default page is 
one of index.htm, INDEX.HTM, index.html or INDEX.HTML, whichever is 
present, or if none is, a server page saying "The page you are trying to 
access is not present on this server" with the ISP logo and 
blue-and-white color scheme; but I've seen other sites where the default 
page is named index.php, default.html, ... You never get a directory 
listing unless the default page itself includes a directory listing 
(e.g., at http://ftp.vim.org/pub/vim/patches/7.0/ you get the contents 
of the README file _plus_ a directory listing in HTML).


I don't know if this could raise problems with netrw, and of what kind.


Best regards,
Tony.


RE: netrw v103b

2006-08-02 Thread Hugo Ahlenius
Hi Charles,

Thanks for the response, I have just updated vimball + netrw again...

| >* URLs with question marks in them, like
| >http://www.grida.no/products.cfm?pageID=13
| I just tried it; this appears to work (under linux).  Is there still a 
| problem with windows/cygwin?

This is still a problem under windows/non-cygwin (I haven't tried under
cygwin). I get "E480: No match[...]"

| >* FTP listings from a windows ftp server
| I think the current version addresses this.

I just tried, and it doesn't seem like that. MS Windows IIS/ftp server
return a non-standard directory listing by default (can be set to do a
unix-type dir listing), and netrw is not parsing them properly. This should
be easy to test, one just needs to start up the ftp service on a windows
machine to see this...

| >* a http url with a trailing slash starts an ftp session, like 
| >http://maps.grida.no/arctic/
| The trailing slash indicates to netrw that its supposed to be handling 
| a directory.  Netrw only supports two methods for browsing 
| directories: ftp and ssh. If the file transfer protocol is either http 
| or ftp, then ftp is used (for browsing).  If the file transfer 
| protocol is anything else, then ssh is used.  Attempts to use wget or 
| curl (two of the programs used to handle http://... ) doesn't yield a 
| listing.
|  Perhaps you want netrw to attach an "index.html" automatically?

The "http" prefix should tell that this is a URL that should be retrieved
using the http protocol and nothing else. A URL with a trailing slash is
still a fully valid URL, and doesn't not signify directories or anything
like that on the www. I would really like netrw to just pass any
http-prefixed URLs directly to curl/wget, and definately not attaching
anything to them! :)

Cheers and thanks,
Hugo

--
Hugo Ahlenius
fraxinus (at) oxel.net
http://www.oxel.net 





Re: netrw v103b - No longer can browse directories

2006-08-01 Thread Charles E Campbell Jr

David Fishburn wrote:


I don't like modifying files in the $VIM directory.

I tried this and it still did not fix the problem on my machine (I still
cannot browse the files in my directory).

I also get this:
:pwd
C:\

:e .
"C:\" Illegal file name
 

Please remove all the older versions of netrw prior to installing the 
latest versions of netrw.


The "Illegal file name" message comes up before netrw has anything to do 
with handling it.
However, I see that there's an unwanted "Press ENTER..." prompt.  I want 
to get rid of that;

if there's some ideas on this, please let me know.

Regards,
Chip Campbell



RE: netrw v103b - No longer can browse directories

2006-08-01 Thread David Fishburn
> On Tue 1-Aug-06 1:52am -0600, Hugo Ahlenius wrote:
> 
> > I just upgraded netrw to netrw 103b from Charles Campbell's 
> web-site. 
> > Now it seems like opening a directory by just trying to edit it 
> > doesn't work, like it used to:
> > :e c:\

I am having a similar issue, but I am using 102 from the main Vim website:
http://www.vim.org/scripts/script.php?script_id=1075


...
> If so, either remove it (all 6 files) or make the following 
> change to $vim\plugin\netrwPlugin.vim:
> 
> Replace (right after the "Load Once" line):
> 
> if exists("g:loaded_netrw")
>  finish
> endif
> 
> with:
> 
> if exists("g:loaded_netrwPlugin")
>  finish
> endif
> let g:loaded_netrwPlugin = 1


I don't like modifying files in the $VIM directory.

I tried this and it still did not fix the problem on my machine (I still
cannot browse the files in my directory).

I also get this:
:pwd
C:\

:e .
"C:\" Illegal file name


Dave



Re: netrw v103b

2006-08-01 Thread Charles E Campbell Jr

Hugo Ahlenius wrote:


Hi,

I just upgraded netrw to netrw 103b from Charles Campbell's web-site. Now it
seems like opening a directory by just trying to edit it doesn't work, like
it used to:
:e c:\

Could there be an autocommand that is missing? The only message I get is
"Illegal file name". Browsing directories works through the "Explore"
command though.
 



Be sure to remove all previous installations of netrw.  The current 
version (v103c as of last night)
and subsequent vim distributions should no longer have this problem.  
After removal of all previous
installations of netrw, in particular the netrw that is made available 
from the standard vim distribution,

then do a netrw install.

Also: there's been a small change in vimballs; you'll need the latest 
vimball plugin to handle it properly.
The vimball v18a is backwards compatible -- ie. it can read older 
vimballs, but v17 and earlier vimball

will have trouble with the newer vimballs.


Charles -- if you read this, here are some things that are still outstanding
-- do you have any plans to fix these?

* URLs with question marks in them, like
http://www.grida.no/products.cfm?pageID=13
 



I just tried it; this appears to work (under linux).  Is there still a 
problem with windows/cygwin?



* FTP listings from a windows ftp server
 


I think the current version addresses this.


* a http url with a trailing slash starts an ftp session, like
http://maps.grida.no/arctic/
 



The trailing slash indicates to netrw that its supposed to be handling a 
directory.  Netrw only supports
two methods for browsing directories: ftp and ssh. If the file transfer 
protocol is either http or ftp,
then ftp is used (for browsing).  If the file transfer protocol is 
anything else, then ssh is used.  Attempts
to use wget or curl (two of the programs used to handle http://... ) 
doesn't yield a listing.  Perhaps you

want netrw to attach an "index.html" automatically?

Regards,
Chip Campbell



RE: netrw v103b

2006-08-01 Thread Hugo Ahlenius
| Do you still have the distribution copy of netrw v98 installed to 
| $vimruntime?

Yes I had -- your change did it!

Thanks,
Hugo




Re: netrw v103b

2006-08-01 Thread Bill McCarthy
On Tue 1-Aug-06 1:52am -0600, Hugo Ahlenius wrote:

> I just upgraded netrw to netrw 103b from Charles Campbell's web-site. Now it
> seems like opening a directory by just trying to edit it doesn't work, like
> it used to:
> :e c:\
>
> Could there be an autocommand that is missing? The only message I get is
> "Illegal file name". Browsing directories works through the "Explore"
> command though.
>
> (I am on gvim 7.0 on WinXP, non-cygwin)

I have the same setup and had a similar problem after
installing the new releases to $vim\vimfiles or ~\vimfiles.

Do you still have the distribution copy of netrw v98
installed to $vimruntime?

If so, either remove it (all 6 files) or make the following
change to $vim\plugin\netrwPlugin.vim:

Replace (right after the "Load Once" line):

if exists("g:loaded_netrw")
 finish
endif

with:

if exists("g:loaded_netrwPlugin")
 finish
endif
let g:loaded_netrwPlugin = 1

-- 
Best regards,
Bill