From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Lukas/ConTeXt <lpr.context@email.cz>
Subject: Re: Automatic userdata storage between runs
Date: Wed, 24 Jun 2020 13:38:05 +0200 [thread overview]
Message-ID: <d1c40aa2-f548-9b2c-b767-39107c9eafd4@xs4all.nl> (raw)
In-Reply-To: <7Tn.6ApBi.Ecqgvin1sG.1UylYi@seznam.cz>
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 : ntg-context@ntg.nl / 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
___________________________________________________________________________________
prev parent reply other threads:[~2020-06-24 11:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 6:54 Lukas/ConTeXt
2020-06-24 11:38 ` Hans Hagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1c40aa2-f548-9b2c-b767-39107c9eafd4@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=lpr.context@email.cz \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).