Code Monkey home page Code Monkey logo

Comments (16)

fmoralesc avatar fmoralesc commented on June 1, 2024

It seems the pandoc executable couldn't run, or the output wasn't received. Maybe pandoc is not in the executables PATH variable available to Gvim? You can test for it issuing (within Gvim):

:echo executabe("pandoc")

If the output is 0, you probably need to add the place the pandoc executable is to $PATH, like this (assuming pandoc is in "$HOME/pandoc", but I'm not sure where it resides in Windows):

let $PATH = "$HOME/pandoc:".$PATH

I don't have a Windows machine available to test, sadly.

from vim-pandoc.

MatthewVance avatar MatthewVance commented on June 1, 2024

Thanks for the response. This may very well be the cause of what I'm
seeing. I hope to have some time to test this tomorrow. I plan to post what
I learn after testing. Thanks again.

On Apr 29, 2014, at 6:44 PM, Felipe Morales [email protected]
wrote:

It seems the pandoc executable couldn't run, or the output wasn't received.
Maybe pandoc is not in the executables PATH variable available to Gvim? You
can test for it issuing (within Gvim):

:echo executabe("pandoc")

If the output is 0, you probably need to add the place the pandoc
executable is to $PATH, like this (assuming pandoc is in "$HOME/pandoc",
but I'm not sure where it resides in Windows):

let $PATH = "$HOME/pandoc:".$PATH

I don't have a Windows machine available to test, sadly.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/29#issuecomment-41741587
.

from vim-pandoc.

MatthewVance avatar MatthewVance commented on June 1, 2024

Well, I just tested it and :echo executabe("pandoc") returned 1 even though it was not set in my _gvimrc file. I assume a 1 was still returned because Pandoc was already set in my Window's $PATH variable. Just in case it was also needed in my _gvimrc file, I added let $PATH = "%LOCALAPPDATA%\Pandoc\:".$PATH: and re-tested after restarting gVim. Unfortunately, I received the same error as before.

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

What is the output of

Pandoc! pdf

if you add this line after line 51 in pythonx/pantondoc/command.py

 print list(PandocHelpParser._get_formats())

?

from vim-pandoc.

MatthewVance avatar MatthewVance commented on June 1, 2024

Thanks for your continued help. The output of the error is shown below:

image

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

I see what the problem is now. The _get_formats() method doesn't split pandoc's output correctly and as a consequence gathers wrong info. I'm trying to fix it now, it shouldn't be too hard.

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

I just pushed a change that should fix this issue. Please confirm ;)

from vim-pandoc.

MatthewVance avatar MatthewVance commented on June 1, 2024

I pulled down the update and retested it. I'm seeing a new errors now.

image

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

Do you have python installed and available in $PATH? If not, that is the issue now.

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

Ah! Even if you had python in PATH, it probably wouldn't work, because we are assuming the *nix convention of using

#!/usr/bin/env python

to specify the interpreter to run the async.py script with. Working on this.

from vim-pandoc.

MatthewVance avatar MatthewVance commented on June 1, 2024

Python is installed and was available in my Windows $PATH. Waiting till I hear back from you. Please let me know if I need to explicitly set Python's path in my .vimrc file. Thanks again.

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

In that case, it could be as simple as changing line 172 in command.py to

async_command = " ".join(["python", async_runner, servername_arg, open_arg, self._run_command])

Can you confirm?

I'm working on covering the situation where python is not available too, so the fix will appear in master later.

from vim-pandoc.

MatthewVance avatar MatthewVance commented on June 1, 2024

After making the change, Vim does not show an error when I try to run the plugin. Now a file called pandoc.out is written to the same directory as my markdown file I'm trying to convert. The contents of that file are:

python: can't open file 'C:Usersusernamevimfilesbundlevim-pantondocpythonxpantondocasync.py': [Errno 2] No such file or directory

It looks like it is not properly adding a "" between folders. I think it should be:

python: can't open file 'C:\Users\username\vimfiles\bundle\vim-pantondoc\pythonx\pantondoc\async.py

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

Indeed. This part of the problem is quite odd. It seems to be caused by our call to os.path.join() in line 169. I'm testing now on a VM.

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

I just pushed a partial fix for the pandoc problems. There's a couple of issues yet: the async callback doesn't seem to be run, and the pandoc.out file isn't cleaned up on correct execution. I'm working on that now.

(incidentally, these changes might solve issues #15, #16 and #17.)

from vim-pandoc.

fmoralesc avatar fmoralesc commented on June 1, 2024

Just pushed a couple of commits that should solve all issues I found when using :Pandoc and :Pandoc! under Windows.

from vim-pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.