unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Ruby evaluation.
@ 2010-09-24 19:33 A Soare
  2010-09-25  5:56 ` Jonathan Groll
  0 siblings, 1 reply; 7+ messages in thread
From: A Soare @ 2010-09-24 19:33 UTC (permalink / raw)
  To: help-gnu-emacs

I am interested whether there is a possibility to run an evaluator
of Ruby in emacs.

I find nothing useful on wiki, etc.

Alin




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ruby evaluation.
       [not found] <mailman.0.1285356841.13588.help-gnu-emacs@gnu.org>
@ 2010-09-24 23:06 ` Pascal J. Bourguignon
  0 siblings, 0 replies; 7+ messages in thread
From: Pascal J. Bourguignon @ 2010-09-24 23:06 UTC (permalink / raw)
  To: help-gnu-emacs

A Soare <alinsoar@voila.fr> writes:

> I am interested whether there is a possibility to run an evaluator
> of Ruby in emacs.
>
> I find nothing useful on wiki, etc.

The command is M-x run-ruby RET
See:
http://lisp.tistory.com/entry/Rubymode-in-Emacs



Also, to be able to C-x C-e ruby expressions from any .rb files, you can use:
http://www.informatimago.com/develop/emacs/emacs/pjb-ruby.el


with:
(setf inferior-ruby-first-prompt-pattern "^\\(irb\\(.*\\)[>*\"'] *\\|(rdb:[0-9]*) \\)") 
(setf inferior-ruby-prompt-pattern       "^\\(irb(.*)[0-9:]+[>*\"'] *\\|(rdb:[0-9]*) *\\)+")

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ruby evaluation.
  2010-09-24 19:33 Ruby evaluation A Soare
@ 2010-09-25  5:56 ` Jonathan Groll
  2010-09-25 16:15   ` hazlup
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Groll @ 2010-09-25  5:56 UTC (permalink / raw)
  To: A Soare; +Cc: help-gnu-emacs

On Fri, Sep 24, 2010 at 07:33:37PM +0000, A Soare wrote:
>I am interested whether there is a possibility to run an evaluator
>of Ruby in emacs.
>
>I find nothing useful on wiki, etc.
M-x run-ruby

Cheers,
Jonathan



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ruby evaluation.
  2010-09-25  5:56 ` Jonathan Groll
@ 2010-09-25 16:15   ` hazlup
  2010-09-25 19:36     ` Jonathan Groll
  0 siblings, 1 reply; 7+ messages in thread
From: hazlup @ 2010-09-25 16:15 UTC (permalink / raw)
  To: Help-gnu-emacs


I have vanilla emacs-23.1 and M-x run-ruby [No match]
so I suspect you installed something ruby related.  The OP needs that info.



Jonathan Groll-2 wrote:
> 
> On Fri, Sep 24, 2010 at 07:33:37PM +0000, A Soare wrote:
> M-x run-ruby
> 
> Cheers,
> Jonathan
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Ruby-evaluation.-tp29801866p29806968.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ruby evaluation.
  2010-09-25 16:15   ` hazlup
@ 2010-09-25 19:36     ` Jonathan Groll
  2010-09-25 19:48       ` Tom Rauchenwald
  2010-09-25 22:37       ` hazlup
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Groll @ 2010-09-25 19:36 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, Sep 25, 2010 at 09:15:43AM -0700, hazlup wrote:
>
>I have vanilla emacs-23.1 and M-x run-ruby [No match]
>so I suspect you installed something ruby related.  The OP needs that info.
>

I have the following in my ~/.emacs (note the run-ruby):

;; ruby mode
(autoload 'ruby-mode "ruby-mode" "Load ruby-mode")
(add-hook 'ruby-mode-hook 'turn-on-font-lock)

;; associate ruby-mode with .rb files and .rjs files
(add-to-list 'auto-mode-alist '(".rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '(".rjs$" . ruby-mode))
(add-to-list 'auto-mode-alist '(".rake$" . ruby-mode))

(setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
                                       interpreter-mode-alist))

;; Ruby-Interpreter:
(autoload 'run-ruby "inf-ruby"
    "Run an inferior Ruby process")
(autoload 'inf-ruby-keys "inf-ruby"
    "Set local key defs for inf-ruby in ruby-mode")
(add-hook 'ruby-mode-hook
            '(lambda ()
               (inf-ruby-keys)
               ))

Regards,
Jonathan



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ruby evaluation.
  2010-09-25 19:36     ` Jonathan Groll
