I am using Emacs 23.4.1 on my MacBook as a ruby development environment when I am on the go. Although ruby-mode works, Emacs doesn’t appear to recognize ruby specific key bindings. For example, invoking C-c C-r isn’t recognized, but manually invoking the command ruby-send-region via M-x will work.
I should note that on my Linux VM using Emacs 23.4.1, the above key binding works, and when I manually invoke the command with M-x Emacs will remind me in the minibuffer that I can instead use the aforementioned key binding. In the case of my OS X machine, do I manually need to define the key bindings in my ruby configuration file? If so, is there someone be kind enough to give me an example of how to do this?
ruby-send-regioncomes from inf-ruby. Which version are you running? Thereare various bastardized versions that load its keys automatically, which is
what may be happening on Linux.
The canonical version of this comes from Ruby source. It does not load
keys automatically. However, the loading instructions it does provide are
suboptimal, since key-binding code is run every time
ruby-modeis activated.Instead use this: