Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow panderOptions() to specify a path to the binary #127

Closed
ctoforaday opened this issue Nov 7, 2014 · 3 comments
Closed

Allow panderOptions() to specify a path to the binary #127

ctoforaday opened this issue Nov 7, 2014 · 3 comments

Comments

@ctoforaday
Copy link

It would be awesome if it were possible to specify a particular location for pandoc that isn't on the path.

Specifically, at

cmd <- sprintf('pandoc -f markdown -s %s %s -o %s', options, shQuote(f), shQuote(f.out))

we build the string we execute, with the name of the binary. Any chance of just allowing the user to specify it in panderOptions() and paste() the string together?

@daroczig
Copy link
Member

daroczig commented Nov 7, 2014

Please test, and let me know if it works fine or results in some side-effects.

@ctoforaday
Copy link
Author

Good change.

  • Verified panderOptions() looks healthy, and correctly reports fq location of binary.
  • Verified setting correctly and incorrectly.

Thanks, looks good.

Side effect will be that once Pander is loaded into R, changes to path will not affect the discovered binary until package reload. You may choose to leave the default as the non-specific, path-less 'pandoc' and leave the command to get its path evaluated at the moment of execution, but I don't really think that's necessary. It is a small change in behaviour, but it's unlikely to result in any confusion, IMO, given the difficulty of altering PATH from inside R.

@daroczig
Copy link
Member

Thanks for your kind feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants