From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A4A96BB9C for ; Thu, 19 Jan 2006 20:13:22 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0JJDMks004393 for ; Thu, 19 Jan 2006 20:13:22 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA12518 for ; Thu, 19 Jan 2006 20:13:21 +0100 (MET) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id k0JJDKVT004386 for ; Thu, 19 Jan 2006 20:13:21 +0100 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa10551; 19 Jan 2006 14:13 EST Received: from ecc by stratocaster.home with local (Exim 4.60) (envelope-from ) id 1EzfDP-0003Le-PW; Thu, 19 Jan 2006 14:12:59 -0500 Date: Thu, 19 Jan 2006 14:12:59 -0500 To: caml-list@yquem.inria.fr, Caml list Subject: Re: [Caml-list] toplevel with pre-installed printers Message-ID: <20060119191259.GB12416@localhost> Mail-Followup-To: caml-list@yquem.inria.fr, Caml list References: <43CFBE3E.1090808@andrej.com> <43CFC776.3060801@andrej.com> <20060119174907.GA309@furbychan.cocan.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060119174907.GA309@furbychan.cocan.org> User-Agent: Mutt/1.5.11 From: Eric Cooper X-Miltered: at concorde with ID 43CFE4D2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43CFE4D0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 toplevel:01 andrej:01 toplevel:01 ocaml:01 getcwd:01 non-ocaml:01 unix:01 wrote:01 wrote:01 arbitrary:01 evaluates:02 expressions:03 suggestion:03 sys:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Thu, Jan 19, 2006 at 05:49:07PM +0000, Richard Jones wrote: > On Thu, Jan 19, 2006 at 06:08:06PM +0100, Andrej Bauer wrote: > > Eric Stokes wrote: > > > When the toplevel starts up, it evaluates (on unix) ~/.ocamlinit, > > > which can contain arbitrary ocaml expressions. > > > > Sorry, I was not clear enough. I know about .ocamlinit. I am going to > > have several custom ocamltop's and they can't all share the same > > .ocamlinit. What now? > > We tried to do the same thing and couldn't find a way. One rather > nasty suggestion involved a surrounding shell script which would > launch the right toplevel in the right directory with the right > .ocamlinit. It's not pleasant. In a single "master" .ocamlinit, you could dispatch on Sys.executable_name, and perhaps Sys.getcwd. Still a hack, but it might avoid (non-OCaml) wrapper scripts. -- Eric Cooper e c c @ c m u . e d u