Emacs

Hello,

I’ve been searching for an (X)Emacs Ruby mode, but I haven’t found any.
I’ve only found references that it exists, and I’ve found RPMs (not useful
if you are on a Sun machine or are not root).

Does anyone know where I can get the Emacs Ruby mode?

Thanks,
Daniel Carrera
Graduate Teaching Assisant. Math Dept.
University of Maryland. (301) 405-5137

Hi –

···

On Sun, 8 Dec 2002, Daniel Carrera wrote:

Hello,

I’ve been searching for an (X)Emacs Ruby mode, but I haven’t found any.
I’ve only found references that it exists, and I’ve found RPMs (not useful
if you are on a Sun machine or are not root).

Does anyone know where I can get the Emacs Ruby mode?

'Tis on your machine already :slight_smile: Look in the ‘misc’ subdirectory of
the Ruby distribution.

David


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

I just use the one that came with ruby. Don’t need to be root, or have it in an
RPM either. Figure a place to put it and add that to your auto-mode-alist (or
the XEmacs equivalent).

···

-----Original Message-----
From: Daniel Carrera [mailto:dcarrera@math.umd.edu]
Sent: Sunday, December 08, 2002 1:10 AM
To: ruby-talk ML
Subject: Emacs

Hello,

I’ve been searching for an (X)Emacs Ruby mode, but I haven’t found any.
I’ve only found references that it exists, and I’ve found RPMs (not useful
if you are on a Sun machine or are not root).

Does anyone know where I can get the Emacs Ruby mode?

Thanks,
Daniel Carrera
Graduate Teaching Assisant. Math Dept.
University of Maryland. (301) 405-5137

'Tis on your machine already :slight_smile: Look in the ‘misc’ subdirectory of
the Ruby distribution.

David

Alright, I see them. Sorry to bug you again, but I can’t figure out how
to add it to XEmacs. I’ve been looking all over the web, I’ve been trying
to figure out XEmacs, but I’ve failed.

Do you know how I can add the ruby mode to XEmacs?

Thanks,
Daniel Carrera
Graduate Teaching Assisant. Math Dept.
University of Maryland. (301) 405-5137

···

On Sun, 8 Dec 2002 dblack@candle.superlink.net wrote:

Daniel Carrera dcarrera@math.umd.edu writes:

Do you know how I can add the ruby mode to XEmacs?

Sure, just stick it somewhere in your load path.

I recommend making a directory to put other .el files, and adding that
directory to your load-path:

mkdir ~/elisp

then, inside ~/.xemacs/init.el:

(add-to-list
'load-path
(expand-file-name “~/elisp”))

(add-to-list 'auto-mode-alist '(“\.rb$” . ruby-mode))

Then, just put ruby-mode.el into your ~/elisp directory, and restart
XEmacs. Depending on your distribution, you may already have
ruby-mode loaded/installed…

···


Josh Huber

Could some emacs person put up the howto at
http://www.rubygarden.org/ruby?EditorExtensions - I’d rather not do it
myself for fear of messing up some detail. An inf-ruby.el howto would
probably be a good idea too.

martin

···

Josh Huber huber@alum.wpi.edu wrote:

Daniel Carrera dcarrera@math.umd.edu writes:

Do you know how I can add the ruby mode to XEmacs?

Sure, just stick it somewhere in your load path.

Sigh. I like Emacs, but I always struggle configuring it.

Thanks for helping. I do appreciate it. Perhaps you can tell me what I’m
doing wrong:

I made ~/elisp and put ruby-mode.el in it (as well as the other *.el files
from the Ruby distribution).

I didn’t have a ~/.xemacs/init.el file, so I created ~/.xemacs and
~/.xemacs/init.el and put what you wrote on it. It didn’t work.

I also added it to ~/.emacs (XEmacs seems to read configuration from
there), but it didn’t work either.

By “it didn’t work” I mean that when I open a ‘.rb’ file I see no
indication that the Ruby mode is loaded. For instance, I can’t get it to
do syntax highlighting.

Can you think of anything else that I might be doing wrong?

Thanks again.

Daniel Carrera
Graduate Teaching Assisant. Math Dept.
University of Maryland. (301) 405-5137

···

On Mon, 9 Dec 2002, Josh Huber wrote:

Sure, just stick it somewhere in your load path.

I recommend making a directory to put other .el files, and adding that
directory to your load-path:

mkdir ~/elisp

then, inside ~/.xemacs/init.el:

(add-to-list
'load-path
(expand-file-name “~/elisp”))

(add-to-list 'auto-mode-alist '(“\.rb$” . ruby-mode))

Then, just put ruby-mode.el into your ~/elisp directory, and restart
XEmacs. Depending on your distribution, you may already have
ruby-mode loaded/installed…


Josh Huber

Hi –

Sigh. I like Emacs, but I always struggle configuring it.

Thanks for helping. I do appreciate it. Perhaps you can tell me what I’m
doing wrong:

I made ~/elisp and put ruby-mode.el in it (as well as the other *.el files
from the Ruby distribution).

I didn’t have a ~/.xemacs/init.el file, so I created ~/.xemacs and
~/.xemacs/init.el and put what you wrote on it. It didn’t work.

