From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58577 Path: news.gmane.org!not-for-mail From: Peter =?utf-8?Q?M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: problem with package.path Date: Fri, 7 May 2010 09:15:35 +0200 Message-ID: <20100507071535.GA3537@gaston.couberia.bzh> References: <20100504082814.GA6991@gaston.couberia.bzh> <4BE32294.8020908@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: dough.gmane.org 1273216554 32322 80.91.229.12 (7 May 2010 07:15:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 May 2010 07:15:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri May 07 09:15:46 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 1OAHmh-0000q5-Mw for gctc-ntg-context-518@m.gmane.org; Fri, 07 May 2010 09:15:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 27CD6C9C91; Fri, 7 May 2010 09:15:43 +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 N-tnavc9goEc; Fri, 7 May 2010 09:15:40 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4C2E1C9C87; Fri, 7 May 2010 09:15:40 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C9635C9C87 for ; Fri, 7 May 2010 09:15: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 FsxRQJcU01hd for ; Fri, 7 May 2010 09:15:36 +0200 (CEST) Original-Received: from smtp21.orange.fr (smtp21.orange.fr [80.12.242.49]) by balder.ntg.nl (Postfix) with ESMTP id A11CFC9C1A for ; Fri, 7 May 2010 09:15:36 +0200 (CEST) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2123.orange.fr (SMTP Server) with ESMTP id 403EB1C00323 for ; Fri, 7 May 2010 09:15:36 +0200 (CEST) Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2123.orange.fr (SMTP Server) with ESMTP id 307081C0035A for ; Fri, 7 May 2010 09:15:36 +0200 (CEST) Original-Received: from gaston.couberia.bzh (ARennes-551-1-126-243.w92-139.abo.wanadoo.fr [92.139.237.243]) by mwinf2123.orange.fr (SMTP Server) with ESMTP id 00F7F1C00323 for ; Fri, 7 May 2010 09:15:36 +0200 (CEST) X-ME-UUID: 20100507071536405.00F7F1C00323@mwinf2123.orange.fr Original-Received: by gaston.couberia.bzh (Postfix, from userid 1000) id 71B2A301C8; Fri, 7 May 2010 09:15:35 +0200 (CEST) Mail-Followup-To: mailing list for ConTeXt users Content-Disposition: inline In-Reply-To: <4BE32294.8020908@wxs.nl> User-Agent: Mutt/1.5.17 (2007-11-01) 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:58577 Archived-At: On Thu, May 06 2010, Hans Hagen wrote: >> \startbuffer[test] >> bla = nil >> \stopbuffer >> \savebuffer[test][../mytest.lua] >> \starttext >> \startluacode >> package.path = "../?.lua;;" >> require("mytest") >> \stopluacode >> \stoptext > > dofile "../mytest.lua" Bad example... mytest.lua is a module, so it must be loaded with require: \startbuffer[test] module(...) \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = "../?.lua;;" require("mytest") -- dofile("../mytest.lua") -- this does not work \stopluacode \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___________________________________________________________________________________ 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 ___________________________________________________________________________________