Image by MarkyBon
In a previous post I outlined how to use webjump, a built in feature of emacs to quickly launch web pages in a browser, after querying the user for search phrases and so on.
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
(global-set-key [f2] 'webjump)
("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=" ""])