                (= line-type :error))
       (swap! err-msg-buffer conj cleaned-line))
 
-    ;; close the error sequence when we see a non red-line
+    ;; close an error sequence
     (when (and @inside-error?
                line-type
                (not= line-type :error))


;; TODO: need to kill any "auto" process when they exit the app
(def auto-pids (atom {}))

(defn start-auto
  "Start auto-compile. This function returns a core.async channel."

        child (spawn "lein cljsbuild once" (convert-cwd prj-key))
        inside-error? (atom false)
        err-msg-buffer (atom "")
        stopped-output-timeout (atom nil)]
    (.setEncoding (.-stderr child) "utf8")
    (.setEncoding (.-stdout child) "utf8")
    (.on (.-stderr child) "data"
