From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id C48B0BC37 for ; Sat, 16 Jan 2010 23:33:01 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8BAC/NUUvRVdvikGdsb2JhbACRaYlaPwEBAQEJCQwHEwOtJIEyhFuHDAECAwWELQQ X-IronPort-AV: E=Sophos;i="4.49,288,1262559600"; d="scan'208";a="41939464" Received: from mail-ew0-f226.google.com ([209.85.219.226]) by mail3-smtp-sop.national.inria.fr with ESMTP; 16 Jan 2010 23:33:01 +0100 Received: by ewy26 with SMTP id 26so2131742ewy.3 for ; Sat, 16 Jan 2010 14:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:content-language; bh=lpFiotpQTp7mhGFL/OSHrvJi7BpJpEw+5wZYRRgdUR4=; b=FjYR4aotzB6vymgxKO22cIZH9SJIzAJanJ4Be/8v5iH9I9Zs3IeO7ZPmGrfzB5WHaf YyUmj2rnmwqmV0HWdb4c4Z32kIrfpWgZniChN9Fl3tD5YGhWY2sNpRWw2TyCln5d6lxC CrfgtpUJSOF3/P6dSANAa1Y0b98jjnoGe5lSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language; b=KavGy7b01ppCrOnRbRyEFMGr3fFYx6DxhHBz7lgh2bdqaDfNFYNK0djHGmI/Hxq05T sFsm2TLynHZB70H/Y+mIXFWST8Us6XVgd19OQeh+Au6OKn0vRkZBGZyr3ahIHImuQTbR oT+29hGMJu6bZmC/LHS7GTJIL+mZk9sFKItd4= Received: by 10.213.97.73 with SMTP id k9mr1372990ebn.61.1263681180460; Sat, 16 Jan 2010 14:33:00 -0800 (PST) Received: from Blabla (ip-118.net-81-220-138.rev.numericable.fr [81.220.138.118]) by mx.google.com with ESMTPS id 13sm2846718ewy.5.2010.01.16.14.32.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 16 Jan 2010 14:33:00 -0800 (PST) From: "C. Fr" To: Subject: Configuring emacs to work with caml Date: Sat, 16 Jan 2010 23:33:01 +0100 Message-ID: <4b523e9c.0d67f10a.06ab.ffffced7@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcqW+9xSs4cKIWoSRgy3F6jM0X2sEw== Content-Language: fr X-Spam: no; 0.00; configuring:01 emacs:01 emacs:01 configuring:01 ocaml:01 lib:01 lib:01 ocaml:01 site-lisp:01 defvar:01 defvar:01 ocamllib:01 camllib:01 getenv:01 getenv:01 Hello everyone=A0! I=92ve recently started coding in Caml, and I like it very much. I=92m = running both Linux (Ubuntu) and windows, and on both systems I use emacs. = However, I=92ve come into a few difficulties when configuring emacs under = windows. More specifically, I=92ve been trying to create a portable setup of camllight/ocaml, so as to run it from a USB stick. My first step was to extract the contents of an Windows Caml package, to = get the binaries -- I couldn=92t find anything but an installer, so I = basically copied the folders bin and lib to my USB. The files are organized in a = tree that looks like this : --(USB Root) -----(emacs files and folders) -----\caml-bin --------\camllight -----------\bin -----------\lib --------\ocaml -----------\bin -----------\lib Then, I installed the Caml mode for emacs by following that can be found here : http://www.cs.jhu.edu/~scott/pl/caml/emacs.html Of course, to make sure that my .emacs file could be found, I created = the following "site-start.el": -- site-lisp\site-start.el -- (defvar program-dir (substring data-directory 0 -4)) (defvar caml-bin (concat program-dir "caml-bin")) (defvar ocaml-bin (concat program-dir "caml-bin/ocaml/bin")) (defvar ocaml-lib (concat program-dir "caml-bin/ocaml/lib")) (defvar camllight-bin (concat program-dir "caml-bin/camllight/bin")) (defvar camllight-lib (concat program-dir "caml-bin/camllight/lib")) (setenv "HOME" program-dir) (setenv "OCAMLLIB" ocaml-lib) (setenv "CAMLLIB" camllight-lib) (setenv "PATH" (concat (concat caml-bin ";") (getenv "PATH"))) (setenv "PATH" (concat (concat ocaml-bin ";") (getenv "PATH"))) (setenv "PATH" (concat (concat camllight-bin ";") (getenv "PATH"))) -- end of site-lisp\site-start.el -- Plus, I added to my .emacs file the following lines: -- .emacs (USB drive root) -- (setq auto-mode-alist (cons '("\\.ml[iylp]?" . caml-mode) = auto-mode-alist)) (autoload 'caml-mode "caml" "Major mode for editing Caml code." t) (autoload 'run-caml "inf-caml" "Run an inferior Caml process." t) (autoload 'camldebug "camldebug" "Run the Caml debugger." t) -- end of .emacs -- Now, when I launch emacs, and use the built-in shell (M-!) to type ocaml = or caml, I get the regular caml prompt (adding CAMLLIB and OCAMLLIB solved = a few bugs), perfectly functional. However, when I launch run-caml, and then type either "ocaml" or "caml" = when asked which toplevel to run ("Caml Toplevel to run:"), I invariably get = the message "Searching for program: no such file or directory, ocaml". = However, when I put the "ocaml.exe" file directly in emacs bin directory, the = problem vanishes. Has someone ever encountered a similar problem? I just can't manage to = find a solution, and would like to preserve my directory tree... Thanks a lot for your support !=20