 	   (inferior-kilns-process))))
 
 (defun inferior-kilns-start-process ()
-  "Actually start the kilns iterpreter"
-  (setq inferior-kilns-buffer
-		(make-comint "Kilns" inferior-kilns-binary))
-  (with-current-buffer inferior-kilns-buffer
-	(inferior-kilns-mode
-	 (run-hooks 'inferior-kilns-hook))))
+  "Actually start the kilns interpreter.
+
+This sets the current directory to the path of the kilns binary before launching kilns.
+I am not 100% sure this is the proper way to do it, but it does seem the most convenient."
+  (let ((old-dir default-directory))
+	(cd inferior-kilns-binary-path)
+	(setq inferior-kilns-buffer
+		  (make-comint "Kilns" (concat inferior-kilns-binary-path inferior-kilns-binary)))
+	(with-current-buffer inferior-kilns-buffer
+						 (inferior-kilns-mode)
+						 (run-hooks 'inferior-kilns-hook))
+	(cd old-dir)))
 
 (provide 'kilns-minor-mode)
 


(require 'comint)

(defcustom inferior-kilns-binary "~/projects/kilns-binary/kilns"
  "The path to the kilns executable."
  :type 'file
  :group 'kilns-minor-mode)

(defvar kilns-minor-mode-map ()

;;
;; Below are customizable option list:
;;
;;  `inferior-kilns-binary-path'
;;    The path to the kilns executable with trailing slash.
;;    default = "~/projects/kilns-binary/"
;;  `inferior-kilns-binary'
;;    The name of the kilns executable.
;;    default = "kilns"

;;; TODO:
;; 
