-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Expose more system functionalities to Lua #5468
Conversation
This adds about 40kB to the executable. |
What happens if you |
Indeed. The directory doesn't change after pandoc exits, but with
I'll have to add |
The current working directory and environment will now be restored after each Lua invocation. |
A bit more context for this PR.
Other features that I think could be helpful, but aren't implemented (yet):
|
I am still a bit worried about these environment-polluting things; would it make more sense to add functions like |
That makes sense and seems like the cleaner solution. My approach will then be to remove the |
I think it should be harmless to keep the "getter" functions exposed: e.g. |
7aacf6e
to
4c544e8
Compare
Should be ok now. I left out |
The `system` Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or pandoc.system.with_temporary_directory('tikz', function (dir) -- write and compile a TikZ file with pdflatex end)
Confused about this, since there is still |
|
The
system
Lua module provides utility functions to interact with theoperating- and file system. Like the
text
module, thesystem
modulemust be loaded before use. E.g.