I'm wondering whether it is possible, and if so how, to save the contents of a ConTeXt buffer to file. Well, I know that the command \savebuffer[<buffername>][<filename>] exists, but it saves the file in the same location as the .tex file. I was hoping I could save the file in a subdirectory, say ./temp, to avoid cluttering up the main working directory. But that doesn't work. MWE:
\starttext
\startbuffer[code]
-- some lua code for examples sake
local x = 2
local y = math.sqrt(x)
\stopbuffer
% works
\savebuffer
[code]
[code.lua]
% doesn't work
\savebuffer
[code]
[/temp/code.lua]
\stoptext
\savebuffer[code][temp/code.lua]? – TeXnician May 28 '17 at 16:28