"Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can."
Jamie Zawinski
It's been said of the Emacs text editor that it's possible to crawl inside the sprawling program and never come out. Going far beyond anything as simple as mere text editing, Emacs offers the capability to read mail and Usenet groups, surf the Web and chat with Eliza. But we're living in the instant messaging era, which puts a burden on Emacs to do more, so here are two Emacs extensions that are easy to set up and provide a way to spend even more time in Emacs. Both work with any reasonably current version of the software. We used Carbon Emacs, based on GNU Emacs 22.2.1, to take these extensions for a spin.
Open Source IM
Stuck for a definition? Look it up at Webopedia:
twittering-mode.el
For starters, we'll consider Twitter. Not exactly IM, something beyond mere text messaging, Twitter offers a sort of hive IM experience, with members transmitting tweets to every other Twitter user on the planet or just their friends and contacts. Twittering-mode.el offers a full Twitter experience inside Emacs, contact icons and all.
You can get the latest version of twittering-mode at author Y. Hayamizu's wiki.
Put this in your .emacs:
(require 'twittering-mode)
(setq twittering-username "__your Twitter username__")
(setq twittering-password "__your Twitter password__")
Newer versions also offer user icon support for Unix and its variants (including Mac OS X). Adding (twittering-icon-mode t) to your .emacs file will allow the mode to pull down user icons to go with their entries.
You can start twittering mode with M-x twittering-mode. That opens a buffer that shows updates from the Twitter users you're following.
Here are some commands to get you started:
- C-c C-f updates your friends timeline
- C-c C-s lets you update your status ... just type it into the minibuffer and press "return"
- C-c C-v lets you view a user's Twitter page if you position the point over their linked name
By default, twittering mode displays the user's name, period of time since the user's last update, the user's location and the client or source of the update. Examine twittering-mode.el around line 55 provides the default format for twittering mode's updates and a key to how to change them. For example, a more terse update format might look like this in your .emacs:
(setq twittering-status-format "%i %s, %@:n %t")
jabber.el
As we noted, Twitter isn't exactly IM. Though there are a number of IM options for Emacs, one that works particularly well with minimal fuss is Jabber.el, a robust and configurable Jabber client that supports basic Jabber/XMPP and multi-user chat. You can download it from the project's Sourceforge page as either a zip file or tarball. Unpack the archive and move its folder into your load path, then make sure to include it in your .emacs file:
(require 'jabber)
Before trying to sign on, you'll need to use the Emacs customize facility to make sure jabber.el has your username and password. Use the command M-x jabber-customize to load a customization buffer. Here are some settings to change first thing:

The Jabber.el Roster
Click for a larger image.
- Jabber Username -- your login name
- Jabber Server -- the server you connect to
- Jabber Password -- you can set this as either "Prompt for password," in which case you'll be asked for it each time you start jabber.el; or you can save it in your .emacs file.
- Jabber Nickname -- this is your default nickname in chat prompts and group chats.
These settings just scratch the surface of Jabber.el's numerous configuration options. If you check toward the bottom of the customize buffer, you'll see a number of other settings groups. Some of the key groups include:
- Conn -- to manage how you connect to your Jabber server. This is the group to check if you have to use an SSL-encrypted connection
- Core -- includes a setting for the name of your roster buffer, in case you hate typing *-jabber-* to switch to it.
- Keepalive -- to ensure you maintain a connection to the server
- Faces -- to set the fonts and colors jabber.el uses
Once you've got things set up to your satisfaction, you can sign on to Jabber with M-x jabber-connect.
You might run into some errors with messages like "error in process filter: jabber-replace-in-string: Wrong number of arguments." A message from the emacs-jabber mailing list archive has a fix.
Once you're signed on, the minibuffer at the bottom of your Emacs window will show a number of Jabber status messages. To see your Jabber roster, you have to visit the buffer named *-jabber-*. The jabber.el roster shows the name of the server to which you're connected as a large headline, and offers a number of keyboard shortcuts.
To start a chat with a contact on your roster, just move the point down to that contact's name and either press C-c C-c to open a menu with a list of options, or press the "return" key to start a chat.
Jabber.el provides notifications of IM activity via an area on the Emacs modeline and minibuffer: