help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read user input in compilation buffer


From: William Gardella
Subject: Re: read user input in compilation buffer
Date: Wed, 19 Dec 2012 12:27:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi,

hemant <gethemant@gmail.com> writes:

> Hello Folks,
>
> I often run my tests (RSpec if you will) from Emacs using a
> customized version of compile command. It works beautifully and all
> that.
>
> But sometimes some special line in my code triggers something that
> reads from user input. If you have heard of this Ruby gem Pry. When I
> run the tests from Emacs and code being run contains binding.pry() it
> opens pry prompt at the point, the method is encountered.
>
> 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.
>
> Is it possible at all?

A lazy way would be to consider using async-shell-command instead of
compilation-mode.  `async-shell-command' does prompt for user input via
the minibuffer if it detects that the command is waiting for user
input.  Generally works well, and you can even get nice colorized output
if `ansi-color-for-comint-mode' is non-nil.

-- 
WGG
I use grml (http://grml.org/)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]