From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34785 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: installprogram problem Date: Fri, 25 May 2007 13:35:12 -0400 Message-ID: <20070525133512.r4w3fv9woco080os@web.mail.umich.edu> References: <20070509134753388024.4891e389@st.estfiles.de> <9F9905DC-631B-4DBF-B82F-CC0822789E8C@fiee.net> <20070510093615096094.ecc8ab1e@st.estfiles.de> <20070510134429.GC16506@phare.normalesup.org> <6faad9f00705110931l1f9d40a2n6cc7c5eb95c25a16@mail.gmail.com> <20070514094534919232.dfdd911c@st.estfiles.de> <46554EE4.8090600@elvenkind.com> <954f61110705240357q247c72f5s5ceb694679fecf39@mail.gmail.com> <46557A00.1080909@elvenkind.com> <58EE20F2-976B-4E9D-BD9F-6A9016EFFB77@fiee.net> <20070524160038.omb18tctsows0kg4@web.mail.umich.edu> <465715EA.5070605@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1180114532 26820 80.91.229.12 (25 May 2007 17:35:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 May 2007 17:35:32 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri May 25 19:35:30 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HrdhH-0006S3-RZ for gctc-ntg-context-518@m.gmane.org; Fri, 25 May 2007 19:35:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 695B81FFD1; Fri, 25 May 2007 19:35:27 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16560-02; Fri, 25 May 2007 19:35:19 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EF69D1FF7C; Fri, 25 May 2007 19:35:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B08A41FF7C for ; Fri, 25 May 2007 19:35:17 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17265-01-2 for ; Fri, 25 May 2007 19:35:13 +0200 (CEST) Original-Received: from ojibwe.web.itd.umich.edu (ojibwe.web.itd.umich.edu [141.211.144.146]) by ronja.ntg.nl (Postfix) with ESMTP id 9CE141FF76 for ; Fri, 25 May 2007 19:35:13 +0200 (CEST) Original-Received: (from www@localhost) by ojibwe.web.itd.umich.edu (8.12.10/8.12.9) id l4PHZCog022373 for ntg-context@ntg.nl; Fri, 25 May 2007 13:35:12 -0400 Original-Received: from wwwgate31.motorola.com (wwwgate31.motorola.com [136.182.158.129]) by web.mail.umich.edu (Horde MIME library) with HTTP; Fri, 25 May 2007 13:35:12 -0400 In-Reply-To: <465715EA.5070605@wxs.nl> Content-Disposition: inline User-Agent: Internet Messaging Program (IMP) H3 (4.0.5) X-Remote-Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 X-IMP-Server: 141.211.144.230 X-Originating-IP: 136.182.158.129 X-Originating-User: adityam X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34785 Archived-At: Quoting Hans Hagen : > Aditya Mahajan wrote: >> Hi, >> >> There is a bug in texutil.rb Here is a simple test. Create test.tex >> >> > strange indeed, mayb esome leftover from the perl version > > fixed; thanks The to_i in def MyExtras::writer also looks suspicious. The tuo file has wrong information % programs: 2 % % echo "test" (echo "test") % echo "test again" (echo "test") I think that def MyExtras::writer can be simplified to def MyExtras::writer(logger,handle) handle << logger.banner("programs: #{@@programs.size}") @@programs.each do |p| # handle << "% #{p} (#{@@programs[p.to_i]})\n" handle << "% #{p}\n" end end or maybe the slightly more informative def MyExtras::writer(logger,handle) handle << logger.banner("programs: #{@@programs.size}") @@programs.each_with_index do |cmd, p| # handle << "% #{p} (#{@@programs[p.to_i]})\n" handle << "% #{p+1} (#{cmd})\n" end end BTW, using p as a variable name is not a good idea in ruby. p prints out the output of inspect, and is useful while debugging programs. Compare a = /ad?/ b = a.match("Dad") puts b p b puts b.inspect Aditya ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________