Org2blog setup miscellany

The other day I had to spend some time figuring out how to do the following things in org2blog:

• display LaTeX properly
• clear org2blog keybindings

All are very easy, but took a little bit of digging, so here it is recorded for posterity.

First, there is a plethora of LaTeX plugins for WordPress. I favor the ones that use MathJax; after all, we live in the year 2012. Converting LaTeX to images is so 1990s. For MathJax support, you can use the excellent plugin by zhiqiang. Note that the syntax for inline vs display formulas is slightly different than what one might be used to (note the exclamation marks). On the org2blog side, you have to make sure to set

(setq org2blog/wp-use-wp-latex nil)

otherwise, the LaTeX syntax generated is incompatible with the plugin.

YouTube videos can be embedded using the Artiss youtube embed plugin; in the org2blog you have to specify something like

#+BEGIN_HTML
[shortcode surrounding youtube video code, as per the Artiss docs]
#+END_HTML


Finally, the default org2blog bindings are non-standards-compliant in that they use the C-c [letter] keys, which are reserved for the user. In particular, the bindings were interfering with parts of my setup. The solution was to clear the bindings and define my own. Clearing the bindings takes the following form:

(add-hook 'org2blog/wp-mode-hook
'(lambda () (setq minor-mode-map-alist
(assq-delete-all 'org2blog/wp-mode minor-mode-map-alist))))

Overall, I am very happy with org2blog. It allows me to blog right from within my preferred computing / brainstorming / writing environment. I like to think that I am not one of those Emacs users that tries to put every aspect of his or her life in some Emacs buffer somewhere, but this little lifehack is just too sensible to ignore.

Tagged with , .

One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

1. Thanks for the nice post. Sorry for the non-standard keybindings. I wrote org2blog, as a way to learn elisp and get into the land of Emacs lisp programming. I wasn't aware that C-c [letter] keys are reserved for the user.

Some HTML is OK

(required)

(required, but never shared)