Running emacs 25.2.2. And markdown installed from Melpa.

If I export a file with devanagari characters, it produces a file sans devanagari characters!

I did a bit of research and found out that markdown test.md -o test.html issued from a command line does similarly. But pandoc -o test.html test.md works properly. So, this could be a bug in markdown command as provided by discount package on my Kubuntu 18.04.

So, I customized markdown-command to pandoc. That did not help. So, I customized markdown-command-needs-filename to t. That produces gibberish for devanagari characters.

Is there a way out? What do I need to do to get markdown export going?

Or, how do I set pandoc as my command to execute while exporting a markdown file?

1 Answer 1


You can try to implement a function like this:

(defun pandoc-md2html ()
  "Compile markdown file to HTML, using pandoc."
  (when buffer-file-name
    (message "Pandoc markdown to HTML compilation...")
     (concat "pandoc"
             " -o "
             (concat (file-name-base) ".html")
             " "

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.