emacs: Searching programming API's with webjump
Image by MarkyBon
This describes how to simply setup webjump to search the API documentation for whatever framework you are using. The example will be Java's Platform documentation.
- Find the base url you want to search. We will use google to only find things that begin with this. In the case of Javas documentation I'm going to search at http://java.sun.com/javase/6/docs/api/
- Set up the web jump code as below. The three arguments in square brackets are [ base url, normal search url prefix, search url post fix ]. You just need to replace the JAVA API part of my URL with the URL you are interested in.
- M-x webjump
- Type your query and hit enter
- Browser opens with search results
(require 'webjump)
(global-set-key [f2] 'webjump)
(setq webjump-sites
(append '(
("Java API" .
[simple-query "www.google.com" "http://www.google.ca/search?hl=en&as_sitesearch=http://java.sun.com/javase/6/docs/api/&q=" ""])
)
webjump-sample-sites))