On Thu, Dec 03, 2009 at 01:06:54PM +0100, Karsten Hopp wrote:
> Hi,
> 
> I've got a bugreport that you might end up with invalid syntax files 
> when the automated download for new spell files is used.
> That's https://bugzilla.redhat.com/show_bug.cgi?id=518791
> 
> It looks like elinks -dump formats the contents of the downloaded file, 
> try p.e.
> 
> elinks 'http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl' -dump > 
> de.utf-8.spl_elinks   and compare it with
> lynx 'http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl' -dump > 
> de.utf-8.spl_lynx
> 
> This can be avoided by using -source instead of -dump for the elinks 
> command in autoload/netrw.vim

I've previously sent a patch to Chip (attached here too) to revert
netrw's default behavior back to using -source instead of -dump, but got
no response.  My reasoning was mainly that it was a change in behavior
and wasn't consistent among the tools netrw will use for http downloads.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 2dadcfa..f058b92 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -99,19 +99,13 @@ endif
 if !exists("g:netrw_http_cmd")
  if executable("elinks")
   let g:netrw_http_cmd = "elinks"
-  if !exists("g:netrw_http_xcmd")
-   let g:netrw_http_xcmd= "-dump >"
-  endif
+  call s:NetrwInit("g:netrw_http_xcmd","-source >")
  elseif executable("links")
   let g:netrw_http_cmd = "links"
-  if !exists("g:netrw_http_xcmd")
-   let g:netrw_http_xcmd= "-dump >"
-  endif
+  call s:NetrwInit("g:netrw_http_xcmd","-source >")
  elseif executable("curl")
   let g:netrw_http_cmd	= "curl"
-  if !exists("g:netrw_http_xcmd")
-   let g:netrw_http_xcmd= "-o"
-  endif
+  call s:NetrwInit("g:netrw_http_xcmd","-o")
  elseif executable("wget")
   let g:netrw_http_cmd	= "wget"
   call s:NetrwInit("g:netrw_http_xcmd","-q -O")

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui