Skip to content

Pandoc not finding custom writer #2625

Closed
noamross opened this Issue · 2 comments

3 participants

@noamross

Running pandoc (via rmarkdown in R) with a custom writer like so:

usr/local/bin/pandoc +RTS -K512m -RTS test.utf8.md --to /Users/noamross/Library/R/3.2/library/ehastyle/outbreak.lua --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.html --smart --email-obfuscation none --css /Users/noamross/Library/R/3.2/library/ehastyle/outbreak-template.css

I get the following error:

pandoc: Could not find data file /usr/local/Cellar/pandoc/1.16/share/x86_64-osx-ghc-7.10.3/pandoc-1.16/data/templates/default./users/noamross/library/r/3.2/library/ehastyle/outbreak.lua

I can confirm that /Users/noamross/Library/R/3.2/library/ehastyle/outbreak.lua exists. The long path to the pandoc directory is due to the installation being via homebrew, but it's the right path. Pandoc seems to not find the writer file and try to find it in the default directory instead.

I get the error when running pandoc directly in the command line, as well. Sometimes I don't get this error when I remove some of the other arguments, though I haven't been able to figure out exactly which combination does this.

@technocrat

Does the data file directory

pandoc: Could not find data file /usr/local/Cellar/pandoc/1.16/share/x86_64-osx-ghc-7.10.3/pandoc-1.16/data/templates/default./users/noamross/library/r/3.2/library/ehastyle/outbreak.lua

actually contain ..templates/default./ ... with the period after default?

@jgm
Owner
@jgm jgm added a commit that closed this issue
@jgm Improved default template lookup for custom lua scripts.
Previously, if you tried to do `pandoc -s -t /path/to/lua/script.lua`,
pandoc would look for the template in
`~/.pandoc/templates/default./path/to/lua/script.lua`.
With this change it will look in the more reasonable
`~/.pandoc/templates/default.script.lua`.

This makes it possible to store default templates for custom
writers.

Closes #2625.
a5efd2a
@jgm jgm closed this in a5efd2a
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm Improved default template lookup for custom lua scripts.
Previously, if you tried to do `pandoc -s -t /path/to/lua/script.lua`,
pandoc would look for the template in
`~/.pandoc/templates/default./path/to/lua/script.lua`.
With this change it will look in the more reasonable
`~/.pandoc/templates/default.script.lua`.

This makes it possible to store default templates for custom
writers.

Closes #2625.
dc699ff
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm Improved default template lookup for custom lua scripts.
Previously, if you tried to do `pandoc -s -t /path/to/lua/script.lua`,
pandoc would look for the template in
`~/.pandoc/templates/default./path/to/lua/script.lua`.
With this change it will look in the more reasonable
`~/.pandoc/templates/default.script.lua`.

This makes it possible to store default templates for custom
writers.

Closes #2625.
d86789b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.