using org2blog to blog with wordpress.com

howto blog from your emacs org-mode using org2blog

setting up emacs for blogging with wordpress is pretty easy. There are some packages out there which could do that job. I chose org2blog.

installing org2blog

you can install org2blog from github

https://github.com/punchagan/org2blog

just do

cd ~/.emacs.d

git clone http://github.com/punchagan/org2blog.git

Add the org2blog directory to your load path and then add

(setq load-path (cons “~/.emacs.d/org2blog/” load-path)) (require ‘org2blog-autoloads)

installing xml-rpc

org2blog requires xml-rpc. xml-rpc can be installed through the emacs package manager (until than I didn’t know anything about that).

to install xml-rpc just

M-x package-install xml-rpc

i had to add manually the load-path to xml-rpc.el in my .emacs

(setq load-path (cons “~/.emacs.d/elpa/xml-rpc-1.6.7/” load-path))

configuring org2blog

just add a few lines to your .emacs as described on the github-page https://github.com/punchagan/org2blog

(setq org2blog/wp-blog-alist ‘((“wordpress” :url “http://username.wordpress.com/xmlrpc.php” :username “username” :default-title “Hello World” :default-categories (“org2blog” “emacs”) :tags-as-categories nil)))

reload emacs to load the changes

now run

M-x eval-buffer

while in the .emacs buffer to load the changes

test your setup

now open a new org file.

to test org2blog you can now

M-x org2blog/wp-post-buffer

your post should now appear in your wordpress blog as a draft

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s