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

Pandoc plugin not working #15

Closed leesei closed 10 years ago

leesei commented 10 years ago

I'm on LDME 15 with ST3 and pandoc installed:

$ which pandoc 
/usr/bin/pandoc
$ pandoc -v
pandoc 1.9.4.2
Compiled with citeproc-hs 0.3.4, texmath 0.6.0.6, highlighting-kate 0.5.1.
Syntax highlighting is supported for the following languages:
    Actionscript, Ada, Alert, Alert_indent, Apache, Asn1, Asp, Awk, Bash,
    Bibtex, Boo, C, Changelog, Clojure, Cmake, Coffeescript, Coldfusion,
    Commonlisp, Cpp, Cs, Css, D, Diff, Djangotemplate, Doxygen, Dtd, Eiffel,
    Email, Erlang, Fortran, Fsharp, Gnuassembler, Go, Haskell, Haxe, Html, Ini,
    Java, Javadoc, Javascript, Json, Jsp, Latex, Lex, LiterateHaskell, Lua,
    Makefile, Mandoc, Matlab, Maxima, Metafont, Mips, Modula2, Modula3,
    Monobasic, Nasm, Noweb, Objectivec, Objectivecpp, Ocaml, Octave, Pascal,
    Perl, Php, Pike, Postscript, Prolog, Python, R, Relaxngcompact, Rhtml, Ruby,
    Scala, Scheme, Sci, Sed, Sgml, Sql, SqlMysql, SqlPostgresql, Tcl, Texinfo,
    Verilog, Vhdl, Xml, Xorg, Xslt, Xul, Yacc, Yaml
Copyright (C) 2006-2012 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.

But I got error when selecting "Pandoc" from the command palette:

SublimeLinter: annotations activated: <builtin> 
Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 526, in run_
    return self.run()
  File "Pandoc in /home/kylee/.config/sublime-text-3/Installed Packages/Pandoc.sublime-package", line 35, in run
  File "/opt/sublime_text/sublime.py", line 341, in show_quick_panel
    if len(items) > 0 and isinstance(items[0], list):
TypeError: 'dict_keys' object does not support indexing

My user Pandoc.sublime-settings:

{
  // Sets the path to the pandoc binary.
  "pandoc-path": "/usr/bin/",
}
leesei commented 10 years ago

Seems to be a duplicate of https://github.com/tbfisher/sublimetext-Pandoc/issues/12. But repo says it this plugin supports ST2/ST3.

tbfisher commented 10 years ago

I've ported this plugin as 2.x.x for ST3

ST2 will use 1.x.x

leesei commented 10 years ago

So... this should work?

tbfisher commented 10 years ago

now uses full path to executable, e.g. "/usr/bin/pandoc"