From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "N. Raghavendra" Newsgroups: gmane.emacs.help Subject: Re: how to edit+compile+debug without leaving GNU/Emacs Date: Mon, 20 Feb 2006 17:00:21 +0530 Organization: X-Organization Message-ID: <86oe12fesy.fsf@riemann.mri.ernet.in> References: <1140246333.821824.80470@o13g2000cwo.googlegroups.com> <1140424086.371321.50350@o13g2000cwo.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140454274 10285 80.91.229.2 (20 Feb 2006 16:51:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2006 16:51:14 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 20 17:51:13 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FBEFe-0005ap-Ji for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Feb 2006 17:51:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBBsY-0000fr-GC for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Feb 2006 09:19:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!news.glorb.com!dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help X-Organization: Harish-Chandra Research Institute (HRI) X-Address: Chhatnag Road, Jhusi, Allahabad 211 019, India X-URL: http://www.mri.ernet.in/ X-Phone: +91 (532) 2667 509, 2667 318, 2667 578, 2567 746, 2567 747 X-Fax: +91 (532) 2667 576, 2567 748, 2567 444, 2568 036 X-OpenPGP-Key-ID: 0x03618806 X-OpenPGP-Key-Fingerprint: C75D D0AF 457E 7454 BEC2 37AD C6E1 0407 0361 8806 X-OpenPGP-Public-Key-Available-At: http://www.keyserver.net/ User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (berkeley-unix) Cancel-Lock: sha1:2aw+2lIkRejvdeAhyJ42UKJoNbM= Original-Lines: 23 Original-NNTP-Posting-Host: 202.41.87.100 Original-X-Trace: news.sunsite.dk DXC=L[Vi9Yo:]5F[5e>4Hh5XA@YSB=nbEKnkKf7hTCTD<<2@ID5_U; QN1YC=JDn=l3B; kMATKI?[mLM1KhGV>7]YX4kKHmWC684_jDN Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:137686 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33311 Archived-At: At 2006-02-20T00:28:06-08:00, venk wrote: > How can I load different .emacs depending on the machine name? One way is to create one init file named after each host, e.g., `edit.el', `build.el', and `debug.el', say in the directory $HOME/emacs. Then, use $HOME/.emacs as a wrapper which loads the relevant init file. So, `.emacs' would just contain the forms (defun hostname (domain-name) "Return the hostname component of DOMAIN-NAME." (if (string-match "\\..*" domain-name) (replace-match "" t nil domain-name) domain-name)) (load (expand-file-name (hostname system-name) "~/emacs")) HTH, Raghavendra. -- N. Raghavendra | See message headers for contact Harish-Chandra Research Institute | and OpenPGP details.