On 23. Feb 2018, at 22:00, Hans Hagen
wrote: maybe you mean
\startluacode
context.setupdocument { gitversion = string.strip( os.resultof("git --no-pager log --pretty='%h of %aD' -1 " .. environment.jobfilefullname) or "") }
\stopluacode
\setupfootertexts [this is from file: \documentvariable{gitversion}]
\starttext
[[\ctxlua{context(environment.jobfilefullname)}]]
[[\ctxlua{context(environment.jobfilename)}]]
\ctxlua{inspect(table.sortedkeys(environment))}
test
\stoptext
Yes, sorry, I wasn’t clear enough. environment.jobfilefullname is excellent, I can work from here. Just to provide a clearer explanation: I have an environment style.tex. With it, I process a number of xml files: foo.xml, bar.xml, arg.xml with the call context —environment style foo.xml etc. and I want the git revision of the xml file printed not of the style file, obviously). jobfilefullname does what I want, and I’ll look into the other variables as well. Very handy, thanks! Thomas