Pandoc plugin do not find pandoc

Hello,

I have Inkdrop installed on all my devices but the Pandoc plugin does not work on my old (early 2011!!!) MacBook Pro.

I installed Pandoc via brew and I also installed the pandoc plugin for Inkdrop.
When I open Inkdrop, I have a tooltip saying:

Pandoc not found
Pandoc plugin requires an existing Pandoc installation to work.

I don’t think this is an issue. I do think that I missed something but cannot find the problem.

Can someone help me with this Pandoc issue please?

Hey @anon26336935,
pandoc is a community-made plugin, so it’s best to report bugs directly to the author as they can help you best. You can do this by submitting an issue on the GitHub repository. (GitHub - Thereatra/inkdrop-pandoc: Provides Pandoc integration for Inkdrop ⚠️ Pandoc installation required ⚠️)

Nevertheless, I took a quick look at this plugin and looked around to see if I could help you with this problem. It looks like this plugin determines the availability of pandoc by starting a process of pandoc -v. So you should check if the pandoc executable is in your path. (try running pandoc -v from the command line and see if that works)

(I don’t have a mac so I can’t test if it works for me or if you need to do some special macos things)

1 Like

Hello @Lukas,

Thanks for all the clarifications.
I several checked my $PATH and the command pandoc -v gave me the pandoc version.
But the pandoc is not installed tooltip is still there when I launch Inkdrop.

I still do think this is not an issue but more something from my mistake so I am not sure if I should create an issue on Github.

Anyway, thanks a lot for your help!

Sad to hear that it still doesn’t work.
I’ve taken a second look at it. It looks to me as if you have to enter the full path to the executable on macos if the parent process was not started from a shell (that has the additions to the path). (macos - Node.js child_process exec command scope - Stack Overflow, https://github.com/Thereatra/inkdrop-pandoc/blob/main/lib/pandoc.js#L8)

2 Likes

Thanks again @Lukas, but how can I tell the plugin to use to the full path of pandoc exec file?

Hey @anon26336935,
the easiest thing to do in this case would be to start Inkdrop via a console that contains the changes to the path variable.

Otherwise you can also introduce a workaround in Inkdrop via the init.js file. (The init file - Inkdrop API Reference)
To do this, you can edit the environment variables of the process when starting Inkdrop. You can enter this in your init.js. Change the value of pandocPath to your path to the folder containing the pandoc executable. Please make sure that you use the correct separator. In my case (Linux - Ubuntu) it is the : at the beginning.

const pandocPath = ":/home/test/Desktop/pandoc-3.1.11.1-linux-amd64/pandoc-3.1.11.1/bin"
if (!process.env.PATH.includes(pandocPath)) {
    process.env.PATH = process.env.PATH + pandocPath
    inkdrop.notifications.addInfo("added Pandoc to the path", {dismissable: true});
}

The best solution is of course that the plugin author supports entering the path to the pandoc executable in the settings.

I hope this helps you.

2 Likes

Good morning @Lukas !

Thanks a lot for your help. It is really helpful to understand how things work. Well, I should read the docs first, though :smiling_face_with_tear:

I will mark your last reply as the solution since the plugin author replied to me with an update of Pandoc Inkdrop plugin : in the settings, there is an option to change the pandoc exec path and it works perfectly now!

Thanks again for your help.
I wish you a wonderful day!

2 Likes