On Wed, 23 Feb 2011, Marco wrote:
context --purgeall filename
should remove all temporary files belonging to the document like
filename-externalfilter-CON-0.tmp % not removed filename-externalfilter-CON-0.tmp.md5 % not removed filename-externalfilter-CON-0.vimout % not removed
So after the project is done one can run context --purgeall filename to get a clean directory structure without having to archive 30 temporary files.
I don't know how to implement this functionality and still provide a working pdf. To save time, t-vim (actually t-filter with continue=yes) runs the external filter only in the first run; in the subsequent runs the cached file is used. So, if I want to delete the temporary files, they must be deleted in the last run. Right now, there is no means of detecting the last run in MkIV. In MkII, we can force a final run with --final, but there is no means to detect that run. Even if the mode could be detected, asking context to delete temporary files forces another run, so the attachments will be missing in the final run. I am happy to provide the 'purge temp files' as a MkIV only feature, but I don't know how to force (and detect) a final run in MkIV. Aditya