I installed markdown mode for Emacs. Now I need it to see a version Pandoc I have on my machine.

Markdown Mode for Emacs

I put this in my init file and loaded it.

 '(markdown-command "C:\Program Files\RStudio\bin\pandoc\pandoc.exe"))

Of course the \ are escape characters, so that does not work. There is also the issue of the space in the name.

I could ask IT to install Pandoc on my system, but it is already there in the Rstudio directory.


I tried your suggestion:

(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/"))

'(markdown-command "C:/Program Files/RStudio/bin/pandoc/pandoc.exe")) ;; you can also set full path of markdown comman

seems to work. I have a hard time believing that, but I got n *eww* loaded correctly.

  • What version of emacs are you using (Cygwin, NTEmacs...)? markdown-mode uses (shell-command-on-region... (concat markdown-command " " (shell-quote-argument buffer-file-name)). You could try to use / instead of \ in the command name. Furthermore you could also try to wrap the command name with double-quotes: "\"C:/Program.../pandoc.exe\"" Alternatively, you can try to escape the spaces by \\, i.e. "C:/Program\\ Files/.." That would work with Cygwin-Bash. – Tobias Feb 3 at 17:30
  • I am using GNU Emacs – Harlan Nelson Feb 3 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.