Blogging in Markdown from Emacs is nice. Most people, me included, start out by writing a file, running a processor on it (such as Pandoc) to get the HTML, then copying the HTML to the web form to publish.
There is a way to do it faster with a little
.emacs hacking (I got here with some help from
#emacs IRC, and probably there are better ways to do this, but still) :
(defun pandoc ()
"Runs the contents of the current buffer through Pandoc and
copies the produced HTML to clipboard."
(let ((fn (make-temp-file "pandoc"))
(pbuf (get-buffer-create "*pandoc-output*")))
;; copy the contents of the current buffer to the temp file
(write-region (buffer-end -1) (buffer-end 1) fn)
;; switch to *pandoc-output*, then return to the curr. buffer;
;; clean it, call pandoc on the temp file, copy to clipboard.
(call-process "pandoc" fn pbuf nil "--no-wrap")
(clipboard-kill-region (buffer-end -1) (buffer-end 1))))
(kill-buffer pbuf) ; cleanup the buffer
(delete-file fn))) ; .. and the temp file
(global-set-key "\C-cp" 'pandoc)
Now you can just type the post in a buffer, hit
C-c p, switch to Firefox and paste the Pandoc output.