From: mouser Date: 2011-04-15T07:45:33+09:00 Subject: Re: Running Ruby script in emacs On 14-Apr-2011, duke wrote: > Hey ... > > I'm taking my first steps with Ruby. I have ruby-mode loaded and > working. I also have run-ruby, but we'll forget about that for the > moment. > > I have a working script that I want to "compile" and run while in ruby- > mode. I grok how to compile it - no worries there. The script asks for > input from the user. That's what I don't know how to do! Is there a > way to input a value while in the 'compilation' process? TIA... Have you looked into ruby-compilation.el? The version on emacswiki.org is old, but you can either install it via ELPA, or from https://github.com/eschulte/rinari/tree/master/util directly. You can then M-x ruby-compilation-this-buffer and it will execute your script in a compilation buffer. You can input data in the compilation window, but note that you might find that RET doesn't do the job because it's been shadowed by a different mode. If this happens to you, you will need to rebind comint-send-input.