Problems with ruby mode in Xemacs

W

W. Crowshaw

The problem is simple: I can get it to work. I'm running Xemacs
21.4.6 from Debian woody. The ruby-elisp files are stored here:
/usr/share/xemacs21/site-lisp/ruby-lisp

I presume that I'm supposed to install ruby-mode by installing them
via the xemacs package installer, but no go.

What should I do? I would really like to use xemacs as my ruby
debugger. Any advice or tips would be greatly appreciated!
 
J

Jim Menard

The problem is simple: I can get it to work. I'm running Xemacs
21.4.6 from Debian woody. The ruby-elisp files are stored here:
/usr/share/xemacs21/site-lisp/ruby-lisp

Assuming you meant "I can't get it to work", what is the problem? Does it
load? Does it turn all your code chartreuse?

To load ruby-mode, add

(autoload 'ruby-mode "ruby-mode" "Ruby mode" t nil)

to your .emacs file.

Does load-path include /usr/share/xemacs21/site-lisp/ruby-lisp? If not, you
can add

(add-to-list 'load-path "/usr/share/xemacs21/site-lisp/ruby-lisp")

before trying to load ruby-mode.

Jim
 
W

W. Crowshaw

Thanks for your help. Unfortunately your suggestions didn't work.

What I meant by "can't get it to work" was that I get no syntax
highlight when
I hope a ruby file. Nor am I able to invoke ruby in the debugger mode
to debug my ruby script.

Incidentally, when I open a .rb file, xemacs says:
"Loading inf-ruby...done"

Any other advice?
 
J

Jim Menard

Thanks for your help. Unfortunately your suggestions didn't work.

What I meant by "can't get it to work" was that I get no syntax
highlight when
I hope a ruby file.

You may have to turn on font lock mode in the Ruby mode hook, even if you
have done so globally. I found I had to do that on some systems. Here's my
Ruby mode hook:

(setq ruby-mode-hook
'(lambda ()
(define-key ruby-mode-map "\r" 'newline-and-indent)
(define-key ruby-mode-map "\M-\C-h" 'backward-kill-word)
(define-key ruby-mode-map "\M-q" 'jw-rb-fill-comment-region)
(setq c-tab-always-indent nil)
(setq ruby-indent-level 4)
(four-tab-stops)
(font-lock-mode 1)))

Jim Wierich posted jw-rb-fill-comment-region. If you can't find it, let me
know and I'll send it to you.
Nor am I able to invoke ruby in the debugger mode
to debug my ruby script.

Yeah, that doesn't work for me either. I see "Autoloading failed to define
function inf-ruby". I haven't bothered to figure that one out; I just enter
shell-mode and type "irb" instead.
Incidentally, when I open a .rb file, xemacs says:
"Loading inf-ruby...done"

Jim
--
Jim Menard, (e-mail address removed), http://www.io.com/~jimm/
"The wonder of all these Internet security problems is that they are
continually labeled as 'e-mail viruses' or 'Internet worms,' rather than
the more correct designation of 'Windows viruses' or 'Microsoft Outlook
viruses.'" -- Robert X. Cringely
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top