Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3117

Re: Running Ruby script in emacs

From duke <sidney.reilley.ii@gmail.com>
Newsgroups comp.emacs, comp.lang.ruby
Subject Re: Running Ruby script in emacs
Date 2011-04-18 13:12 -0700
Organization http://groups.google.com
Message-ID <7fcd34cb-e9f5-45eb-bcfa-2f7f16057280@v33g2000prn.googlegroups.com> (permalink)
References <41ef92b7-b865-4049-87cd-66385471c327@a19g2000prj.googlegroups.com> <6f9ef570-5b7e-4814-9e16-255919455e58@q12g2000prb.googlegroups.com> <8cnqp.26611$zn.2950@newsfe19.iad>

Cross-posted to 2 groups.

Show all headers | View raw


On Apr 16, 2:43 pm, "mouser" <inva...@invalid.com> wrote:
> On 16-Apr-2011, duke <sidney.reilley...@gmail.com> wrote:
>
> > It executes OK, and the program output is correct, but I may be taking
> > "the long way around". :) Thanks for your input.
>
> You might find the following will make your life easier.
>
> Uninstall ruby-compilation from ELPA (hit 'd' on it's line in
> package-list-packages, then hit 'x').  Then, install the source for
> ruby-compilation (fromhttps://github.com/eschulte/rinari/raw/master/util/ruby-compilation.el) in
> your load path (somewhere in ~/.emacs.d for instance).  Next, add "(require
> 'ruby-compilation)" to ~/.emacs.  Finally, open up the ruby-compilation.el
> file in your load path and add "(define-key map [return]
> 'comint-send-input)" to defvar ruby-compilation-minor-mode-map (for instance
> at line 279).  The last part is required because for some reason
> compilation-mode shadows the comint-send-input binding though it's not
> immediately apparent where that is happening.
>
> This gives you a couple advantages over installing it from ELPA.  C-x t will
> invoke ruby-compilation-this-buffer whenever you are in ruby-mode, and now
> hitting return/enter will invoke comint-send-input in the compilation
> buffer.

OK! Followed your instructions to the letter ...
and hacked my .emacs for the key map stuff, as per Ryans advice ...
NO joy!

In *Messages* buffer, I get:

"compilation-next-error: No error here"

after being asked for the required input.

The script does work BTW. Any ideas?

> By the way, you might find the following useful for learning and programming
> Ruby in Emacs.  Seehttp://www.emacswiki.org/emacs/FlymakeRubyfor automated
> syntax checking.  Also, install the ruby-debug (or ruby-debug19 for Ruby
> 1.9) gem for Ruby debugging.  Take a look at http://bashdb.sourceforge.net/ruby-debug/rdebug-emacs.htmlfor Emacs
> integration of this debugger.

Thanks a lot for all those links. They surely will be useful to me.
Much obliged!
--
duke

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Running Ruby script in emacs duke <sidney.reilley.ii@gmail.com> - 2011-04-14 10:32 -0700
  Re: Running Ruby script in emacs Ryan Davis <ryand-ruby@zenspider.com> - 2011-04-14 14:04 -0500
    Re: Running Ruby script in emacs Duke <sidney.reilley.ii@gmail.com> - 2011-04-14 13:39 -0700
  Re: Running Ruby script in emacs "mouser" <invalid@invalid.com> - 2011-04-14 22:42 +0000
    Re: Running Ruby script in emacs duke <sidney.reilley.ii@gmail.com> - 2011-04-15 05:27 -0700
      Re: Running Ruby script in emacs "mouser" <invalid@invalid.com> - 2011-04-15 18:55 +0000
        Re: Running Ruby script in emacs duke <sidney.reilley.ii@gmail.com> - 2011-04-16 06:29 -0700
          Re: Running Ruby script in emacs "mouser" <invalid@invalid.com> - 2011-04-16 20:43 +0000
            Re: Running Ruby script in emacs Ryan Davis <ryand-ruby@zenspider.com> - 2011-04-16 18:05 -0500
              Re: Running Ruby script in emacs "mouser" <invalid@invalid.com> - 2011-04-17 03:17 +0000
            Re: Running Ruby script in emacs duke <sidney.reilley.ii@gmail.com> - 2011-04-16 21:43 -0700
            Re: Running Ruby script in emacs duke <sidney.reilley.ii@gmail.com> - 2011-04-18 13:12 -0700
              Re: Running Ruby script in emacs "mouser" <invalid@invalid.com> - 2011-04-18 21:15 +0000
                Re: Running Ruby script in emacs duke <sidney.reilley.ii@gmail.com> - 2011-04-19 10:21 -0700

csiph-web