>From: pocmatos@gmail.com >I have some code which I would like to make dependent on the machine I >am currently working on. I have a single .emacs shared between my work >machine and my home machine. I thought about making dependent on the ip >address (or hostname) but then I need a way to get the ip address (or >hostname) of my current machine. > >Any suggestions on the best way to do this? > >(I don't think it matters but the code I need to change is mostly the >loading of certain libraries and the setting of the smtp server for >gnus) I can offer one possible solution. I use the same ~/.emacs on several machines, but there are slight differences in the way that each machine is configured. To give a concrete example, I'd like to use "ant -find build.xml" as the default compile command at work, and "make" as the default compile command at home. To achieve this, my ~/.emacs has (if (file-exists-p "~/.elisp/machine-local.el") (load "~/.elisp/machine-local.el")) machine-local.el has the machine-specific settings. The Emacs manual has a similar example, which uses custom-file. http://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Customizations.html#Saving-Customizations Steve