I also added it to ~/.emacs (XEmacs seems to read configuration from
there), but it didn’t work either.

By “it didn’t work” I mean that when I open a ‘.rb’ file I see no
indication that the Ruby mode is loaded. For instance, I can’t get it to
do syntax highlighting.

Can you think of anything else that I might be doing wrong?

In your ~/.emacs you need to make the association between the .rb
extension and ruby-mode. Try putting this in your .emacs and then
start up a .rb file (this comes from some instructions in
inf-ruby.el):

(autoload 'ruby-mode “ruby-mode”
“Mode for editing ruby source files” t)
(setq auto-mode-alist
(append '((“\.rb$” . ruby-mode)) auto-mode-alist))
(setq interpreter-mode-alist (append '((“ruby” . ruby-mode))
interpreter-mode-alist))

and that should hook into loading ruby-mode.el.

David

···

On Mon, 9 Dec 2002, Daniel Carrera wrote:


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

Wooohoo!!!
YYYiiiipppeee!!!
Yabadabadoo!!

Thanks David, that worked.

I didn’t read inf-ruby.el because I didn’t think it would have anything
human-readable (I know so little Lisp that it might as well be Greek to
me).

Cheers,
Daniel Carrera
Graduate Teaching Assisant. Math Dept.
University of Maryland. (301) 405-5137

···

On Mon, 9 Dec 2002 dblack@candle.superlink.net wrote:

Hi –

On Mon, 9 Dec 2002, Daniel Carrera wrote:

Sigh. I like Emacs, but I always struggle configuring it.

Thanks for helping. I do appreciate it. Perhaps you can tell me what I’m
doing wrong:

I made ~/elisp and put ruby-mode.el in it (as well as the other *.el files
from the Ruby distribution).

I didn’t have a ~/.xemacs/init.el file, so I created ~/.xemacs and
~/.xemacs/init.el and put what you wrote on it. It didn’t work.

I also added it to ~/.emacs (XEmacs seems to read configuration from
there), but it didn’t work either.

By “it didn’t work” I mean that when I open a ‘.rb’ file I see no
indication that the Ruby mode is loaded. For instance, I can’t get it to
do syntax highlighting.

Can you think of anything else that I might be doing wrong?

In your ~/.emacs you need to make the association between the .rb
extension and ruby-mode. Try putting this in your .emacs and then
start up a .rb file (this comes from some instructions in
inf-ruby.el):

(autoload 'ruby-mode “ruby-mode”
“Mode for editing ruby source files” t)
(setq auto-mode-alist
(append '((“\.rb$” . ruby-mode)) auto-mode-alist))
(setq interpreter-mode-alist (append '((“ruby” . ruby-mode))
interpreter-mode-alist))

and that should hook into loading ruby-mode.el.

David


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

Mon, 9 Dec 2002 05:59:20 +0900: dblack@candle.superlink.net
(dblack@candle.superlink.net):

(autoload 'ruby-mode “ruby-mode”
“Mode for editing ruby source files” t)
(setq auto-mode-alist
(append '((“\.rb$” . ruby-mode)) auto-mode-alist))
(setq interpreter-mode-alist (append '((“ruby” . ruby-mode))
interpreter-mode-alist))

Holy hell. I think you just reminded me /why/ i prefer vim over emacs.
:wink:

···


< There is a light that shines on the frontier >
< And maybe someday, We’re gonna be there. >
< Rando Christensen / rando@babblica.net >

Mon, 9 Dec 2002 05:59:20 +0900: dblack@candle.superlink.net
(dblack@candle.superlink.net):

(autoload 'ruby-mode “ruby-mode”
“Mode for editing ruby source files” t)
(setq auto-mode-alist
(append '((“\.rb$” . ruby-mode)) auto-mode-alist))
(setq interpreter-mode-alist (append '((“ruby” . ruby-mode))
interpreter-mode-alist))

Holy hell. I think you just reminded me /why/ i prefer vim over emacs.
:wink:

Hang on sunshine, before a flame-war becomes us, I’ll point out that
auto-identifying what filetype Vim should use, and loading the appropriate
syntax, etc., files, only became easy with version 6.0 (i.e. a year or so ago).
Mind you, it is now exemplary.

If you invented a new language and wanted Vim to recognise it, you’d have to
jump through a few hoops. It’s not hard, but then everyone else who wanted to
use it would have to do the same.

Gavin

···

From: “Rando Christensen” rando@babblica.net

Just a short announcment. RAAInstall has been updated to work with the
new wonderful RAA. The new naming convention for package names has
streamlined things wonderfully.

Relating to previous comments, raa-install no longer pulls directly
from the RAA. Instead it runs off a compacted XML file hosted on the
raa site on sourceforge, updated periodically from the RAA. This
improves the download from 500k down to a little over 20k.

Many packages still don’t work, but many do. Basically, requirements
for packages to be installed are:
* They are packaged as tar.gz
* They use one of install.rb/extconf.rb/configure for installation

RAAInstall can be downloaded from:
http://osdn.dl.sourceforge.net/sourceforge/narf-lib/raa-install-0.0.5.tgz

Or installed using itself by doing
raa-install -i raainstall

Enjoy,

-Tom