 (defun intero-start-process-in-buffer (buffer &optional targets source-buffer)
   "Start an Intero worker in BUFFER for TARGETS, automatically
 performing a initial actions in SOURCE-BUFFER, if specified."
-  (let* ((options (intero-make-options-list targets))
+  (let* ((options
+          (intero-make-options-list
+           (or targets
+               (list (buffer-local-value 'intero-package-name buffer)))))
          (arguments options)
          (process (with-current-buffer buffer
+                    (when debug-on-error
+                      (message "Intero arguments: %S" arguments))
                     (message "Booting up intero ...")
                     (apply #'start-process "stack" buffer "stack" "ghci"
                            arguments))))

  "Get or create the stack buffer for this current directory and
the given targets."
  (let* ((root (intero-project-root))
         (default-directory root))
    (with-current-buffer
        (get-buffer-create (intero-buffer-name worker))
      (cd root)
      (current-buffer))))


                "--docker-run-args=--interactive=true --tty=false"
                "--no-load"
                "--no-build")
          (let ((dir (make-temp-file "intero" t)))
            (list "--ghci-options"
                  (format "%S" (concat "-odir=" dir))
