On Thu, May 28, 2009 at 02:55:08PM -0400, James Vega wrote: > On Thu, Apr 30, 2009 at 03:31:09PM -0400, James Vega wrote: > > When reading an HTTP URL with NetRW, the default behavior varies > > depending on which binaries are detected on the user's system. If > > (e)links is detected, NetRW retrieves the rendered HTML instead of the > > source. > > > > This is inconsistent with the default behavior when using the other > > binaries and breaks expected behavior from previous NetRW versions. > > > > Could the defaults be changed back to the previous behavior and the > > g:netrw_http_xcmd documentation be updated to show how to get the > > rendered text? > > Attached patch does this.
Have you had a chance to look at this? Patch attached again in case you didn't get the original. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@debian.org>
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") diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 362731c..ad3420b 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -176,17 +176,20 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2 sftp: *g:netrw_sftp_cmd* = "sftp" *g:netrw_http_xcmd* : the option string for http://... protocols are - specified via this variable and may be independently oveerridden. + specified via this variable and may be independently oveerridden. > - elinks : "-dump >" - links : "-dump >" + elinks : "-source >" + links : "-source >" curl : "-o" wget : "-q -O" fetch : "-o" +< + For example, if your system has elinks but you want to see the text + rendering rather than the html source, you may wish to have > - For example, if your system has elinks but you want to see the html - source in detail rather than a text rendering thereof, you may wish - to have let g:netrw_http_xcmd= "-source >" in your .vimrc. + let g:netrw_http_xcmd= "-dump >" +< + in your .vimrc. READING *netrw-read* *netrw-nread* {{{2
signature.asc
Description: Digital signature