jclement / SublimePandoc

Sublime Text 2 Plugin for the Pandoc Markdown Renderer
34 stars 12 forks source link

fix issue on windows binary searching. #12

Closed zyxar closed 6 years ago

zyxar commented 11 years ago

windows path is separated by ;

vovkkk commented 11 years ago

Yeah, it works! But on Windows (and also on Linux if I recall correct) if Pandoc in PATH (and it is in PATH after standard installation) then you can just call 'pandoc' by subprocess.

So my question (just curiosity): ain't it better to run 'pandoc' first and if it failed, then trying to figure out something?

zyxar commented 11 years ago

@vovkkk I somewhat agree with you. But I would like to respect users' settings first.

So, would it be better that before searching in env.path, try to make a subprocess call?

I'm also considering to save detected pandoc to user preference.

vovkkk commented 11 years ago

Excuse me for late reply, please.

Yes, I understand taking account of settings. But my point was that there is no need to search in PATH (at least on Windows):

FWIW, I tested your last changes 17baf39 and it ain't work anymore with unicode, I have md with Cyrillic symbols; it says:

Traceback (most recent call last):
  File ".\sublime_plugin.py", line 356, in run_
  File ".\PandocRender.py", line 93, in run
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-15: ordinal not in range(128)

3-15 is Беллетристика