Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Pandoc successfully installed on Windows, and have run it from command prompt.

When I try to run it in Emacs, I receive:

Running Pandoc...
apply: Searching for program: permission denied, /usr/bin/pandoc

I went to C:\Users\<user-name>\AppData\Roaming\.emacs.d\elpa\pandoc-mode... and changed the top line of

(defcustom pandoc-binary "usr/bin/pandoc"
"The full path of the pandoc binary."
:group 'pandoc
:type 'file)

to

(defcustom pandoc-binary "C:\Users\<user-name>\AppData\Local\Pandoc"

But I still get the exact same response regarding usr/bin/pandoc. I have tried reinstalling pandoc-mode, but I still get the issue. Perhaps some variable has been set, but I'm not quite fluent enough.

I tried downloading the package directly from github, and editing what I assume is the only occurrence of usr/bin/pandoc, but I still get error referring to it.

Any ideas on what to do?


ETA: I emailed the Author and his reply made me look harder for the variables in the emacs customization screen (they don't seem to be available in a persistent way). And I tried a few other things, I will try to record them here tomorrow. But I successfully converted one file in emacs a moment ago.

share|improve this question
    
I ran into the same issue yesterday. I modified the pandoc-mode.el file, deleted the .elc file and byte recompiled the whole folder. (defcustom pandoc-binary "c:\\Users\\<User Name>\\AppData\\Local\\Pandoc\\pandoc.exe" Afterwards everything worked as expected. –  hknust Jan 22 at 18:43

1 Answer 1

My issue may have been a combo of

  1. not finding the Emacs customization for pandoc-mode, and
  2. manual editing of pandoc file path may have had backslash vs. forward slash issues

Those together with inconsistencies in my troubleshooting steps until the problem was solved (after pandoc-mode author pointed me back towards looking for Emacs customization, possibly a bug as these seem only accessible while pandoc-mode is toggled on).

TLDR, sol'n:

  1. M-x pandoc-mode
  2. M-x customize-variable <RET> pandoc-binary <RET>
  3. edit path for pandoc binary (for instance, go to pandoc.exe, right click for properties, copy path)
  4. save changes

The rest of this post is a quick summary of the troubleshooting steps I took to solve:

location usr/... prevented pandoc-mode from functioning

could not find customization for pandoc-mode,
so tried manually editing the .el file, pandoc-binary "usr/bin/pandoc/"...

a copy paste of address to pandoc program did not seem to work,
my best bet of that problem is backslash versus forward slash issue
(I had tried various combos, such as slash escaping, \\...
and I thought I tried forward slash, but maybe not enough)

With author's suggestion, I looked harder for the Emacs customizations for pandoc-mode
it seems only available while pandoc-mode is toggled on

found the customization for path to pandoc-binary, copy pasted the path,
.emacs file seems to have automatically received fixed slashes
(c:\... is now c:/...)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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