Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mgm.mit.edu!wolfgang From: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Newsgroups: comp.emacs Subject: Re: host query Message-ID: <8643@bloom-beacon.MIT.EDU> Date: 6 Jan 89 19:04:43 GMT References: <1202@xn.LL.MIT.EDU> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: wolfgang@mgm.mit.edu.UUCP (Wolfgang Rupprecht) Organization: Freelance Software Consultant, Boston, Ma. Lines: 18 In article <1202@xn.LL.MIT.EDU> rkc@XN.LL.MIT.EDU (rkc) writes: >I need to conditionally load a file in my .emacs file based on the >name of the host I'm running on. The code would look something like: >(if (string= (hostname) "my_computer") (load >"~/emacs/file.elc")) Unfortunately I can't find a function that >returns the host's name. Does anyone know what it is (or has anyone >written such a function)? try: (system-name) "mgm.mit.edu" system-name: Return the name of the machine you are running on, as a string. -wolfgang Wolfgang Rupprecht ARPA: wolfgang@mgm.mit.edu (IP 18.82.0.114) TEL: (617) 267-4365 UUCP: mit-eddie!mgm.mit.edu!wolfgang