Saturday, December 31, 2005

Emacs Tip: Viewing Commands Available On A Prefix Key

Emacs, and consequently Emacspeak, uses a number of multi-key sequences. The initial key that makes up such a multi-key sequence --- AKA the prefix-key that leads to all Emacspeak commands is C-e (control-e).

Pressing any prefix-key followed by the help-key (C-h) results in Emacs displaying a *Help* buffer that lists all key-sequences beginning with that prefix.

This can be a very useful way of quickly seeing what keyboard commands are available --- as the resulting listing is shorter than what is produced by C-h b (command describe-bindings) which lists all key-bindings.

To use this feature to review Emacspeak's key-bindings, I have now moved command emacspeak-learn-emacs-mode to C-h C-l and C-e F1 from its original key-binding of C-e C-h --- the change is checked into CVS.

Friday, December 30, 2005

Using The New MPlayer With ALSA Support

New versions of the Linux mplayer can now play RealMedia files in addition to the various DVD and Windows audio and video streams. As an added bonus, mplayer can be built to use ALSA ---(note that default RPMs available on the Web still default to OSS as of December 2006). This, with the additional support for newer RealMedia formats has finally caused me to switch away from trplayer a---a command line RealPlayer that was built against RealPlayer 8.0

Note that building mplayer from source to include ALSA support, and locating all the codecs you need will require a few Google searches. Specifically, to play NPR streams, you will need to grab avisynth.dll from the SourceForge project of the same name. But once this is done, mplayer will happily play multiple streams of audio without requiring multichannel support from the sound card. For Emacspeak users this means that you get auditory icons, and more importantly software TTS while listening to audio streams.

To use software TTS while mplayer is playing audio streams requires that you use a TTS server that uses ALSA; the default Emacspeak servers still use OSS. To build a TTS server for IBM ViaVoice TTS, obtain Emacspeak sources from CVS, and follow the instructions in file servers/linux-outloud/ALSA.

As of a few weeks ago, The Emacspeak CVS repository has been updated so that all access to streaming media goes through mplayer by default. Make sure to configure your mplayer with a smaller cache size if you use it exclusively for streaming audio; by default it uses a rather large cache, and streaming realaudio often takes a long time to start before the cache is configured to be something smaller; I use a cache size of 64kb on my laptop.

Thursday, December 29, 2005

Blogging From Inside Emacs

I'm posting this using a bare-boned atom-blogger that I implemented this morning. It uses curl to process the HTTP Post Request.

Editting Previous Entries

What's more, the bare-bones atom-blogger can now edit previous posts. This is done by getting the desired entry, filtering it for elements that should not be present when submitting updates, and adding a generator element --- all of these steps are required by the Blogger API. Unwanted elements are filtered out using xsltproc.

Wednesday, December 28, 2005

More On Web Command Line

Also, see Time Saving Shortcuts from Yahoo --- these shortcuts have the same structure as url-templates in Emacspeak --- except that in the case of Emacs, you have all of Elisp to build up your URL templates.

For the available Emacspeak url-tempaltes, see the relevant section in the online reference.

-- T. V. Raman

Emacspeak Web Tricks --- The Web Command Line!

The Web browsing environment within Emacs is primitive compared to what is available in mainstream browsers today. However, the bare-bones Emacs/W3 within Emacspeak still provides a bagful of powerful tricks. Here is how:

  • Module Emacspeak-websearch.el implements a set of powerful search wizards.
  • Module emacspeak-url-template.el implements a library for programmable URLs.
  • Additionally, the HTML received by W3 can be filtered via XSLT stylesheets.

Combining the above turns the Emacs minibuffer into a powerful Web CommandLine. The modules enumerated above were implemented within Emacspeak starting in 1998, with url-templates arriving circa early 2000. These tools were an access necessity due to the visual complexity of the Web; it's now interesting to see similar Web tools emerge on the mainstream web to help users complete tasks more rapidly. As an example, search Google for Web Command Line --- you'll see that there are now simple browser add-ons for all the mainstream web browsers that implement similar shortcuts. Another popular means of achieving such Web shortcuts today is via simple Web widgets or portlets that are dropped into one's home page --- as an example, see Google Modules .

Emacspeak Introduction

This was my first posting to my Emacspeak Blog.I'm using Emacs nxml-mode and Curl to post these after having started with Emacs package atom-api --seeEmacsWiki.

The url package from Emacs/W3 on which Emacs atom-api dependsis proving to be too flaky, and curl seems to be a better bet.