Automatically build emacs from source every night

For the last two weeks I’ve been using the latest development version of emacs. It’s a funny experiment and a nice feeling to have a freshly built emacs every morning.

I heavily use org-mode and emacs to organise almost everything at work and so far the devel trunk have been pretty stable for me. My nightly built emacs works like a charm.

Building emacs from source is easy as pie. At least on my ubuntu 10.10, all I need to do is get the trunk from the official main repo:

$ cd ~/src
$ bzr branch --stacked bzr:// emacs-trunk

Build and install emacs (<10 mns on my machine):

$ cd ~/src/emacs-trunk
$ ./configure --prefix=~/umacs
$ make && make install

Add a symlink for convenience (nb: I’ve also added a launcher in a gnome panel):

$ ln -s ~/umacs/bin/emacs ~/bin/umacs


To update my copy of the trunk and to rebuild a new version:

$ mv ~/umacs ~/umacs.bak
$ cd ~/src/emacs-trunk
$ bzr pull
$ autoreconf -I m4
$ ./configure --prefix=~/umacs/
$ make clean
$ make && make install

I’ve wrapped all this in a small shell script that rebuild emacs every night and that sends me an email with the commits logs.

The original emacs shipped with my distro is still installed and perfectly working so if the build fail or if an annoying bug show up that’s not a problem. I can switch between the two version of emacs without hassles.

Some minor problems I’ve encountered :

Configure failed because some dependencies were missing on my machine. The error messages were clear enough to identify the missing packages:

$ apt-get install texinfo lipxpm-dev libjpeg-dev libgif-dev libtiff-dev

I encountered an emacs bug (7547) while switching agenda-view in org-mode. It’s a bug in verify-visited-file-modtime. The workaround for my case was trivial:

$ touch ~/diary

The build failed once because of a configuration problem, easily fixed by running this in emacs-trunk folder:

autoreconf -I m4

And that’s all.

Posted in emacs | Leave a comment

Blogging with emacs, org-mode and wordpress

I want to be able to seemlessly publish from emacs to wordpress. I’d like to create or update posts as an org-mode entry and then to publish them on this blog.

To achieve this I’ll need org2blog/wp, a lisp package that can export org entries to wordpress, org2blog depends on xml-rpc-el.

So first step is to get the software from the code repos:

$ cd ~/.emacs.d/
$ bzr branch lp:xml-rpc-el
$ git clone

Then add some lines in ~/.emacs.d/init.el:

 1:  (add-to-list 'load-path "~/.emacs.d/xml-rpc-el")
 2:  (add-to-list 'load-path "~/.emacs.d/org2blog")
 3:  (require 'org2blog)
 5:  (setq org2blog/wp-blog-alist
 6:    '(("42kettles"
 7:      :url ""
 8:      :username "xxxx"   
 9:      :tags-as-categories nil)))
11:  (setq org2blog/wp-track-posts nil)

Then try to login just to be sure that everything is working smoothly:

M-x org2blog/wp-login

If it doesn’t work, check that xml-rpc is enabled in wordpress’s writing settings.

Now to post or update an article all I have to do is to go to the org-mode entry I want to publish and do:

M-x org2blog/wp-post-subtree

And that’s it !

Small tweaks I need to do:

  • by default the entry is posted as a draft, I’ve yet to find how to publish it.
  • define settings for syntax highlighting
  • define settings for categories/tags and org file structure (test tag inheritance).

I’m all for ATOM so as wordpress support it, I may give a try to org2blog/atom.

Posted in emacs | 5 Comments

french diy how to make a skateboard

Posted in Uncategorized | Leave a comment

ifconfig to make an alias on the fly

Create the new alias and change the default route:

$ sudo ifconfig eth0:0 netmask
$ sudo route del default
$ sudo route add default gw

Remove the alias and the default route :

$ sudo route del default
$ sudo ifconfig eth0:0 down

Typical use : I get network settings from DHCP, but I have a huge file transfer to make and want to temporarily use a gateway on another ip lan. For exemple : to make the first update on a brand new ubuntu install.

Posted in sysadmin | Tagged , | Leave a comment