{"id":1508,"date":"2014-11-24T05:00:41","date_gmt":"2014-11-24T13:00:41","guid":{"rendered":"http:\/\/zackmdavis.net\/blog\/?p=1508"},"modified":"2014-11-23T18:35:12","modified_gmt":"2014-11-24T02:35:12","slug":"convert-markdown-to-html-within-emacs-using-pandoc","status":"publish","type":"post","link":"http:\/\/zackmdavis.net\/blog\/2014\/11\/convert-markdown-to-html-within-emacs-using-pandoc\/","title":{"rendered":"Convert Markdown to HTML Within Emacs Using Pandoc"},"content":{"rendered":"<p>Okay, so there actually is a <a href=\"http:\/\/joostkremers.github.io\/pandoc-mode\/\">pandoc-mode<\/a>, but I couldn't figure out how to configure and use it, so it was easier to just write the one command that I wanted\u2014<\/p>\n<pre><code>(defun markdown-to-html ()\r\n  (interactive)\r\n  (let* ((basename (file-name-sans-extension (buffer-file-name)))\r\n         (html-filename (format &quot;%s.html&quot; basename)))\r\n    (shell-command (format &quot;pandoc -o %s %s&quot;\r\n                           html-filename (buffer-file-name)))\r\n    (find-file-other-window html-filename)))<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Okay, so there actually is a pandoc-mode, but I couldn't figure out how to configure and use it, so it was easier to just write the one command that I wanted\u2014 (defun markdown-to-html () (interactive) (let* ((basename (file-name-sans-extension (buffer-file-name))) (html-filename &hellip; <a href=\"http:\/\/zackmdavis.net\/blog\/2014\/11\/convert-markdown-to-html-within-emacs-using-pandoc\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[40],"_links":{"self":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/1508"}],"collection":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/comments?post=1508"}],"version-history":[{"count":1,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions"}],"predecessor-version":[{"id":1509,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions\/1509"}],"wp:attachment":[{"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/media?parent=1508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/categories?post=1508"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zackmdavis.net\/blog\/wp-json\/wp\/v2\/tags?post=1508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}