From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74887 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Including command output Date: Mon, 5 Mar 2012 22:05:22 -0500 (EST) Message-ID: References: <1330916832.17258.45.camel@kip-laptop> <1330997549.17258.55.camel@kip-laptop> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-126680707-1331003125=:15921" X-Trace: dough.gmane.org 1331003149 15913 80.91.229.3 (6 Mar 2012 03:05:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2012 03:05:49 +0000 (UTC) Cc: mailing list for ConTeXt users To: Kip Warner Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 06 04:05:48 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S4kii-0000sk-8w for gctc-ntg-context-518@m.gmane.org; Tue, 06 Mar 2012 04:05:48 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 858A1CB2AA; Tue, 6 Mar 2012 04:05:47 +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 XIZQfgxB03Ww; Tue, 6 Mar 2012 04:05:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CCBC4CB2A2; Tue, 6 Mar 2012 04:05:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B9F09CB2A2 for ; Tue, 6 Mar 2012 04:05:42 +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 BT-ARTX4PXn7 for ; Tue, 6 Mar 2012 04:05:30 +0100 (CET) Original-Received: from filter5-ams.mf.surf.net (filter5-ams.mf.surf.net [192.87.102.73]) by balder.ntg.nl (Postfix) with ESMTP id 68FF8CB29B for ; Tue, 6 Mar 2012 04:05:30 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter5-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q2639rUm008309 for ; Tue, 6 Mar 2012 04:09:54 +0100 Original-Received: FROM adi-netbook (bas3-montreal02-1096681081.dsl.bell.ca [65.94.6.121]) By tombraider.mr.itd.umich.edu ID 4F557EF4.CFDC8.14733 ; Authuser adityam; 5 Mar 2012 22:05:25 EST In-Reply-To: <1330997549.17258.55.camel@kip-laptop> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0IGG39Rwb - b3bc695252a7 - 20120306 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.73 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:74887 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-126680707-1331003125=:15921 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Mon, 5 Mar 2012, Kip Warner wrote: > On Sun, 2012-03-04 at 23:20 -0500, Aditya Mahajan wrote: >> If you want to use the automagic way, you can define \BazaarRevision to >> redefined \BazaarRevision, for example: >> >> \def\BazaarRevision >> {\ctxlua{context.setevalue( >> "BazaarRevision", >> os.resultof"bzr revno | tr -d '\\n'")}% >> \BazaarRevision} > > Hey Aditya. I tried the automagic method, but ConTeXt bails: > > ! TeX capacity exceeded, sorry [text input levels=127]. > \BazaarRevision ...ltof"bzr revno | tr -d '\\n'")} > \BazaarRevision > l.4 } > > \BazaarRevision ...ltof"bzr revno | tr -d '\\n'")} > \BazaarRevision > l.4 } > > \BazaarRevision ...ltof"bzr revno | tr -d '\\n'")} > \BazaarRevision > l.4 } > > ... > l.58 The attached file works at my end. > > Based on what I saw from htop, it looks like it running the command into > the ground over and over again which is the exact opposite of what we > are trying to do. No. It is defining \BazaarVersion once and then reusing the result. Add \loggingall to your file to see what is happening. Aditya --8323328-126680707-1331003125=:15921 Content-Type: APPLICATION/x-tex; name=test.tex Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=test.tex XGRlZlxCYXphYXJSZXZpc2lvbgogICAgICAge1xjdHhsdWF7Y29udGV4dC5z ZXRldmFsdWUKICAgICAgICAgICAgICAgICgiQmF6YWFyUmV2aXNpb24iLAog ICAgICAgICAgICAgICAgICBvcy5yZXN1bHRvZiJienIgcmV2bm8gfCB0ciAt ZCAnXFxuJyIpfSUKICAgICAgICBcQmF6YWFyUmV2aXNpb259Cgpcc3RhcnR0 ZXh0CgpIZWxsbyBcQmF6YWFyUmV2aXNpb24gQnllCgpcc3RvcHRleHQKCg== --8323328-126680707-1331003125=:15921 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --8323328-126680707-1331003125=:15921--