From: John Gabriele Date: 2006-08-16T14:36:19+09:00 Subject: Re: newb: setting up GNU Emacs for Ruby -- help On 8/15/06, Marshall T. Vandegrift wrote: > "John Gabriele" writes: > > [snip] > Which OS / distro are you running? Many provide a package which > separately er... packages the Ruby elisp files and makes sure they're > in the load path, etc. On Debian (and Ubuntu?) the package is named > ruby1.8-elisp for ruby 1.8. For those interested... At home (on Ubuntu), I installed the ruby-elisp package (which depends on ruby1.8-elisp). It only depends on having emacs installed (not Ruby). Incidentally, I installed emacs via apt-get, and I've got Ruby installed from source in /opt. Anyhow, during the install it says: Setting up ruby1.8-elisp (1.8.4-1ubuntu1.1) ... install/ruby1.8-elisp: Handling install for emacsen flavor emacs21 Wrote /usr/share/emacs21/site-lisp/ruby1.8-elisp/inf-ruby.elc Wrote /usr/share/emacs21/site-lisp/ruby1.8-elisp/rubydb2x.elc Wrote /usr/share/emacs21/site-lisp/ruby1.8-elisp/rubydb3x.elc Wrote /usr/share/emacs21/site-lisp/ruby1.8-elisp/ruby-electric.elc Wrote /usr/share/emacs21/site-lisp/ruby1.8-elisp/ruby-mode.elc Done These files seem to be generated during the install. Their source counterparts are: /usr/share/emacs/site-lisp/ruby1.8-elisp/inf-ruby.el /usr/share/emacs/site-lisp/ruby1.8-elisp/ruby-electric.el /usr/share/emacs/site-lisp/ruby1.8-elisp/ruby-mode.el /usr/share/emacs/site-lisp/ruby1.8-elisp/rubydb2x.el /usr/share/emacs/site-lisp/ruby1.8-elisp/rubydb3x.el This package also provides /etc/emacs/site-start.d/50ruby1.8-elisp.el which contains a few informative comments, and does things involving load-path and autoload, which I don't yet understand. Now when I open up a Ruby file, it's syntax highlighted. Strangely (to me), when I write any Ruby, even though that ruby-electric module (is that the correct term?) is present, I don't get the "electric" behaviour that Marshall described. Any idea how one might enable/disable it? During the install, my ~/.emacs file wasn't touched. The last issue was that it used, by default, 2-space indents. I "fixed" that :), and put these notes and others on the wiki: http://wiki.rubygarden.org/Ruby/page/show/EmacsWithRuby At least, now, I can gradually learn more about emacs while still getting my work done. I may try a similar procedure tomorrow on the Debian Etch machine unless the other tips in this thread end up working out (ex. Julian's snippet below) for doing it manually. Thanks, ---John