Posting to WordPress from Emacs

I’ve grown increasingly annoyed (I annoy easily) with the HTML editor at Not that the HTML editor at Blogger was any better. Editing blog entries is just fiddly when you have images and stuff.

And you have to upload the images. Boooring.

WordPress has a “post by email” feature, so I wondered what would happen if I sent a multipart/related HTML message, with images embedded in the email. The documentation didn’t say anything about this, so I thought the likelihood of them being nerdy enough to handle that was slim.

But look:

That’s the view from the hotel room in London… And this?

That’s Salt Lake City.

See? It works!

Now, Emacs didn’t support sending multipart/related messages, so I had to implement that first. In Ma Gnus now, if you compose an HTML message, and include <img> things that point to local files, then Message/mml will now rewrite the HTML to have internal cid: links, and append the images to the email. So you just send out huge emails, WordPress parses it, and this is the result.

Behold! The first resulting blog message!

Now to see whether I can control all relevant bits about how the images are placed and stuff…

3 thoughts on “Posting to WordPress from Emacs”

  1. I’ve attempted blogging from Emacs using knitr – a tool for literate programming with statistics.
    It sort of works, but in its current state of development can’t overwrite posts. Which is essential for those of us who are fallible.

  2. I use org2blog for all my wordpress postings from emacs, and its very easy to use + it auto-uploads the pictures you want. Have a look at it?

Leave a Reply