ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Werners-Lucchini" <wwl@musensturm.de>
To: ntg-context@ntg.nl
Subject: Re: mplib
Date: Wed, 23 Apr 2008 08:18:44 +0200	[thread overview]
Message-ID: <480EF0E4.22072.26A477@wwl.musensturm.de> (raw)
In-Reply-To: <mailman.6115.1208677187.4340.ntg-context@ntg.nl>

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
___________________________________________________________________________________


       reply	other threads:[~2008-04-23  6:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6115.1208677187.4340.ntg-context@ntg.nl>
2008-04-23  6:18 ` Wolfgang Werners-Lucchini [this message]
2008-04-23  7:15   ` mplib Taco Hoekwater
     [not found] <mailman.6427.1208935135.4340.ntg-context@ntg.nl>
2008-04-23 11:02 ` mplib Wolfgang Werners-Lucchini
2008-04-23 13:28   ` mplib Taco Hoekwater
     [not found] <mailman.6092.1208622435.4340.ntg-context@ntg.nl>
2008-04-19 21:19 ` mplib Wolfgang Werners-Lucchini
2008-04-19 21:20   ` mplib Hans Hagen
2008-04-19 21:41   ` mplib Taco Hoekwater
     [not found] <mailman.6047.1208588332.4340.ntg-context@ntg.nl>
2008-04-19 16:35 ` mplib Wolfgang Werners-Lucchini
     [not found] <mailman.5882.1208410771.4340.ntg-context@ntg.nl>
2008-04-18 18:40 ` mplib Wolfgang Werners-Lucchini
2008-04-19  6:51   ` mplib Taco Hoekwater
2008-04-19 15:39   ` mplib Taco Hoekwater
     [not found] <mailman.5781.1208303542.4340.ntg-context@ntg.nl>
2008-04-16 22:38 ` mplib Wolfgang Werners-Lucchini
     [not found] <mailman.5741.1208259066.4340.ntg-context@ntg.nl>
2008-04-15 19:22 ` mplib Wolfgang Werners-Lucchini
2008-04-15 21:49   ` mplib Taco Hoekwater
     [not found] <mailman.5117.1208086262.4340.ntg-context@ntg.nl>
2008-04-14 23:13 ` mplib Wolfgang Werners-Lucchini
2008-04-15  7:34   ` mplib Hans Hagen
2008-04-15 11:07   ` mplib Taco Hoekwater
     [not found] <mailman.4851.1207985975.4340.ntg-context@ntg.nl>
2008-04-12 19:47 ` mplib Wolfgang Werners-Lucchini
2008-04-13 10:31   ` mplib Taco Hoekwater
2008-04-11 23:37 mplib Wolfgang Werners-Lucchini
2008-04-12  6:59 ` mplib Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2008-03-14 17:21 mplib Hans Hagen
2008-03-14 17:32 ` mplib Santy, Michael
2008-03-14 17:46   ` mplib Hans Hagen
2008-03-14 17:51     ` mplib Santy, Michael
2008-03-14 20:22       ` mplib Hans Hagen
2008-03-14 21:19         ` mplib Taco Hoekwater
2008-03-14 17:51 ` mplib Aditya Mahajan
2008-03-14 22:48   ` mplib Mojca Miklavec
2008-03-15 10:18     ` mplib Hans Hagen
2008-03-15 13:12       ` mplib Mojca Miklavec
2008-03-16  9:58       ` mplib zs
2008-03-16 10:13         ` mplib Mojca Miklavec
2008-03-15  7:23   ` mplib Taco Hoekwater
2007-03-19 11:28 mplib Hans Hagen
2007-03-19 12:42 ` mplib Hans Hagen
2007-03-19 19:00   ` mplib Karl Berry
2007-03-19 19:06   ` mplib Sanjoy Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=480EF0E4.22072.26A477@wwl.musensturm.de \
    --to=wwl@musensturm.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).