Emacs on Gentoo
First of all Emacs is a super great editor and programming environment. Secondly Gentoo linux gives to a meta package system that makes installing packages from source as easy as picking your nose! Emacs is in portage with both the stable 21.4 and the unstable 22.1. This guide expects you to love emacs and for that reason want to have the newest version installed :-)
echo "=app-editors/emacs-22.1" >> /etc/portage/package.keywords echo "=app-editors/emacs-22.1 X Xaw3d alsa gif gtk jpeg png spell tiff xpm" >> /etc/portage/package.use emerge -av emacs
Depends on what you have installed at this point and if your use flags match with the ones given above, it can take a while. After a cup of coffee or two you should have emacs installed and ready to use. Now for the fun part, installing the emacs extensions via portage!
emerge -av app-emacs/color-theme app-emacs/ecb app-emacs/cedet app-emacs/doxymacs
NB: cua.el and ido.el are part of emacs 22.1 so there is no need to install them. If you run 21.4 you have to install them by hand.
Now we need to setup emacs to load the installed packages. Add the following to your ~/.emacs file.
;; Semantic option package CEDET (setq semantic-load-turn-useful-things-on t) (load "/usr/share/emacs/site-lisp/site-gentoo") ;; CEDET and Semantic options (semantic-load-enable-excessive-code-helpers) ;; Selecting color theme can be changes using M-x color-theme-<name> (require 'color-theme) (color-theme-initialize) ;; setting color-theme to my favorite ;-) (color-theme-hober) ;; Include ECB as evironment for editing C or C++ files (require 'ecb) ;; this directory has to exist !! (setq semanticdb-default-save-directory "~/.emacs.d/semantic") ;; Load the cua mode, provides windows like key combinations (build into emacs 22.1) (cua-mode t) ;; To get the alternative switch-to-buffer and find-file functions in ;; this package bound to keys, do (require 'ido) (ido-mode t)
