On 6/24/2020 8:54 AM, Lukas/ConTeXt wrote:
Hello,
first - thanks for the perfectly synoptical
https://wiki.contextgarden.net/Programming_in_LuaTeX#Namespaces !
My question (and the answer sould appear on wiki, too):
Is any of the namespaces (userdata, thirddata, moduledata, documentdata,
parametersets) automatically serialized between Ctx first(-second(-third)) runs?
no, if only because they are not meant to store runtime data
I'm asking because user may call some (longer) code and put the result into a namespace (be it e.g.
"userdata"). And if that namespace was automatically serialized for next run(s), that
code could be called conditionally - typically just in first run (= mode "*first"
enabled) - as in next runs results of the additional code would be available in a namespace
(instead of repetitive call of that (longer) code).
Of course, user can perform such evaluation, storage and conditional
extra-code-call individually, but maybe there is some support for similar
situations in Ctx.
there is a twopassdata mechanism for storing stuff but other than that
you can just write to a file and then check that (depending on what run
you have)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________