Friday, June 19, 2009

Searching GNU From Firefox

When writing up answers for Emacs related questions on, I like to include links to the info pages. I got tired of having to go to the gnu site and then do a google site-specific search. I tried looking for a Firefox search plugin that already did that (or something similar), but to no avail.

However, it's pretty easy to write the search plugin yourself. The main page for creating search plugins on mozilla's developer site gives you pretty much all you need to know, except for where to put the xml file. This page shows you that the installation dir is very likely C:\Program Files\Mozilla Firefox\searchplugins.

You can read the documentation yourself, or just check out the snippet of XML I wrote.

Probably the "hardest" part was finding an icon, and the all-knowing google led me to the web page, where someone had drawn the standard GNU icon and made it available under a Creative Commons license:


SETH said...
This comment has been removed by the author.
Drabnik said...

You could also use firefox's smart keywords. Add a bookmark, then edit it and set the Location to:

Set the Keyword to something memorable and easy to type, like "gi" for "gnu info". Then when you type "gi sometext" in the location bar, Firefox will automatically put in the above URL with %s replaced with sometext.

BFW said...

I like the smart keywords!