FeelingRoot

M-x geek-food

Entries Comments


IM from GNU Emacs with BitlBee

11 September, 2008 (17:34) | Emacs | No comments

It’s time for some more geek fun with Emacs. This time I’m gonna show you a simple way to chat with your messenger friends across XMPP/Jabber (including Google Talk), MSN Messenger, Yahoo! Messenger, AIM and ICQ, all without leaving Emacs.

Things you will need:

  • GNU Emacs (of course)
  • ERC (emacs IRC client)
  • BitlBee server (you can download/install it from http://www.bitlbee.org/main.php/download.html)

So here we go:

To install bitlbee on Ubuntu you can do : sudo apt-get install bitlbee. And to start it: sudo /etc/init.d/bitlbee start.

On OS X if you are using macports you do: sudo port install bitlbee. And to start it: /opt/local/sbin/bitlbee -D.

You can of course configure it by copying and customizing the sample config file that comes with BitlBee but for this simple example we’ll stick to running BitlBee without a config file.

Now that BitlBee is started you can connect to it from any IRC client, but for the purpose of this post, I will choose ERC because it’s nice IRC client for GNU Emacs.

In GNU Emacs do: M-x erc <RET>, type “localhost” for IRC server, leave the port unchanged (6667), chose a nickname (or username) and hit <RET>.

You should now be connected to the bitlbee server running on localhost.

Once you’ve connected to your server (or a public server) you need to register your account and then create a list of the outside IM accounts you want to use or have access to. To register (whether on public or private server) use:

register [password]

After you’ve registered your account on your new server you simply add your accounts.

For Yahoo: account add yahoo handle password <RET>

For MSN: account add msn handle password <RET>

Jabber (Gmail): account add jabber example@gmail.com password talk.google.com:5223:ssl <RET>

All that remains now is to connect to all those accounts, and you do that by typing : account on <RET> and save <RET> to save the above settings.

A few usefull BitlBee commands to get you started would be:

To refresh your buddy list: blist <RET>

To message a buddy: /msg username message <RET>

And of course you can always find more on the BitlBee homepage.

Better window management with ElScreen

11 August, 2008 (12:55) | Emacs | 6 comments

Today I stumbled upon a sweet little mode for GNU Emacs called ElScreen. The nice thing about it is that you can have multiple window setups in one frame. I use it to keep my gnus windows (usually two, the summary buffer and the message window) and my coding window separate from each other then I can easily switch between them by hitting C-z n (Switch to the “next” screen in a cyclic order) and C-z p (Switch to the “previous” screen in a cyclic order).

There are also a number of very useful shortcuts for working with setups (tabs - as ElScreen displays them):

  • C-z C-c  Create a new screen and switch to it.
  • C-z C-k  Kill current screen.
  • C-z C-n  Switch to the “next” screen in a cyclic order.
  • C-z C-p  Switch to the “previous” screen in a cyclic order.
  • C-z C-a  Toggle to the screen selected previously.
  • C-z 0  Jump to the screen number 0-9.
  • C-z C-w  Show a list of screen.

You can get ElScreen from this ftp address: here.

Installation is very simple, just copy the file elscreen.el into a directory in your path and add this line to your .emacs file (load “elscreen” “ElScreen” t).

from a terminal do:

cd ~

wget -c ftp://ftp.morishima.net/pub/morishima.net/naoto/ElScreen/elscreen-1.4.6.tar.gz

tar -xzf elscreen-1.4.6.tar.gz

cp elscreen-1.4.6/elscreen.el ~/.elisp/

in .emacs add:

(add-to-list ‘load-path "~/.elisp/")

(load "elscreen" "ElScreen" t)

I hope you find this useful and drop me a line if something is not working right.