[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read user input in compilation buffer
From: |
Stefan Monnier |
Subject: |
Re: read user input in compilation buffer |
Date: |
Wed, 19 Dec 2012 14:16:07 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Now I understand that, there are some emacs-pry integrations out there, but
> I want something simple, something that will simply let me type things in
> the buffer when user input is required, in compile buffer.
You can ask compile to run the process in a comint buffer.
And you can also write a little function that lets you send text to
the process. Such as:
(defun my-send-string-to-process (string)
(interactive (list (read-string "Input: ")))
(process-send-string (get-buffer-process) (concat string "\n")))
If such user-input is only needed occasionally, it may be simpler to M-x
my-send-string-to-process RET then to configure your compilation command to
always use comint.
Stefan