🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8241

Re: host query

#8241
From: Wolfgang Rupprecht
Date: Fri, 06 Jan 1989 19:04
18 lines
1193 bytes
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
Technical Details
Message-ID: <8643@bloom-beacon.MIT.EDU>
Path: arc1-ca.pugleaf.net!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
References: <1202@xn.LL.MIT.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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