Running irb in emacs (via run-ruby) echos is all i type

I am running Windows Vista and Emacs 23.1.1, and I installed Ruby using the "One Click Ruby Installer". Then I installed the Emacs Lisp files that were installed with Ruby, as indicated in inf-ruby.el.

When I run run-ruby (Mx run-ruby), irb starts, but every time I press Enter, irb displays the line I just printed. 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 the cygwin shell, the echo is not executed. For example:

$ irb.bat --inf-ruby-mode
irb(main):001:0> def foo()
                   3 + 4
                   end
nil

How to disable echo in Emacs? Thanks!

+3
source share
2 answers

The worst Ruby mode built on top of comint mode.

, comint comint-process-echo.

t (true), .

:

;;; 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)
+5

:

(defun echo-false() (setq comint-process-echoes t))

(add-hook 'comint-mode-hook-echo-false)

+3

Source: https://habr.com/ru/post/1715243/


All Articles