1. Yaron Minsky
  2. js-elisp


seanmcl  committed d16fe82

changed directory structure in /tmp

  • Participants
  • Parent commits 1c9ccf9
  • Branches default

Comments (0)

Files changed (3)


View file
 Sane default settings for most emacs users
-** js-examples.el
-Examples of settings that some users find useful, but are not enabled
-by default.  If you have something useful, but not micro-feature
-quality, this is the place to share it.
 ** js-lib.el
 A grab-bag of functions for customizing emacs.
 Common variable settings for tuareg-mode.
-** js-omake.el
-Support for using OMake with Emacs
-** pa_ounit_tuareg.el
-Support for the unit testing camlp4 macros (e.g. TEST) in tuareg-mode
 * notes
 Note that the following libraries are *not* in this repo:

File omake.el

View file
 ;; Detect version changes
-(defconst Omake.pre-version 7
+(defconst Omake.pre-version 8
   "We use a version number to synchronize the elisp code the omake server
 To roll a new version of elisp that is incompatible with ocaml or vice
 versa, you must bump the version number.  This prevents old elisp code
 (setq auto-revert-verbose nil)
-(defun Omake.File.unslash (s)
-  "Replace '/' with '-' in a string"
-  (apply 'concat (List.intersperse "-" (split-string s "/"))))
-;; (Omake.Util.unslash "/a/b/c")
-;; (Omake.Util.unslash (Omake.id-to-string id))
 (defun Omake.File.auto-revert (file buffer-name)
   "Open a file in auto-revert mode, and set the buffer name"
   (when (not (get-buffer buffer-name))
 (defun Omake.File.project-file (name id)
   (assert (Omake.id-p id))
   (let ((id (Omake.id-to-string id)))
-    (format "%s/%s/%s/%s"
-            Omake.File.root Omake.user
-            (Omake.File.unslash id)
-            name)))
+    (format "%s/%s%s/%s" Omake.File.root Omake.user id name)))
 (defun Omake.File.omake (id) (Omake.File.project-file "omake" id))
 (defun Omake.File.elisp (id) (Omake.File.project-file "elisp" id))

File omake_server.ml

View file
 (* -------------------------------------------------------------------------- *)
 (* Use a version number to synchronize with the elisp code. *)
-let omake_server_version = 7
+let omake_server_version = 8
 (* -------------------------------------------------------------------------- *)
 (*  Util                                                                      *)
 type 'a deferred = 'a Deferred.t
 type ('a, 'b) result = ('a, 'b) Result.t
 let paren s = sprintf "(%s)" s
-let unslash s = String.tr ~target:'/' ~replacement:'-' s
 let rm file = Asys.file_exists file >>= function
   | `Yes -> Aunix.unlink file
   | `No | `Unknown -> Deferred.unit
   let _ = Shell.mkdir ~p:() root
   let project_dir id =
-    let dir = sprintf "%s/%s" root (unslash (Id.to_string id)) in
+    let dir = sprintf "%s%s" root (Id.to_string id) in
     Shell.mkdir ~p:() dir;
         (omake_process_status >>> (fun res -> 
           Server.logf "Process died for model: %s" (Id.to_string id);
-          To_emacs.send_async "(message \"omake is dead for %s\")" (Id.to_string id);
+          (* To_emacs.send_async "(message \"omake is dead for %s\")" (Id.to_string id); *)
             "(Omake.Ocaml.update-model-dead :id \"%s\" :msg \"The omake process is dead: %s.\")"
             (Id.to_string id)