vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

Error when trying to use executors #84

Closed bpj closed 10 years ago

bpj commented 11 years ago

I get the following error when trying to use executors:

Fel upptäcktes vid bearbetning av function pandoc_exec#PandocExecute:
rad    3:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 33, in pandoc_execute
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] Filen eller katalogen finns inte

The first two and the last line are partially in Swedish unfortunately. They mean:

Error detected while processing function pandoc_exec#PandocExecute:
line 3:

OSError: [Errno 2] The file or directory doesn't exist

BTW:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:22:36) Inkluderade patchar: 1-429

Ubuntu 12.04 64-bit

fmoralesc commented 10 years ago

I'm going over bug reports (I'm back on the project after a long hiatus).

I think this error was caused by pandoc not being found in $PATH. If you have installed pandoc locally, you might need to add its location in your .vimrc:

let $PATH=$HOME."/.cabal/bin/:" .$PATH

That said, we should protect the execution catching this exception.

dbowden commented 10 years ago

I am getting the same error message as above, even after pulling the latest commit. I am on Windows 8, with gVim 7.4. It seems to be finding pandoc without any trouble - the conversions are performed successfully, even with the error. The problem is opening the new format. In fact, there is no error message for the executors that don't open the file. My viewers are all registered on the system path, and other plugins like latex suite are able to find them without problems.

I am wondering if this could be an issue with file paths on Windows - some programs, including vim, recognize the unix "~/" representation of the home folder, but others don't know how to convert that to the Windows equivalent. Or maybe I just need to hard code paths to my viewers in my vimrc?

Also, I didn't know if it would be better to open a new issue or add a comment to a closed one, so I figured I'd start here.

fmoralesc commented 10 years ago

dbowden: This is a separate issue. In windows, we launch the viewer for the created file using the command

cmd /x "start FILE"

I don't have a Windows 8 machine around, but could you please check if you can run that from the command prompt in windows? Windows 8 might need to use a different thing.

dbowden commented 10 years ago

Thanks for the quick reply. That command appears to be recognized. It the opening message with copyright info, or if called from vim it opens the command prompt.

Running vim in compatibility mode for Windows 7 or Windows XP doesn't fix the issue.

On Wed, Nov 6, 2013 at 1:08 PM, Felipe Morales notifications@github.comwrote:

dbowden: This is a separate issue. In windows, we launch the viewer for the created file using the command

cmd /x "start FILE"

I don't have a Windows 8 machine around, but could you please check if you can run that from the command prompt in windows? Windows 8 might need to use a different thing.

— Reply to this email directly or view it on GitHubhttps://github.com/vim-pandoc/vim-pandoc/issues/84#issuecomment-27903246 .

fmoralesc commented 10 years ago

Did you try opening a file using start from the command prompt?

fmoralesc commented 10 years ago

Checking this document, we might be passing the wrong argument to cmd. Can you try changing the /xflag in line 92 of autoload/pandoc_exec.vim to /c?

dbowden commented 10 years ago
  1. Yes, I'm able to open specific files using start. The same files produce the executor error when I try to convert and open them.
  2. Changing the /x to /c did not fix the issue.
fmoralesc commented 10 years ago

Sorry, read that last report wrong.