On 21 April 2010 21:46, <pocmatos@gmail.com> wrote:
Hi all,
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.
I do exactly this with (system-name), e.g.:
(defvar I-am-at-work (string-match "workdomain" (system-name)))
(defvar I-am-at-home (string-match "danny" (system-name)))
(defvar I-am-on-netbook (string-match "trent" (system-name)))
And then later on in my .emacs I have stanzas like:
(cond
((eval I-am-on-netbook)