Home > Tips > Posting to WordPress from emacs

Posting to WordPress from emacs

February 12th, 2008 Leave a comment Go to comments

Most things I do on the computer, I do within emacs. I use it for email, writing programs, compiling programs, running programs, typeseting papers, running shell commands, etc.

So how did I make this post from within emacs? Google led me to this post detailing how to set up weblogger. Here’s the quick and dirty setup:

bash$ cd ~/.emacs.d/
bash$ cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:
/sources/emacsweblogs \co -d weblogger weblogger/lisp

Put this in your .emacs and execute it (highlight and C-x C-e):
(add-to-list 'load-path "~/.emacs.d/weblogger")
(require 'weblogger)

You’re now ready to start a session: M-x weblogger-setup-weblog. It will prompt you for your XML-RPC server/path. For example, I log into http://www.shawnlankton.com/wp-admin to post, so my XML-RPC path is http://www.shawnlankton.com/xmlrpc.xml.

One final touch is to turn off auto-fill when in weblogger-mode because carriage returns get interpreted literally as <br>. A quick fix:
(add-hook 'weblogger-entry-mode-hook
'(lambda () (auto-fill-mode nil)))

Categories: Tips Tags:
  1. No comments yet.
  1. No trackbacks yet.