@ 2010-09-25 19:48       ` Tom Rauchenwald
  2010-09-25 22:37       ` hazlup
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rauchenwald @ 2010-09-25 19:48 UTC (permalink / raw)
  To: help-gnu-emacs

Jonathan Groll <lists@groll.co.za> writes:

> On Sat, Sep 25, 2010 at 09:15:43AM -0700, hazlup wrote:
>>
>>I have vanilla emacs-23.1 and M-x run-ruby [No match]
>>so I suspect you installed something ruby related.  The OP needs that info.
>>
>
> I have the following in my ~/.emacs (note the run-ruby):
>
> ;; ruby mode
> (autoload 'ruby-mode "ruby-mode" "Load ruby-mode")
> (add-hook 'ruby-mode-hook 'turn-on-font-lock)
>
> ;; associate ruby-mode with .rb files and .rjs files
> (add-to-list 'auto-mode-alist '(".rb$" . ruby-mode))
> (add-to-list 'auto-mode-alist '(".rjs$" . ruby-mode))
> (add-to-list 'auto-mode-alist '(".rake$" . ruby-mode))
>
> (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
>                                       interpreter-mode-alist))
>
> ;; Ruby-Interpreter:
> (autoload 'run-ruby "inf-ruby"
>    "Run an inferior Ruby process")
> (autoload 'inf-ruby-keys "inf-ruby"
>    "Set local key defs for inf-ruby in ruby-mode")
> (add-hook 'ruby-mode-hook
>            '(lambda ()
>               (inf-ruby-keys)
>               ))
>
> Regards,
> Jonathan

I guess it should be noted that inf-ruby.el is not part of the emacs
distribution. It comes with ruby i think.

-tom

-- 
Computers are useless.  They can only give you answers.
                -- Pablo Picasso




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ruby evaluation.
  2010-09-25 19:36     ` Jonathan Groll
  2010-09-25 19:48       ` Tom Rauchenwald
@ 2010-09-25 22:37       ` hazlup
  1 sibling, 0 replies; 7+ messages in thread
From: hazlup @ 2010-09-25 22:37 UTC (permalink / raw)
  To: Help-gnu-emacs


Perfect.

I had actually done load-lib ruby-mode before trying M-x run ruby.
I think this is exactly what the OP (and followers) will need.


Jonathan Groll-2 wrote:
> 
> On Sat, Sep 25, 2010 at 09:15:43AM -0700, hazlup wrote:
>>
>>I have vanilla emacs-23.1 and M-x run-ruby [No match]
>>so I suspect you installed something ruby related.  The OP needs that
info.
>>
> 
> I have the following in my ~/.emacs (note the run-ruby):
> 
> ;; ruby mode
> (autoload 'ruby-mode "ruby-mode" "Load ruby-mode")
> (add-hook 'ruby-mode-hook 'turn-on-font-lock)
> 
> ;; associate ruby-mode with .rb files and .rjs files
> (add-to-list 'auto-mode-alist '(".rb$" . ruby-mode))
> (add-to-list 'auto-mode-alist '(".rjs$" . ruby-mode))
> (add-to-list 'auto-mode-alist '(".rake$" . ruby-mode))
> 
> (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
>                                        interpreter-mode-alist))
> 
> ;; Ruby-Interpreter:
> (autoload 'run-ruby "inf-ruby"
>     "Run an inferior Ruby process")
> (autoload 'inf-ruby-keys "inf-ruby"
>     "Set local key defs for inf-ruby in ruby-mode")
> (add-hook 'ruby-mode-hook
>             '(lambda ()
>                (inf-ruby-keys)
>                ))
> 
> Regards,
> Jonathan
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Ruby-evaluation.-tp29801866p29808774.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-25 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-24 19:33 Ruby evaluation A Soare
2010-09-25  5:56 ` Jonathan Groll
2010-09-25 16:15   ` hazlup
2010-09-25 19:36     ` Jonathan Groll
2010-09-25 19:48       ` Tom Rauchenwald
2010-09-25 22:37       ` hazlup
     [not found] <mailman.0.1285356841.13588.help-gnu-emacs@gnu.org>
2010-09-24 23:06 ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).