From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58582 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: problem with package.path Date: Fri, 07 May 2010 10:52:35 +0200 Message-ID: <4BE3D4D3.3030904@elvenkind.com> References: <20100504082814.GA6991@gaston.couberia.bzh> <4BE32294.8020908@wxs.nl> <20100507071535.GA3537@gaston.couberia.bzh> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273222370 20989 80.91.229.12 (7 May 2010 08:52:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 May 2010 08:52:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 07 10:52:47 2010 connect(): No such file or directory 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 1OAJIZ-00084Z-D0 for gctc-ntg-context-518@m.gmane.org; Fri, 07 May 2010 10:52:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C68F8C9CA1; Fri, 7 May 2010 10:52:42 +0200 (CEST) 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 CZVPMtA3K7Hd; Fri, 7 May 2010 10:52:39 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BE757C9C9A; Fri, 7 May 2010 10:52:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0E695C9C9A for ; Fri, 7 May 2010 10:52:38 +0200 (CEST) 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 ztd70EsdcLZP for ; Fri, 7 May 2010 10:52:36 +0200 (CEST) Original-Received: from smtp-vbr7.xs4all.nl (smtp-vbr7.xs4all.nl [194.109.24.27]) by balder.ntg.nl (Postfix) with ESMTP id 10800C9C91 for ; Fri, 7 May 2010 10:52:36 +0200 (CEST) Original-Received: from [192.168.178.26] (boo.demon.nl [83.163.247.99]) (authenticated bits=0) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id o478qZrU013714 for ; Fri, 7 May 2010 10:52:36 +0200 (CEST) (envelope-from taco@elvenkind.com) User-Agent: Thunderbird 2.0.0.23 (X11/20090822) In-Reply-To: <20100507071535.GA3537@gaston.couberia.bzh> X-Virus-Scanned: by XS4ALL Virus Scanner 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:58582 Archived-At: Peter M=FCnster wrote: > On Thu, May 06 2010, Hans Hagen wrote: > = >>> \startbuffer[test] >>> bla =3D nil >>> \stopbuffer >>> \savebuffer[test][../mytest.lua] >>> \starttext >>> \startluacode >>> package.path =3D "../?.lua;;" >>> require("mytest") >>> \stopluacode >>> \stoptext >> dofile "../mytest.lua" > = > Bad example... > = > mytest.lua is a module, so it must be loaded with require: You cannot always replace 'require' with 'dofile', and for this reason it is important that package.path actually works as explained in the lua manual. (escrito had similar problems, and other external lua modules will run into it as well). Best wishes, Taco ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________