I'm trying to put all my emacs configuration under version control in order to easily switch between different computers. Actually my preferred system is OSX (10.8.3) with emacs 24.3 from http://emacsformacosx.com/. But I can also work in other systems (more likely linux-based although different distribution ubuntu/scientific-linux) which generally are equipped with emacs 23.4. What I would like to have is a init file which check the version of emacs and the operating system, load the needed packages from emacs package manager. So far my .emacs init file for emacs 24.3 on OSX is as follow
(require 'package)
(setq package-archives '(
("marmalade" . "http://marmalade-repo.org/packages/")
("org" . "http://orgmode.org/elpa/")
("melpa" . "http://melpa.milkbox.net/packages/")))
(package-initialize)
After that there are configuration (loaded separately as for example
(load "python-sy")
which uses some packages not installed as default: in particular
color-theme
org-mode
theme-changer
ess-site
magit
auctex
python.el (fgallina implementation)
plus some other things which relies in already built-in packages I admit that I have no idea on how to start for having a .emacs init file which could be used indifferently in all the devices. Furthermore I also would like to have a way to load url-proxy-services based on the system configuration
(setq url-proxy-services '(("http" . "proxy.server.com:8080")))
Thank you for any help