mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] how to read <write|aux|<tuple|key|value>> data back again


Chronological Thread 
  • From: "Sam Liddicott" <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] how to read <write|aux|<tuple|key|value>> data back again
  • Date: Tue, 20 Jul 2010 15:54:54 +0100
  • Envelope-to: address@hidden
  • Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAADxQTFRF NTdQY2Z/i286eHFugnNXoJBwm5GCs5VeoqO0ua+fwLCQ4c2q19C81NDF4eLr/unQ/PTf/fXW+/rq /f/7XKo76wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi9JREFUSMetloGSqyAMRVsFNAQkxP//15cE 62rFdt/MZqbTVu/hBhLEx/qf8fgDIAN455wHyPk7wCIe9nA+fwGSH87hgD8AHPfRpy2GwdMtcBh+ mg4Ech9Ih+RNixJKDLEL0GF8VLkSojePHrDlryNijbFW8zBg8PUKbBOI6D1WCV5Rf2DzxCtgBlMs tRRVW5LyVW3ew1TfAZZ6RcQicpb4yZmaC74DJADK6BdATOrUAbJzsZie+K22ZnEBknNYysvhVH6u 1X8CqAe4DuANoPoOrAbsHXUARJ5knc5z4EyyTnHoAqj7xvkYIdk65AwhyEZKMusOIDV2QQQaCnDQ gBiDR3RdIEb5CBESt2wgQJI0Yx/Agphg1MgNsD+QkszM9wHVPx/PeQOW+fmcR9DF8+4CyCJhCuP8 fDzmBbLqs8JzMODqYNfDvKhoGYM2lDosy5jlRozccRAgrPM8iygQS3Mv87IugUgKlC7NZ6liuy4r uresVq5QuQAr09ZKEga8OkluyKXeQ6Bs3SrtqgC1pWLNqAfwDhBnB+sK8OrVL4D4h1B4zWPWhJhu gPUHKA5EwSMYUMsdQK+UKDhIOTSHeg+8HCoTOGtB/gwcl4mSdGybwXegPWhM/RHYKwchkckhUNMX 6j7ueQNScLbZZOPRxaADyO2UQCJpl7wbnE6gQ+ksWjpngxOwF1tF5ecP3R6KB+AQxPfHLncQ+nKw 06fhu68OTIfJ869eTtg22l+9zfwDK3mKl5BFHMYAAAAASUVORK5CYII=

On 19/07/10 22:06, Sam Liddicott wrote:
If I write data using <write|aux|<tuple|key|value>>, how do I get to read it back again.

I've looked in the .ts and .scm files to see how the glossary and stuff do it but I haven't managed it yet.

Also; how should I use the <collection> and <associate> primatives.

I need these to finish off the rendering macros for literate programming so that later chunks can leave messages for previous chunk of the same name.

I've done it in a hackey way for now.
I use: <write|nf-chunk|<tuple|nf-this-chunk-id|...>> when I create a label

At the top of the document I have to insert a dodgy toc (for now - it can't be in the ts file).
<assign|nf-chunks-index|<\table-of-contents|nf-chunk></table-of-contents>>
<nf-parse-look-ahead>

The toc is assigned to a variable nf-chunks-index; I have a macro nf-parse-look-ahead which navigates the toc to get back the tuples - and then defines global variables based on the first tuple member:
<assign|nf-parse-look-ahead|<macro|<with|nf-chunks-index|<look-up|<look-up|<look-up|<value|nf-chunks-index>|0>|1>|4>|<with|i|0|<while|<less|<value|i>|<get-arity|<value|nf-chunks-index>>>|<assign|<merge|nfla-|<look-up|<look-up|<value|nf-chunks-index>|<value|i>>|0>>|<look-up|<value|nf-chunks-index>|<value|i>>><assign|i|<plus|<value|i>|1>>>>>>>

So (as long as I "update" my document) I can tell if a future chunk is (probably) (going to be) defined by looking for the variable defined.

I've tried guessing how the depracted "env" command works, and using extern functions to replicate what the toc stuff does but it's not obvious.

This filthy hack will do for now...

But please someone tell me the inverse of <write|aux

Sam

--
Sam's signature



Archive powered by MHonArc 2.6.19.

Top of page