   (interactive)
   (erlang-stop-node dev1))
 
+
 (defun erlang-start-dev (node)
   (let ((buffer
          (make-comint node "/usr/local/bin/zsh" nil "--login")))
+    (with-current-buffer buffer
+      (compilation-minor-mode 't))
     (display-buffer buffer)
     (comint-send-erlang-node node (format "cd ~/github/riak_ee && echo"))
     (comint-send-erlang-node node (format "dev/%s/bin/riak console -- dev" node)))) ;
 
-(defun erlang-start-riak_ee-dep (node)
+(defun is-riak_ee_release (node)
+  (string-match "dev[1-9]" node))
+
+(erlang-stop-node "riak_kv")
+
+(erlang-start-node "riak_kv")
+
+(defun erlang-start-node (node)
   (let ((buffer
-         (make-comint node "/usr/local/bin/zsh" nil "--login")))
+         (make-comint node "/usr/local/bin/zsh" nil "--login"))
+        (node-home
+         (cond ((is-riak_ee_release node)
+                (format "~/github/riak_ee/" node))
+               ('t
+                (format "~/github/riak_ee/deps/%s" node))))
+        (node-start-cmd
+         (cond ((is-riak_ee_release node)
+                (format "rlwrap dev/%s/bin/riak console -- dev" node))
+               ('t
+                (format "rlwrap erl -setcookie riak -name %s@127.0.0.1 -- dev" node)))))
+    (with-current-buffer buffer
+      (next-error-follow-minor-mode)
+      (compilation-minor-mode 't))
     (display-buffer buffer)
-    (comint-send-erlang-node node (format "cd ~/github/riak_ee/deps/%s && echo" node))
-    (comint-send-erlang-node node (format "rlwrap erl -setcookie riak -name %s@127.0.0.1 -- dev" node))))
+    (comint-send-erlang-node node (format "cd %s && echo" node-home))
+    (comint-send-erlang-node node node-start-cmd)))
 
 (defun erlang-show-node (node)
   (let ((buffer-name (comint-to-buffer-name node)))

  (interactive)
  (erlang-show-node riak-kv))

(defun erlang-start-riak-s3-api ()
  (interactive)
  (erlang-start-riak_ee-dep riak-s3-api))

(defun erlang-stop-riak-s3-api ()
  (interactive)


;; comint erlang nodes
(defconst riak-kv "riak_kv")
(defconst riak-s3-api "riak_s3_api")
(defconst dev1 "dev1")

(defun erlang-start-riak-kv ()
  (interactive)
  (erlang-start-node riak-kv))

(defun erlang-stop-riak-kv ()
  (interactive)
