How to edit google docs with markdown in emacs and push them to your blog.
Google Docs is clearly the wave of the future, not the edit-text-in-browser part. That’ll never make it for me. But the store-and-collaborate-on-all-your-stuff-online part is pretty sweet. While waiting for Google to get their act together and get Platypus out of alpha I need a way to get my Google docs into Emacs and back. Mozex comes to the rescue.
Google stores the documents as HTML. I wrote all my articles in HTML for several years and I’m not going back to that. My latest infatuation is with markdown. I spent half an hour googling on ways to go from HTML to markdown. Pandoc seems to be the best bet. It comes with a debian package and lots of documentation.
Getting it to interact with emacs is a snap. Just load this little elisp thingy of mine on startup from your ~/.emacs and you’re all set to go.
When your emacs/mozex window comes up with all that HTML-hobblygobbly just hit F5 and it will turn into markdown. When you’re done editing and want to save your document back to HTML hit F6.
This blogpost is of course edited with this mix of gdocs, mozex, pandoc, markdown and emacs.
What this post looks like in the basic Google Docs editor:
What this post in the Google Docs HTML editor:
What this post looks like in the one true editor:

update: Ok, this was pretty cool. But it’s really too much of a hassle.
0 Responses to “Google Docs + Emacs = Gmacs”
Leave a Reply