2

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

2

You can try to implement a function like this:

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

Your Answer

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

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