org-mode + wordpress = org2blog awesomeness

I haven’t been blogging for a long time, and while most of the “reasons” for that have to do with my amount of free time, I also needed a small push to do it. My blog engine, as stated in another blog post, is WordPress. It’s full featured and very nice, but as a guy who lives inside Emacs as much as possible, the web interface is sub-optimal.

For those who doesn’t know it Org-mode is an Emacs mode for /keeping notes, maintaining ToDo lists, doing project planning, and authoring with a fast and effective plain-text system/. If you want to learn more about it take a look at its manual or to the Talks and screencast.

Well, I’m definitely not the only one blogging using orgmode, take a look at this post in the emacs-fu blog (which by the way is very good) which is a nice introduction to orgmode capabilities and markup.

So, let’s assume you wrote your post in orgmode, and you have your wordpress blog, and you want to publish… you have the awesome tool org2blog. Very simple to use, you just do a checkout of the git repository

git clone

then copy the the corresponding files to a directory in your load-path. My .emacs looks like this:

(require 'org2blog)
(setq org2blog-server-url ""
     org2blog-server-user "admin"
     org2blog-use-tags-as-categories t
     org2blog-confirm-post t
     org2blog-server-weblog-id "")

It’s pretty much self-explanatory.

My configuration is a single file where each post is a subtree, using the same idea that Sacha Chua explains in this post (BTW, that is also a nice blog to follow). If you read that post you will find that you need to patch the code from org2blog to add the command to create a blog post from the current subtree (which is org2blog-post-subtree ). But, since then, those changes have been integrated into org2blog repository, so no more patching required :). Happy blogging!