Emacs markdown-mode error on preview: "bin / bash: markdown: command not found"

Txe Llenne picture Txe Llenne · Jan 9, 2013 · Viewed 12.3k times · Source

I am using emacs 24 on fedora 17. I installed markdown-mode, but whenever I try to export a file by typing C-c C-c m or C-c C-c p in emacs, I got this error:

/bin/bash: markdown: command not found

Screenshot of emacs' markdown error message

I read that this is probably an issue with the path variable, so I compared the env variable by typing $ env at the command line and Esc-! env RET in emacs. I found the path variable description is the same in both cases.

What is this error? How can I fix it and execute markdown previews from within emacs?

Answer

Kai Zhang picture Kai Zhang · Nov 2, 2013

Install any markdown generating tool as you like, for example pandoc.

Then add the following line to your .emacs file:

(custom-set-variables
 '(markdown-command "/usr/local/bin/pandoc"))