emacsspacemacs

Unable to respond to script asking question inside emacs


I am trying to adopt spacemacs for elixir development. As a first step, I have managed to enable elixir-mode, which means that I can run MIX (C-c a x). When I run MIX I want to use the phx.new option to create a new Phoenix project. Unfortunately, one of the first things this does is to ask me whether I want to install dependencies (which is something I do want to do). However, there does not seem to be a way of entering the 'Y' response inside the Emacs buffer that is showing the MIX command being executed. I have tried toggling read-only mode, but with no effect.


Solution

  • Try evaluating this:

    (defun my-send-y ()
      (interactive)
      (process-send-string (get-buffer-process (current-buffer)) "y\n"))
    

    And then hit M-x my-send-y to send y to the process in the current buffer.