I'm running Windows Vista and Emacs 23.1.1 and I have installed Ruby using the "One Click Ruby Installer". I then installed the Emacs Lisp files that were installed with Ruby as specified in inf-ruby.el.
When I run the run-ruby (M-x run-ruby) function, irb starts but every time I press Enter, irb prints out the line I just typed. For example:
irb(main):001:0> def foo()
def foo()
3 + 4
3 + 4
end
end
nil
This is annoying. If I just run irb in a cygwin command shell, no echoing is performed. For example:
$ irb.bat --inf-ruby-mode
irb(main):001:0> def foo()
3 + 4
end
nil
How do I turn off the echoing in Emacs? Thanks!
The inferior Ruby mode is built on top of comint-mode.
I noticed that there was a comint variable named comint-process-echoes.
I set this variable to t (true) and the echoing stopped.
Here's how I set the variable:
;;; Define Ruby Mode Hook
(defun my-ruby-mode-hook ()
(progn
(setq comint-process-echoes t)
(turn-on-font-lock)
(auto-fill-mode)
(yas/minor-mode)
(inf-ruby-keys)))
;;; Register Ruby Mode Hook
(add-hook 'ruby-mode-hook 'my-ruby-mode-hook)
should be this:
(defun echo-false () (setq comint-process-echoes t))
(add-hook 'comint-mode-hook 'echo-false)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With