|
ruby-mode / inferior ruby: msg#01185lang.ruby.general
Emacs' ruby-mode doesn't seem to work too well. I would be most happy if anyone could tell me if what I see is the normal behaviour, or if there is an error in my setup. An example, given the following code: def pow(x) x * x end pow() When I evaluate this twice using C-c C-e, I get the following in the in- ferior ruby buffer: irb(main):001:0> irb(main):002:1> irb(main):003:1> nil irb(main):004:0> ArgumentError: wrong # of arguments(0 for 1) from (irb):5:in `pow' from (irb):5 irb(main):006:0> irb(main):007:1> irb(main):008:1> nil irb(main):009:0> ArgumentError: wrong # of arguments(0 for 1) from (irb):10:in `pow' from (irb):10 irb(main):011:0> As you can see, the prompt is echoed for every line evaluated, and the line numbers are not reset so that the second evaluation reports excep- tions on wrong lines. This is extremely annoying. I have tried on the following combinations of software: emacs 20.7.2 / 21.2.1 irb 0.7.4(01/05/08) / 0.9(02/07/03) ruby-mode 1.25.2.8 / 1.58 Debian GNU/Linux Woody/Sarge The relevant section of my .emacs looks as follows: (require 'ruby-mode) (require 'rubydb) (setq auto-mode-alist (cons '("\\.rb$" . ruby-mode) auto-mode-alist)) (setq interpreter-mode-alist (append '(("^#!.*ruby" . ruby-mode)) interpreter-mode-alist)) (autoload 'run-ruby "inf-ruby" "Run an intferior 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))) Any help *highly* appreciated! -- I've seen things you people wouldn't believe. Attack ships on fire off the shores of the Nonestic Ocean. I watched magic blunderbusses flash and glitter in the dark near Glindea's Palace. All those moments will be lost in time, like tears in rain. Time to die...
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | === again, Hal E. Fulton |
|---|---|
| Next by Date: | [OT] Programming practice question, Philip Mak |
| Previous by Thread: | === again, Hal E. Fulton |
| Next by Thread: | [OT] Programming practice question, Philip Mak |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |