Installing on Linux without root permissions. With root permissions, always use /usr/local/src instead of ~/local/src and use /usr/local instead of /home/USER/local (and when installing without root, use your username instead of "USER") In csh/tcsh shells, you should run "rehash" after every program is installed. This isn't needed in bash. Installing emacs: cd ~/local/src/ wget http://ftp.wayne.edu/pub/gnu/emacs/emacs-22.1.tar.gz tar zxvf emacs-22.1.tar.gz cd emacs-22.1 ./configure --prefix=/home/USER/local make src/emacs -q make install cd .. rm -rf emacs-22.1 Installing emacs-rails mode. For this you need subversion installed (svn). I am using ~/.elisp as my elisp directory, but this is an arbitrary choice. mkdir ~/.elisp cd ~/.elisp/ svn checkout svn://rubyforge.org/var/svn/emacs-rails/trunk emacs-rails wget http://www.kazmier.com/computer/snippet.el wget http://www.webweavertech.com/ovidiu/emacs/find-recursive.txt mv find-recursive.txt find-recursive.el Installing ruby: cd ~/local/src wget 'ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.6.tar.gz' tar zxvf ruby-1.8.6.tar.gz cd ruby-1.8.6 ./configure --prefix=/home/USER/local make make test make install Install emacs ruby-mode: cd misc mkdir ~/.elisp/ruby-mode cp -p * ~/.elisp/ruby-mode cd ../.. Finishing with ruby: rm -rf ruby-1.8.6 Installing ruby gems (default directory is ~/local/src ): wget 'http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz' tar zxvf rubygems-0.9.4.tgz cd rubygems-0.9.4 ruby setup.rb cd .. rm -rf rubygems-0.9.4 Installing rails: gem install rails --include-dependencies Change permissions so that others can access these files: chmod -R a+rX ~/.elisp/ Installing tidy: cd ~/local/src cvs -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy login Hit enter key in response to password prompt. cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy cp tidy/build/gmake You have to edit the Makefile appropriately. This did it for me (using my username instead of "USER"): perl -pi -e 's#prefix=/usr/local#prefix=/home/USER/local#g' Makefile make make install Installing nXhtml mode: cd ~/local/src wget 'http://ourcomments.org/Emacs/DL/elisp/nxhtml/zip/nxhtml-1.03-070525.zip' unzip nxhtml-1.03-070525.zip mv nxml ~/.elisp/ Installing MMM Mode: cd ~/local/src wget http://umn.dl.sourceforge.net/sourceforge/mmm-mode/mmm-mode-0.4.8.tar.gz tar zxvf mmm-mode-0.4.8.tar.gz | less cd mmm-mode-0.4.8 ./configure --prefix=/home/USER/local I had to edit the Makefile at this point. Like so: perl -pi -e 's/xemacs/emacs/ ; s/21\.4/22.1/' Makefile Without that edit, MMM Mode would compile without errors but it would not work in GNU Emacs. make make install Installing pabbrev mode: 2647 3:10 cd ~/.elisp/ 2649 3:10 wget http://homepages.cs.ncl.ac.uk/phillip.lord/download/emacs/pabbrev.el 2660 3:12 chmod -R a+rX ~/.elisp/ I'm not sure if the emacs syntax highlighting will look right without the color settings I've been using (but the opposite may be true). Anyway, here are the lines from my ~/.Xdefaults that you might need to put in your ~/.Xdefaults: ! GNU Emacs settings (man emacs): ! emacs.foreground: White emacs.background: Black emacs.borderColor: White emacs.cursorColor: Red emacs.pointerColor: Yellow ! ! ! Lucid Xemacs settings (man xemacs): ! Emacs.default.attributeForeground: White Emacs.default.attributeBackground: Black Emacs.borderColor: White Emacs.cursorColor: Red Emacs.pointerColor: Yellow Last, but certainly not least, are the lines from my ~/.emacs file. This was tricky to get right, but it seems to be working. Some people out there on the web had misspelled words in theirs, which was a major hassle for me. ;; .emacs ;;; uncomment this line to disable loading of "default.el" at startup ;; (setq inhibit-default-init t) ;; turn on font-lock mode (global-font-lock-mode t) ;; enable visual feedback on selections (setq transient-mark-mode t) ;; adds ~/.elisp to load path (setq load-path (cons "~/.elisp" load-path)) ;; ---------------------------------------------------------------------- ;; Line added following addvice at this URL: ;; http://www.hyperionreactor.net/node/43 (require 'pabbrev) ;; ---------------------------------------------------------------------- ;; ---------------------------------------------------------------------- ;; lines added following advice at this URL: ;; http://www.credmp.org/index.php/2006/11/28/ruby-on-rails-and-emacs/ (setq load-path (cons "~/.elisp/ruby-mode" load-path)) (autoload 'ruby-mode "ruby-mode" "Load ruby-mode") (add-hook 'ruby-mode-hook 'turn-on-font-lock) (setq load-path (cons "~/.elisp/emacs-rails" load-path)) ;; (defun try-complete-abbrev (old) ;; (if (expand-abbrev) t nil)) (setq hippie-expand-try-functions-list '(try-complete-abbrev try-complete-file-name try-expand-dabbrev)) (require 'rails) ;; associate ruby-mode with .rb files (add-to-list 'auto-mode-alist '("\.rb$" . ruby-mode)) ;; make #! scripts executable after saving them (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p) ;; ---------------------------------------------------------------------- ;; ---------------------------------------------------------------------- ;; following lines were added for nXML/nXhtml modes based on this URL: ;; http://www.thaiopensource.com/nxml-mode/ (load "~/.elisp/nxml/autostart.el") (unify-8859-on-decoding-mode) ;; ---------------------------------------------------------------------- ;; ---------------------------------------------------------------------- ;; added for MMM Mode following instructions here: ;; http://www.naan.net/trac/wiki/emacs_rails (require 'mmm-mode) (require 'mmm-auto) (setq mmm-global-mode 'maybe) (setq mmm-submode-decoration-level 2) (set-face-background 'mmm-output-submode-face "MidnightBlue") (set-face-background 'mmm-code-submode-face "gray16") (set-face-background 'mmm-comment-submode-face "orange4") (set-face-background 'mmm-special-submode-face "orange3") (mmm-add-classes '((erb-code :submode ruby-mode :match-face (("<%#" . mmm-comment-submode-face) ("<%=" . mmm-output-submode-face) ("<%" . mmm-code-submode-face)) :front "<%[#=]?" :back "%>" :insert ((?% erb-code nil @ "<%" @ " " _ " " @ "%>" @) (?# erb-comment nil @ "<%#" @ " " _ " " @ "%>" @) (?= erb-expression nil @ "<%=" @ " " _ " " @ "%>" @)) ))) (mmm-add-classes '((gettext :submode gettext-mode :front "_(['\"]" :face mmm-special-submode-face :back "[\"'])"))) (mmm-add-classes '((html-script :submode javascript-mode :front ""))) (add-to-list 'auto-mode-alist '("\\.rhtml$" . html-mode)) (add-hook 'html-mode-hook (lambda () (setq mmm-classes '(erb-code html-js html-script gettext embedded-css)) (mmm-mode-on))) (add-to-list 'mmm-mode-ext-classes-alist '(ruby-mode nil gettext)) (global-set-key [f8] 'mmm-parse-buffer) ;; ----------------------------------------------------------------------