On Sun, 4 Dec 2011, Hans Hagen wrote:
On 4-12-2011 01:20, Aditya Mahajan wrote:
Hi,
How does one save and read third-party data in tuc file at the lua end?
I am trying to write a module t-ifchanged that defines a \doiffilechanged macro that provides the functionality of mtxrun --ifchanged without calling an external program (This is meant to be a support module for t-vim, where the external calls to mtxrun are too time consuming).
This is why we have a mechanism built in (used for graphics).
Ah, I didn't know that.
I can successfully write additional data to the tuc file, but cannot figure out how to initialize the data from tuc file. (See attached file). Any hints are welcome.
There is:
jobfiles.run("yourfile.xxx","vim --something yourfile.xxx")
This works in a standalone file, but not the way I am calling the function. \def\executeCommand {\doifmode{*first} {\ctxlua{job.files.run(\!!bs\externalfiter::input_file\!!es, \!!bs\externalfiltercommand\!!es)}}} The solution is to remove the test for the first mode. Needs a bit of refactoring to ensure that the solution still works for MkII. (Does anyone use the filter module with MkII?) Aditya