Thursday, June 28, 2007

Making Search Fly: On-The-Fly Custom Search Engines

The Custom Search Engine team at Google recently released CSE On The Fly a truly amazing feature. Incidentally Google Custom Search is the same piece of magic that brought us Accessible Search last year.

So in the spirit of continuing to enhance the Web Command Line in Emacspeak for every smart Web tool that becomes available, I've checked in two new url templates that demonstrate how one can leverage this to be smart and selective about what one reads.

Searching Favorite Feeds
So I read a lot of Blogs, my current Blog Reader is Google Reader via --- you guessed it -- Emacs module GReader (part of the Emacs G-Client package). But I often feel the need to search my favorite feeds. URL-template Reader Subscriptions lets you do this; what's more it's not specific to Google Reader. All you need do is to publish an OPML file listing your favorite feeds and customize Emacs variable emacspeak-url-template-reading-list-opml to point to that location.
Official GoogleBlog Search
Google has a large number of Google-specific Blogs --- I usually read them through this aggregated feed: All GoogleBlog Stream Emacspeak wizard Official GoogleBlog Search builds a CSE from this feed to let you search articles from all of Google's blogs.

Eventually, I'll also add a meta search wizard that lets one construct any CSE on the fly --- with Lisp such meta-programming is a snap!

Later yesterday evening, I checked in a third url-template called On The Fly CSE that prompts for a search term and the URL for the feed of feeds that specifies the content to search.

Tuesday, June 26, 2007

Emacs-G-Client: Uploading Photos To PicasaWeb

The SVN version of package Emacs-G-Client at g-client now includes a new module gphoto.el that can create albums and upload photos to Google's PicasaWeb site --- as an example, see my photo gallery. Emacspeak users are likely to find the RSS and ATOM feeds for photo albums more useful in general; package gphoto provides easy access to previewing these feeds as well as viewing/editting the metadata that goes along with the pictures. As an example of such a feed, here is Hubbell Labrador's Graduation album.

Multilingual Dictionary Lookup Via Google

From the every useful Google tool deserves a Web Command -line equivalent ...

I just checked in an Emacspeak url-template for accessing multilingual dictionary lookup via Google. Invoke it like any other url-template using C-e u and type mult tab. Specify the word to look up, and the source-target language pair using two letter codes --- this is analogous to how the Emacspeak Translation Via Google tool works. And remember, if there is something you find yourself doing often on the Web, there is most likely an Emacspeak Web Command Line gadget for it --- well, at least that is true for the things I find myself doing often;-)

Friday, June 22, 2007

FireBox: Put The Fox In The Box

I've finally found the right development environment for myself for writing and debugging Web Applications that use JavaScript to implement client-side interaction. It turns out that it wasn't just me who found the thought of programming inside the Web browser a painful experience --- pleasant though the final end-user interaction that those results deliver might be for the final user. I discovered MozRepl --- a read-eval-print loop for Firefox. MozRepl is a Firefox extension that allows you to open a connection to a running Firefox session and gain access to a JavaScript interpreter context that can access all aspects of the Firefox runtime.

This is quite neat, I can now use the power of Emacs to write and debug end-user JavaScript applications. But wait, there is more. So in general, as someone who doesn't need to suffer from the hit on cycles and memory that running an X environment involves, I usually dont start GDM --- the graphical desktop --- on my Linux box. Believe me, running just at the console, especially with the LCD turned off makes my laptop run a lot longer. So challenge: How do you take the fox's head off Firefox? How do you run a headless Firefox?

Turns out that the original X Windows developers didn't always have access to all the displays that they were developing X applications for --- so they created XVFB --- the X Virtual Frame Buffer server. Like all good things in the Open Source world, XVFB continues to survive --- even though today, X developers hardly if ever resort to XVFB. But in the fine UNIX tradition of Get out of my way or I'll turn you into a shell script XVFB also turns out to be just what I needed in order to run FireFox as a headless application.

So in summary: I'm typing this blog on the shuttle bus riding home, with the monitor turned off, and Firefox running headless as I debug some of the code I've been writing. If you want to put the fox's head in a box yourself, here is a pointer to FireBox -- share and enjoy!

Thursday, June 14, 2007

Emacspeak And Beautiful Code

Beautiful Code is a collection of essays on software design, with all proceeds going to Amnesty International. It includes a chapter on the use of Lisp advice to speech-enable Emacs --- AKA Emacspeak. I'll eventually publish an HTML version of my article on the emacspeak Web site. In the meantime, I highly recommend the complete book --- which if you need an accessible version can probably be obtained from organizations like BookShare.