 ;; Input: A key value
 (defun ems-move-walker (key)
   (let* ((counter (incf ems-request-counter))
-         (command (format "console.log('BEGINOUTPUT%d' + sre.move(%d) + 'ENDOUTPUT%d');"
+         (command (format "console.log('BEGINOUTPUT%d:' + sre.move(%d) + 'ENDOUTPUT%d');"
              counter key counter)))
     (comint-redirect-send-command-to-process
      command

;; Number.
;; Return: The relevant output in the buffer.
(defun ems-parse-output-buffer (counter)
  (with-current-buffer ems-output-buffer
    (let* ((str (buffer-string))
           (result nil))
      ;; (do* ((start (string-match (format "BEGINOUTPUT%d" counter) str))
      ;;       (end (string-match (format "ENDOUTPUT%d" counter) str)))
      ;;     ((and start end) (setq result (subseq str (+ start 12) end)))
      (print (process-sentinel (get-buffer-process "*js*"))))))


;;; API

(defun ems-stop ()
  (ems-teardown-bridge))

