[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problems with ruby mode in Xemacs

wcrowshaw

10/3/2003 2:15:00 AM

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!

--
William Crowshaw
3 Answers

Jim Menard

10/3/2003 12:44:00 PM

0

wcrowshaw@yahoo.com (W. Crowshaw) writes:

> 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
--
Jim Menard, jimm@io.com, http://www.io....
"We've heard that a million monkeys at a million keyboards could produce the
Complete Works of Shakespeare; now, thanks to the Internet, we know this is
not true." -- Robert Wilensky, University of California

wcrowshaw

10/4/2003 6:31:00 PM

0

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?


Jim Menard <jimm@io.com> wrote in message news:<wsqhe2qij8y.fsf@io.com>...
> wcrowshaw@yahoo.com (W. Crowshaw) writes:
>
> > 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

Jim Menard

10/7/2003 8:08:00 PM

0

wcrowshaw@yahoo.com (W. Crowshaw) writes:

> 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, jimm@io.com, http://www.io....
"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