[Vim-l] Template:Help - Simple fixes

John Beckett johnb.beckett at gmail.com
Sun Jun 24 06:27:54 UTC 2007


Bastl has done a great job getting everything working, but
I think we need to re-visit how Template:Help works.

1. Modify Template:Help
- Change "sf" to "sourceforge" in "vimplugin.sf.net".
- Change "tag={{{1}}}" so parameter 1 is urlencoded.

2. Modify the CGI python 'help' script on the
   vimplugin.sourceforge.net web site:
- Change "sf" to "sourceforge" in line:
    baseurl="http://vimdoc.sf.net/htmldoc/"
- In "+baseurl+files[tag]" change "tag" so it is urldecoded
  (but do not urldecode the second "tag" on the same line).

3. Have the 'help' script put on the vimdoc.sourceforge.net
site, instead of the vimplugin.sourceforge.net site.
Then, change Template:Help to go to vimdoc.sourceforge.net.

Reasons:

Analysing network traffic shows that attempting to get a web
page from xxx.sf.net causes a redirect to xxx.sourceforge.net.
So, using the short name "sf.net" causes an extra DNS lookup,
and an extra web page fetch (with no benefit).

These redirects are the reason that the "#tag" anchors are
failing. For example, clicking the link [[help|word]] goes to
the correct page, but not to the correct anchor position on that
page. That's because the CGI 'help' script sends the client to
sf.net, and the subsequent redirect to sourceforge.net does NOT
include the "#tag" anchor.

You can test this at
 http://vim.wikia.com/wiki/User_talk:JohnBeckett
 which includes "Experiment with Template:Help :help word".

Currently, Template:Help fails for tags like "<tab>" (because of
the angle brackets). I think that would work if urlencoding were
performed.

The reason we can't do urlencoding at the moment is that the
CGI 'help' script does not urldecode before doing a lookup.

I don't know why the 'help' script is on the vimplugin site when
logically it should be on the vimdoc site. I would appreciate
some history if anyone knows. Does anyone know if Dan Sharp
(maintainer of vimdoc.sourceforge.net) is generally responsive
to requests?

Any comments?

John



More information about the Vim-l mailing list