Emacs 24, org-mode, org2blog, and WordPress
Posting to a wordpress blog from emacs, using org2blog.
Setting up org-mode
Install org-mode from their package archive at http://orgmode.org/elpa To do so, add to your package archives list in your .emacs
Then install org-mode from M-x list-packages
This is the relevant org-mode configuration from my .emacs
In order to use native fontification, you will also need htmlize, available from the melpa archive at http://melpa.org/packages/
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
(require 'org-install) ;; Configure languages to run code for in org-mode (org-babel-do-load-languages 'org-babel-load-languages '((perl . t) (ruby . t) (sh . t) (python . t) (emacs-lisp . t) (C . t) )) ;; Use native mode for fontifying code blocks (setq org-src-fontify-natively t) ;; Preserve indentation in exported code blocks (setq org-src-preserve-indentation t)
Setting up org2blog
org2blog is also available from melpa. Once the package is installed, add to your .emacs to enable it.
In order to tell it about your blog, you create an alist named org2blog/wp-blog-alist. Mine looks like this You can then publish by first running M-x org2blog/wp-login, which will log in to your blog, and then posting the entry using M-x org2blog/wp-post-buffer
(require 'org2blog) ;; Don't use sourcecode tags in wordpress (setq org2blog/wp-use-sourcecode-shortcode nil) ;; Default parameters for sourcecode tag (setq org2blog/wp-sourcecode-default-params nil)
(setq org2blog/wp-blog-alist '(("sdowney" :url "http://www.sdowney.org/wordpress/xmlrpc.php" :username "sdowney" :default-title "Hello World" :default-categories ("org2blog" "emacs") :tags-as-categories nil) ))