From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40611 Path: news.gmane.org!not-for-mail From: "Wolfgang Werners-Lucchini" Newsgroups: gmane.comp.tex.context Subject: Re: mplib Date: Wed, 23 Apr 2008 08:18:44 +0200 Message-ID: <480EF0E4.22072.26A477@wwl.musensturm.de> References: 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: ger.gmane.org 1208931052 12742 80.91.229.12 (23 Apr 2008 06:10:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2008 06:10:52 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 23 08:11:27 2008 connect(): Connection refused 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 1JoYCT-00015H-Kx for gctc-ntg-context-518@m.gmane.org; Wed, 23 Apr 2008 08:11:25 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 69E9A1FBDB; Wed, 23 Apr 2008 08:10:41 +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 27004-06-3; Wed, 23 Apr 2008 08:09:54 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7C26D1FB38; Wed, 23 Apr 2008 08:09:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 643CC1FB38 for ; Wed, 23 Apr 2008 08:09:53 +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 27013-01-2 for ; Wed, 23 Apr 2008 08:09:12 +0200 (CEST) Original-Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by ronja.ntg.nl (Postfix) with ESMTP id 7B3261FB14 for ; Wed, 23 Apr 2008 08:09:12 +0200 (CEST) Original-Received: from [192.168.178.20] (fuld-590d1fe2.pool.einsundeins.de [89.13.31.226]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1JoYAJ2eyC-0007Pc; Wed, 23 Apr 2008 08:09:11 +0200 Priority: normal In-reply-to: X-mailer: Pegasus Mail for Windows (4.41, DE v4.41 R1) Content-description: Mail message body X-Provags-ID: V01U2FsdGVkX1/0DwFNniKjzRWIoYmdFeISJOv9/KFIMDF4NxU SoaTkaaxMh0Vu7soGkWtui92NVVOpirp8TMMGjdjYSrblQwALm TsUf3glEEiqM/AQPVe3B5LY49AYmy9H 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:40611 Archived-At: Hallo Taco et al > >>>> \startlua > >>>> local function finder(name, mode, ftype) > >>>> if mode=="w" then > >>>> return name > >>>> else > >>>> return kpse.find_file(name,ftype) > >>>> end > >>>> end > > > > Jein! > > > > Try this, a little more elaborate, version of finder: > > local function finder(name, mode, ftype) > local found > if mode=="w" then > found = name > else > found = kpse.find_file(name,ftype) > end > print("MPlib finder: " .. name .. " -> " .. found) > return found > end > > maybe that will give a clue. Example 1: my test file with your finder. -------------------------------------------------------------- MPlib finder: mpost.mp -> d:/context/tex/texmf/metapost/base/mpost.mp MPlib finder: mpost.map -> MPlib finder: plain.mp -> d:/context/tex/texmf/metapost/base/plain.mp t={ ["log"]="This is MetaPost, Version 1.003 (INIMP) 23 APR 2008 07:51 (mpost.mp(plain.mp\ Preloading the plain mem file, version 0.99)", ["status"]=0, ["term"]="This is MetaPost, Version 1.003 (Cweb version 0.40) (INIMP)\ (mpost.mp(plain.mp\ Preloading the plain mem file, version 0.99)", } MPlib finder: mpost.mem -> t={ ["log"]=" )\ Beginning to dump on file mpost.mem\ (mem=mpost 8.4.23)\ at most 736 strings of total length 3629\ 3326 memory locations dumped; current usage is 1021&2227\ 501 symbolic tokens\ ", ["status"]=0, ["term"]=" )\ Beginning to dump on file mpost.mem\ (mem=mpost 8.4.23)\ at most 736 strings of total length 3629\ 3326 memory locations dumped; current usage is 1021&2227\ 501 symbolic tokens\ Transcript written on mpost.log.\ ", } -------------------------------------------------------------- found = "" no mpost.mem, no mpost.log Example 2: my test file with your finder and ("wb" not "w") -------------------------------------------------------------- MPlib finder: mpost.mp -> d:/context/tex/texmf/metapost/base/mpost.mp MPlib finder: mpost.map -> MPlib finder: plain.mp -> d:/context/tex/texmf/metapost/base/plain.mp t={ ["log"]="This is MetaPost, Version 1.003 (INIMP) 23 APR 2008 07:58 (mpost.mp(plain.mp\ Preloading the plain mem file, version 0.99)", ["status"]=0, ["term"]="This is MetaPost, Version 1.003 (Cweb version 0.40) (INIMP)\ (mpost.mp(plain.mp\ Preloading the plain mem file, version 0.99)", } MPlib finder: mpost.mem -> mpost.mem t={ ["log"]=" )\ Beginning to dump on file mpost.mem\ (mem=mpost 8.4.23)\ at most 736 strings of total length 3629\ 3326 memory locations dumped; current usage is 1021&2227\ 501 symbolic tokens\ ", ["status"]=0, ["term"]=" )\ Beginning to dump on file mpost.mem\ (mem=mpost 8.4.23)\ at most 736 strings of total length 3629\ 3326 memory locations dumped; current usage is 1021&2227\ 501 symbolic tokens\ Transcript written on mpost.log.\ ", } -------------------------------------------------------------- mpost.mem gets written now but no mpost.log grusz 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________