Forum: Ruby Spacing issues when using Inferior-Ruby Emacs mode

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
6a50055d04d0309ced9241aaa9f461d2?d=identicon&s=25 Josh Staiger (Guest)
on 2006-02-27 17:28

I'm seeing some rather strange behavior when using Inferior-Ruby-Mode in
Emacs (on Windows XP).

It's a bit difficult to describe what the problem is, but here goes.

Whenever I hit enter my cursor is positioned in the wrong place for the
next prompt.  Instead of being positioned just to the right of the '>',
it is positioned one line below and slightly to the right of where it
should be.

I'm not sure how this will display for everyone, but here is an example
of what I'm seeing if I hit :test[ENTER]:test2[ENTER]:test3[ENTER]

irb(main):001:0> :test

                   [cursor goes here]

As you can see, I'm also seeing another issue of evaluations echoing
twice instead of just once.

Does anyone have any tricks for getting this to work nicely?

I've not changed the default (seemingly) relevant variables in

(defvar ruby-program-name "irb --inf-ruby-mode"
  "*Program invoked by the run-ruby command")

(defvar inferior-ruby-first-prompt-pattern "^irb(.*)[0-9:]+0> *"
  "first prompt regex pattern of ruby interpreter.")

(defvar inferior-ruby-prompt-pattern "^\\(irb(.*)[0-9:]+[>*\"'] *\\)+"
  "prompt regex pattern of ruby interpreter.")

and my enter key is bound to the default comint-send-input command.

Any help would be appreciated, (including a referall to a more
emacs-focused list if necessary).

Thank you!

Josh Staiger
This topic is locked and can not be replied to.