New versions of ruby-mode.el and inf-ruby.el

280 views
Skip to first unread message

Phil Hagelberg

unread,
Nov 20, 2008, 12:00:55 PM11/20/08
to emacs-o...@googlegroups.com

Hello fellows.

I'm in the process of submitting ruby-mode.el and inf-ruby.el to Emacs
and ELPA. I've made some pretty wide-sweeping changes to inf-ruby.el to
make it conform a little more closely to Emacs coding conventions, and
I've made a few changes to ruby-mode.el as well.

Could you try out the latest versions of these files from my rinari repo
to make sure everything's working as it should?

One feature I added to inf-ruby: If you call inf-ruby (or run-ruby, as
it's aliased to for compatibility) with a prefix arg, it will prompt you
for which ruby implementation you want to use. This way you can have
Ruby 1.8, Ruby 1.9, JRuby, and Rubinius REPLs in Emacs buffers.

-Phil

Eric Schulte

unread,
Nov 20, 2008, 12:45:12 PM11/20/08
to emacs-o...@googlegroups.com
Phil Hagelberg <techn...@gmail.com> writes:

> Hello fellows.
>
> I'm in the process of submitting ruby-mode.el and inf-ruby.el to Emacs
> and ELPA. I've made some pretty wide-sweeping changes to inf-ruby.el to
> make it conform a little more closely to Emacs coding conventions, and
> I've made a few changes to ruby-mode.el as well.
>

That's fantastic, so do they finally have a shot at being included into
Emacs proper?

>
> Could you try out the latest versions of these files from my rinari repo
> to make sure everything's working as it should?
>

I just pulled these changes into my fork of rinari as well.

Thanks -- Eric

Phil Hagelberg

unread,
Nov 20, 2008, 12:50:18 PM11/20/08
to emacs-o...@googlegroups.com
"Eric Schulte" <schult...@gmail.com> writes:

> That's fantastic, so do they finally have a shot at being included into
> Emacs proper?

Yeah, I have the copyright paperwork for ruby-mode.el. I didn't realize
that inf-ruby.el had the same authors (SVN authorship confused me), but
since they already have a copyright assignment on file, it should be
easy to get that included as well.

-Phil

Lennart Borgman

unread,
Nov 20, 2008, 5:53:07 PM11/20/08
to emacs-o...@googlegroups.com

I guess you are aware that there is a feature freeze for Emacs 23.
However I believe that there is a chance that totally new things still
can make it into Emacs 23 (but I am not sure).

Phil Hagelberg

unread,
Nov 20, 2008, 6:05:54 PM11/20/08
to emacs-o...@googlegroups.com
"Lennart Borgman" <lennart...@gmail.com> writes:

>> Yeah, I have the copyright paperwork for ruby-mode.el. I didn't realize
>> that inf-ruby.el had the same authors (SVN authorship confused me), but
>> since they already have a copyright assignment on file, it should be
>> easy to get that included as well.
>
> I guess you are aware that there is a feature freeze for Emacs 23.
> However I believe that there is a chance that totally new things still
> can make it into Emacs 23 (but I am not sure).

Right; there was an exception made for this since it was only legal
reasons that were keeping it out of Emacs. I've brought it up with Chong
and Stefan. It's been slated for inclusion (barring copyright
assignment) since July, the paperwork just took much longer to get than
anyone thought it would.

-Phil

Jorge Calás Lozano

unread,
Nov 21, 2008, 8:07:43 AM11/21/08
to emacs-o...@googlegroups.com
I don't know if it has something to do with the new version of
ruby-mode, but rinari-rake stop working, my *Messages* buffer says:

cons: Symbol's function definition is void: ruby-args-to-list

What on the earth is ruby-args-to-list? It used to be defined in
inf-ruby.el, does it simply change the name or disapeared?

Cheers,

Jorge Calás

Jorge Calás Lozano

unread,
Nov 21, 2008, 8:16:45 AM11/21/08
to emacs-o...@googlegroups.com
Well looking at both old and new inf-ruby.el files I realized that Phil
is using split-string instead of ruby-args-to-list, so changed
ruby-compilation.el and it works find again.

Patch attached.

cheers,

Jorge

ruby-compilation.patch

Mike D.

unread,
Nov 21, 2008, 9:43:08 AM11/21/08
to Rails On Emacs

On Nov 21, 8:16 am, Jorge Calás Lozano <jca...@gmail.com> wrote:
> Well looking at both old and new inf-ruby.el files I realized that Phil
> is using split-string instead of ruby-args-to-list, so changed
> ruby-compilation.el and it works find again.
>
> Patch attached.

Jorge's patch works for me.

Also, maybe I'm doing it wrong, but the unit tests are all failing for
me. You can see the output at http://pastie.org/320594

Thanks,
-mike

Eric Schulte

unread,
Nov 21, 2008, 10:44:26 AM11/21/08
to emacs-o...@googlegroups.com
"Mike D." <mike.d...@gmail.com> writes:

> On Nov 21, 8:16 am, Jorge Calás Lozano <jca...@gmail.com> wrote:
>> Well looking at both old and new inf-ruby.el files I realized that Phil
>> is using split-string instead of ruby-args-to-list, so changed
>> ruby-compilation.el and it works find again.
>>
>> Patch attached.
>
> Jorge's patch works for me.
>

Thanks for the patch Jorge, I'm applying it now.

>
> Also, maybe I'm doing it wrong, but the unit tests are all failing for
> me. You can see the output at http://pastie.org/320594
>

No, the problem is not unique to you. The rinari tests are currently in
a state of disarray. While I would like to transition the tests from
using elunit.el to ert.el (this transition is currently underway), the
completion of this task has not been able to fight it's way to the top
of my TODO list.

Cheers -- Eric

>
> Thanks,
> -mike

Jorge Calás Lozano

unread,
Nov 21, 2008, 11:26:06 AM11/21/08
to emacs-o...@googlegroups.com
I'm also having problems with ruby-electric.el:

save-excursion: Symbol's function definition is void: ruby-insert-end

Although ruby-electric is not part of rinari, it's a pretty cool help
while writing ruby code.

Cheers

Phil Hagelberg

unread,
Nov 21, 2008, 2:04:00 PM11/21/08
to emacs-o...@googlegroups.com

Thanks for your patch. I tested ruby-mode.el and inf-ruby.el, but I
forgot to test the libraries that depend on them.

I removed the ruby-insert-end function from ruby-mode.el because it was
superfluous. However, such a function may be worth having in
ruby-electric. Here's the definition if you want to add it there.

(defun ruby-insert-end ()
"Insert \"end\" at point and reindent current line."
(interactive)
(insert "end")
(ruby-indent-line t)
(end-of-line))

On a related note, I'm working on an Emacs Starter Kit to help people
get going who are new to Emacs. I haven't bundled rinari with it yet
because I want rinari to be installed via elpa, and I haven't gotten it
packaged up yet. If anyone would like to check out the starter kit and
let me know what they think, that would be great.

$ git clone git://github.com/technomancy/emacs-starter-kit.git

-Phil

Reply all
Reply to author
Forward
0 new messages