Hello Planet Emacs from my Emacs buffer

I keep my blog posts since more than a year in a version controlled plain text file. I write off all my drafts in blog.txt, and publish them from it. Inspite of It’s All Text supplies a convenient way from moving the text to WordPress’ admin, I felt it such annoying to visit a website just for this purpose, and by the way, why should I copy the already written text to anywhere, why can’t I post directly from my Emacs buffer?

According to Sacha Chua, weblogger.el is somewhat okay, however it allowed me to publish this post as simple as saving the buffer’s content. The mode handles (M-x weblogger-setup-weblog) more than one blog at once, and actually, it can post to any type of blogging engines that accept calls through XML-RPC.

One of the disturbing things of weblogger.el was the default bind to C-x C-s—it publishes the post immediately instead of just storing it as draft for further editing when you save buffer. It may be overwritten, for sure. The second—which comes from that WordPress is not an officially supported platform by weblogger.el—is you cannot attach tags to the posts, or at least WordPress won’t process it. As me don’t use the category system of WordPress, I simply customized weblogger.el to fit my needs, and send back categories (the Keywords field indeed) as they were tags.

--- weblogger.el        2008-03-23 21:00:20.000000000 +0100
+++ weblogger-slink.el  2008-03-23 21:00:41.000000000 +0100
@@ -1080,7 +1080,7 @@
                      (when dateCreated
                        (cons "dateCreated"  dateCreated))
                      (when categories
-                       (cons "categories"   categories))
+                       (cons "mt_keywords"  categories))
                      (when textType
                        (cons "texttype"     textType)))))
          (t
@@ -1099,7 +1099,7 @@
                                   (cdr (assoc "texttype"    entry))))
         (cons "link"              (cdr (assoc "url"         entry)))
         (cons "description"       (cdr (assoc "content"     entry)))
-        (cons "categories"        (cdr (assoc "categories"     entry))))))
+        (cons "mt_keywords"       (cdr (assoc "categories"     entry))))))

 (defun weblogger-server-userid ()
   "Get information on user."

Alexandre Vassalotti and the guy behind tolchz.net show off in detail the setup procedure of weblogger.el.