From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jan_B=F6cker?= Subject: Re: one .emacs on multiple computers Date: Thu, 13 May 2010 14:37:12 +0200 Message-ID: <4BEBF278.30305@jboecker.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50026 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCXfD-00063S-VK for emacs-orgmode@gnu.org; Thu, 13 May 2010 08:37:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCXfB-0005xS-C8 for emacs-orgmode@gnu.org; Thu, 13 May 2010 08:37:19 -0400 Received: from mail7.worldserver.net ([217.13.200.27]:42264) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCXfA-0005xA-TT for emacs-orgmode@gnu.org; Thu, 13 May 2010 08:37:17 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: charles snyder Cc: emacs-orgmode On 05/13/2010 03:48 AM, charles snyder wrote: > Can I just do something like: > > (defvar cls-org-file "C:/Users/clsnyder/My Documents/My > Dropbox/emacs_org/") ;; WINDOWS VERSION > (defvar cls-org-file "/Users/clsnyder/Dropbox/emacs_org/") ;; IMAC VERSION > > and then in each of the various .emacs files on each of the machines, > just do something like this throughout the file: > > (add-to-list 'load-path "cls-org-file" + org-mode6.35i/lisp" ) > (add-to-list 'load-path "cls-org-file" + personal.org > " ) Yes, that approach works. Create a directory for your org-mode configuration in your dropbox directory, say /path/to/dropbox/emacs-config/. Put the contents of your .emacs in, say, emacs-config/init.el. In the .emacs file on each machine, put: (setq cls/config-dir "/absolute/path/to/dropbox/emacs-config/") ; note the trailing slash! (load (concat cls/config-dir "init.el")) In init.el, set the `custom-file' variable to make the emacs customize interface store its data under the dropbox directory: (setq custom-file (concat cls/config-dir "customize.el")) Assuming your org-mode checkout is at emacs-config/org-mode6.35i, use (add-to-list 'load-path (concat cls/config-dir "org-mode6.35i/lisp")) (require 'org) ; other org-mode setup stuff If you want to have some machine-specific configuration, there is no need to use different files for different machines -- just check for the hostname. For example, I use org-mode on my laptop and my n900 smartphone, so my startup files include: (setq jb/system (cond ((string-match "N900" system-name) 'n900) ((string-match "pythagoras" system-name) 'laptop) (t 'unknown))) and later I can do: (when (eq jb/system 'n900) (blink-cursor-mode 0)) to disable blink-cursor-mode on the n900 to save battery power. (Emacs idle CPU usage with blink-cursor-mode: 1.5%. Without: 0% :) ) Because the path to your org files is rather long, you also might be interested in this post, where Nathan Neff describes a way to easily define shortcuts to jump to frequently used files/headings: http://article.gmane.org/gmane.emacs.orgmode/25106/ HTH, Jan