help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Machine-dependent elisp


From: Suvayu Ali
Subject: Re: Machine-dependent elisp
Date: Wed, 21 Apr 2010 14:41:54 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On Wednesday 21 April 2010 01:46 PM, address@hidden 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.

Any suggestions on the best way to do this?


I use something very crude, but it works. If the usernames are different on the two hosts, then you could try enclosing the host dependent lines with something like this,

(if (string= (getenv "USER") "username")
    ;; do stuff
        )

--
PMatos


--
Suvayu

Open source is the future. It sets us free.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]