tbfisher / sublimetext-Pandoc

A Sublime Text plugin that uses Pandoc to convert text from one markup format into another. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, OPML, or Haddock markup to XHTML, HTML5, HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides, Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, EPUB version 2 or 3, FictionBook2, DocBook, GNU TexInfo, Groff man pages, Haddock markup, OPML, LaTeX, ConTeXt, LaTeX Beamer slides, PDF via LaTeX, Markdown, reStructuredText, AsciiDoc, MediaWiki markup, Emacs Org-Mode, Textile, or custom writers can be written in lua.
MIT License
137 stars 26 forks source link

Not loading user settings #18

Closed xiaoshanhuang closed 10 years ago

xiaoshanhuang commented 10 years ago

can't locate pandoc even when "pandoc-path" was set in user settings, seems the user setting is not loaded correctly, works fine when default setting is correct.

tbfisher commented 10 years ago

please show your settings file.

xiaoshanhuang commented 10 years ago
{
    "pandoc-path": "/usr/local/bin/pandoc"
}

while my pandoc is in the correct path

which pandoc
/usr/local/bin/pandoc

I checked the code and

pandoc = _find_binary('pandoc', _s('pandoc-path'))

where _s('pandoc-path') returns None

tbfisher commented 10 years ago

Your settings file should look like

{

  "default": {

    "pandoc-path": "/usr/local/bin/pandoc",

or

{

  "user": {

    "pandoc-path": "/usr/local/bin/pandoc",

The difference being default will overwrite the default settings, while user will be merged.

Also, when running pandoc in sublime text, if you open the console you can see the command the module tries to execute.

xiaoshanhuang commented 10 years ago

got it, thanks!