Carlos Costa

September 7, 2009

Installing Emacs Snapshot in Debian

Filed under: en_US — Tags: — Carlos Costa @ 2:49 pm

In this tutorial I will show you how to install the Emacs-snapshot at your Debian. Emacs-snapshot is a cool package built and deployed by Romain Francoise, a long time GNU and Debian developer. Romain is doing a great job packaging emacs from CVS for those interesting in run a really fresh emacs (with the last feature), even more fresh then the packages at Debian official repository. Due to the fact that Emacs is one of the most old editor still in development, install a CVS snapshot doesn’t means “install unstable and with bugs” version. In my tests here the package works smoothly without giving me any problem, but remember: Install it is up to you ;-)

This post is dedicate to my good friend Dirceu, that recently instigate me to give Emacs a try. It is not easy for a long time vim user like me to effectively be converted to Emacs, but at least I’m trying…

Introducing and Installing the Package

A description From emacs-snapshot site says:

emacs-snapshot is a set of packages of the CVS version of GNU Emacs  for the Debian operating system. It is updated regularly from the CVS trunk. Two flavors are available: a GTK version (emacs-snapshot) and a console-only version (emacs-snapshot-nox).

The recommended version for desktop users is emacs-snapshot. For servers, emacs-snapshot-nox is usually a better choice since it has minimal dependencies.

It means you need to do a choice between terminal or desktop, right? yes and no. In my opinion the best way to use Emacs is at terminal, but I recommend you to install both and just after the installation you do a real choice. In Debian it is easy to set which alternative version you’d like to run using the command update-alternatives. I’ll explain this later… for now let’s focus on add the emacs-snapshot repository.

For now on, you should use sudo or run all the commands below as root. Open up a terminal and run the command:

$ nano /etc/apt/source.list

Now lets add the repository line. If you are running Debian Testing or Unstable like me, you will add the line below and save the file (For Debian Stable, use lenny instead of sid):

deb http://emacs.orebokech.com sid main
deb-src http://emacs.orebokech.com sid main

Good, we have the repository. Now lets get the Romain’s GPG key. You need to teach your Debian box to add that gpg key in the trusted repositories keyring. Use the commands below for your convenience (adding the key and refreshing the repository list):

$ wget -q http://orebokech.com/Romain_Francoise.pgp -O- | apt-key add -
$ aptitude update

Good, we are OK to install the package. Go ahead and get the packages:

$ aptitude install emacs-snapshot emacs-snapshot-nox

Done, we accomplish the installation process. By default, when you type emacs at the terminal, the GTK version will open up. Alternatively you can use the No X version (terminal version). Completing the next steps to change it.

Using update-alternatives

The rest of this tutorial will teach you how to use the command update-alternatives to choice what emacs alternative you would like to run by default. Debian has a way of setting up these system alternatives of your favorites programs, like to setup which editor is your main, or what browser is the default; using update-alternatives is not hard, but the manpage can be confusing on how it is done. To understand this command, I recommend you the tutorial http://linuxbasics.org/tutorials/using/debian_update-alternatives.

To setup which version you would like to use, run the following command, typing the alternative number you prefer:

$ update-alternatives --config emacs-snapshot
There are 2 choices for the alternative emacs-snapshot (providing /usr/bin/emacs-snapshot).

Selection    Path                         Priority        Status
-------------------------------------------------------------------
  0            /usr/bin/emacs-snapshot-gtk   0         auto mode
  1            /usr/bin/emacs-snapshot-gtk   0         manual mode
* 2            /usr/bin/emacs-snapshot-nox   0         manual mode

Press enter to keep the current choice[*], or type selection number:

Hit the enter key… next time you run emacs, it will load you preferred version.

August 27, 2009

Bitbucket vs. Github

Filed under: pt_BR — Carlos Costa @ 2:25 pm

Bom, vou ser breve: mudei para o Bitbucket!

Git é legal e rápido, Github tem uma comunidade grande, tenho vários amigos usando github, motivos não faltavam para usar/preferir Github… até que eu descobri o Bitbucket que é praticamente o mesmo que Github, exceto por uma feature que fez toda diferença para eu decidir mudar: um repositório privado!!! mesmo para quem tem conta free.

Por que esse repositório privado é importante para mim? porque as vezes queremos trabalhar em algo que é secreto, só nosso e que pode ficar pronto em breve mas ainda não está. Somente depois de um tempo trabalhando secretamente eu então posso marcar o repositório como público… fez toda diferença pra mim :)

E se você tem conta lá, a minha é: http://bitbucket.org/carloscosta/

August 19, 2009

Novo artigo

Filed under: pt_BR — Carlos Costa @ 10:24 am

Publiquei um artigo na Revista Power Channel sobre SLES 11 em powerpc. Ficou bem legal, apesar do foco da revista ser marketing :P

Quer ler? visita minha página de publicações formais aqui e pega o pdf.

Older Posts »

Blog at WordPress.com.