Thursday, August 13, 2009

Installing Emacs 23 on Debian lenny :-)

This is as simple as that. We are going to get the latest Emacs(ie Version 23)
source from the sid repos and build .deb's from that. Installing those resultant .deb's through dpkg is fine. But we are going to follow a cool solution in which synaptic will handle that for us :-) So here goes the entire step by step documentation.

Note: You need to do all the following steps with root privileges.

1)edit your sources.list to add sid repository. Add only the deb-src.
cd /etc/apt
gedit sources.list


2)add the following line to the sources.list file.
deb-src http://ftp.debian.org/debian/ sid main


3)now run the following commands in the terminal

apt-get build-dep emacs23
apt-get -b source emacs23

This will create the .deb packages needed to install Emacs 23. Whooa!! :-)
but wait, the Emacs 23 depends on latest texinfo package. So now you have to back port that too.
Repeat the same steps for texinfo. i.e
apt-get build-dep texinfo
apt-get -b source texinfo

Now we are done with all the .deb's needed to install Emacs 23.

4) You may install those directly from command line through dpkg. But as i said earlier the coolest part will be doing that by synpatic :) So, copy all the .deb packages built to /home/user_name/packages. See change the user name to your user name.

cp *.deb /home/user_name/packages/
cd /home/user_name/packages


5)Now do the following command to create the Packages.gz file that is needed to for Synaptic to “see” your repository
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

Be sure to install the build-essential package (aptitude install build-essential) before running the above command.

6)Now its time to open the sources.list again. Open it and add the following line.
deb file:/home/user_name/packages/ /


7) You are done :-) Just run
apt-get update

Once its over you can install Emacs 23 from synaptic.:D Install it.
Enjoy PDF-viewing, anti-aliased fonts,Unicode suport and many more. Have fun !

Thanks to an african blogger and gravity(nick) who replied to my queries in #debian IRC channel.

No comments:

Post a Comment