From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72920 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Saving module data in tuc file Date: Sun, 4 Dec 2011 10:36:27 +0100 Message-ID: <4092CA29-794C-404D-9AA0-E79F1B1DCE7D@googlemail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322991429 3795 80.91.229.12 (4 Dec 2011 09:37:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Dec 2011 09:37:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Dec 04 10:37:03 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RX8VL-0007fl-2i for gctc-ntg-context-518@m.gmane.org; Sun, 04 Dec 2011 10:37:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 38518CB133; Sun, 4 Dec 2011 10:37:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1O9erafK5Y5Q; Sun, 4 Dec 2011 10:36:55 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DA8F6CB12A; Sun, 4 Dec 2011 10:36:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A12FBCB12A for ; Sun, 4 Dec 2011 10:36:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id s++KHVsvQOvU for ; Sun, 4 Dec 2011 10:36:38 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id EA5BFCB111 for ; Sun, 4 Dec 2011 10:36:38 +0100 (CET) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pB49ab6S016332 for ; Sun, 4 Dec 2011 10:36:37 +0100 Original-Received: by wgbds13 with SMTP id ds13so3997815wgb.2 for ; Sun, 04 Dec 2011 01:36:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=V6uJ8Q4mQoNQUgqy7Dzu9rZk9V/9i3wu26YEHbxmyXY=; b=Tq2klfqsMp92JLHPhMpZ54nHnraNV0SZixsRLPTlwb20rTOvsLQacQtQIzR8YexJOj V3+yaDN8/cuhTgW1WJd7Wdd++8EwLCv2DPdtM3LbnZc8AJiVqjJKt6vqIz9SNTHK3Eba aaHGOa31fvnpkpORoaNBOrI8lTJRQ5G6WP/8E= Original-Received: by 10.180.3.37 with SMTP id 5mr7298177wiz.43.1322991396461; Sun, 04 Dec 2011 01:36:36 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFBB17.dip.t-dialin.net. [87.175.187.23]) by mx.google.com with ESMTPS id fk3sm21220092wbb.10.2011.12.04.01.36.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Dec 2011 01:36:35 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cG4VAB5i - 001d5c2e5ff8 - 20111204 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72920 Archived-At: Am 04.12.2011 um 01:20 schrieb Aditya Mahajan: > Hi, > > How does one save and read third-party data in tuc file at the lua end? > > I am trying to write a module t-ifchanged that defines a \doiffilechanged macro that provides the functionality of mtxrun --ifchanged without calling an external program (This is meant to be a support module for t-vim, where the external calls to mtxrun are too time consuming). > > I can successfully write additional data to the tuc file, but cannot figure out how to initialize the data from tuc file. (See attached file). Any hints are welcome. \definetwopasslist{test} \newcount\testcount \starttext \immediatesavetwopassdata{test}{}{First Entry} One: \gettwopassdata{test}\twopassdata \startluacode commands.savetwopassdata("test","Second Entry") \stopluacode Two: \ctxlua{commands.gettwopassdata("test")} \stoptext Wolfgang ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________