From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: how to keep .emacs files in synch Date: Thu, 4 Oct 2007 11:24:22 +0200 Message-ID: <200710041124.23974.andreas.roehler@online.de> References: <4703EDD0.4050709@walrond.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1191489796 31934 80.91.229.12 (4 Oct 2007 09:23:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Oct 2007 09:23:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 04 11:23:13 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IdMvH-0003Z3-9B for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Oct 2007 11:23:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdMvC-0007JS-8m for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Oct 2007 05:23:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IdMup-0007H4-C5 for help-gnu-emacs@gnu.org; Thu, 04 Oct 2007 05:22:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IdMum-0007Do-CO for help-gnu-emacs@gnu.org; Thu, 04 Oct 2007 05:22:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdMum-0007DX-6u for help-gnu-emacs@gnu.org; Thu, 04 Oct 2007 05:22:40 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IdMul-0005P4-Ph for help-gnu-emacs@gnu.org; Thu, 04 Oct 2007 05:22:40 -0400 Original-Received: from [84.190.137.184] (helo=karton) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis) id 0MKwpI-1IdMug2Zi0-00027r; Thu, 04 Oct 2007 11:22:34 +0200 User-Agent: KMail/1.8.2 In-Reply-To: <4703EDD0.4050709@walrond.org> Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX18FtADdO20hfA8P8dhC5531hI6zbdYsCSzmF4Y NF9yQdOa3HI4rhw+xY2djPrRzQzu41NQqpcuIhlofdV+bV+W6O 1rNxeQCPNEAyF585q5F6Q== X-Detected-Kernel: Linux 2.6? (barebone, rare!) 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:48107 Archived-At: Am Mittwoch, 3. Oktober 2007 21:30 schrieb Andrew Walrond: > kj wrote: > > I regularly work on various systems, and it's a bit of a chore to > > keep my .emacs files in synch. I've tried various approaches, none > > entirely satisfactory. The two issues that give me the most > > headaches are 1) to automate the process whereby changes to one > > system's .emacs file gets reflected on the .emacs files on other > > systems; and 2) to manage those modifications that are applicable > > to only one or a subset of the systems. > > > > I'd be interested to read how others solve this problem. > > Well, I would use one .emacs on all systems, but include some COND stuff > to let the .emacs decide which parts are appropriate for the current > system. > =2E... Yeah. Here maybe some examples for this Solved it in my ~/.emacs file that way: (cond ((string-match "XEmacs\\|Lucid" emacs-version) (when (file-readable-p "~/.xemacs/init.el") (load "~/.xemacs/init.el" nil t))) ((or (string-match "22" (emacs-version)) (string-match "23" (emacs-version))) (if (file-readable-p "~/.gnu-emacs-cvs-custom") (progn (load "~/.gnu-emacs-cvs-custom" t t) =2E.. ((string-match "21.4" (emacs-version)) (if=20 (file-readable-p "~/.gnu-emacs-custom") (progn (load "~/.gnu-emacs-custom" t t) =2E.. (t (message "%s" "No Emacs init file found")))=20 Extendable with (when (string-match "my-host" (getenv "HOST"))) for example. Andreas R=F6hler