blogging with emacs

I finally got weblogger up and running without issues. This proved a bit of a challenge.

Since I had no idea what I was doing, figuring out why once weblogger errored you have to reset the whole thing. The easiest way to do this is just restart your emacs session. But, I made the mistake of experimenting with weblogger in my main session… *sigh*

Once you get a 404 from the webserver, the only way to get weblogger back on track is to (setq weblogger-weblog-alist nil).

Another thing is that the capability discovery mechanism is broken. I am not sure exactly why, but if your blog has capabilities not listed in the weblogger-capabilities then it fails. Since I run wordpress, my solutions was to run the following code:

(setq foobar
(xml-rpc-method-call
weblogger-server-url
‘mt.supportedMethods))

Then do a C-h v foobar to get the list of capabilities. Edit the weblogger.el to list these in the weblogger-capabilities alist. I can now edit posts!

The other thing is that I kept getting “Newsgroup: is an invalid header” or something. My solution was to comment out the line that tries to add that header to the buffer. around line 394

Just to help you along here is the relevant part in my ~/.emacs:

(require ‘w3)
(require ‘weblogger)
(global-set-key “\C-cbs” ‘weblogger-start-post)

Right now it just works.

You can grab the patch at http://blogs.openaether.org/data/weblogger.el-wordpress.patch

Todo

  • I should really hack weblogger so it doesn’t permanently fubar on error.
  • getting the discovery fixed so one doesn’t have to manually create the alist would be real nice. weblogger uses mapcar,assoc, etc… it shouldn’t die according to my understanding, but it does
  • I maintain two blogs. It would be nice to switch between them or select which one to post to
  • fix up the message -> struct so it will use all of rss2

Comments (2)

  1. Hey!

    I found your page via emacswiki. A while back I moved the code to
    Savannah, so you might find that more useful. Check out the XmlRpc
    page for the URL.

    Re: switching between blogs. Are they on the same server? Then you
    can switch using “C-c C-w”. Are they on different servers? Then set
    up different configurations and use “M-x
    weblogger-select-configuration” to switch between them.

    I’m open to patches, and I’ll give you CVS commit bits on Savannah if
    you want them.

    Tuesday, October 11, 2005 at 3:55 am #
  2. Gabriel wrote::

    Hi, I’m new to emacs and would like to post to my wordpress blog within it. I downloaded weblogger and then the xml-rpc.el file at the emacs wiki, but i get an error trying to load that file, so I cant load weblogger either.

    Can you post the patched xml-rpc file you have working? Or how did u manage to make it all work?

    I get an error saying something like

    Saturday, May 5, 2007 at 7:29 pm #