From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: one .emacs on multiple computers Date: Thu, 13 May 2010 12:07:17 -0500 Message-ID: References: <4BEBF278.30305@jboecker.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0088659545==" Return-path: Received: from [140.186.70.92] (port=51060 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCbsa-0005yL-58 for emacs-orgmode@gnu.org; Thu, 13 May 2010 13:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCbsW-00081d-3z for emacs-orgmode@gnu.org; Thu, 13 May 2010 13:07:22 -0400 Received: from mail-gx0-f213.google.com ([209.85.217.213]:49116) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCbsW-00081W-0E for emacs-orgmode@gnu.org; Thu, 13 May 2010 13:07:20 -0400 Received: by gxk5 with SMTP id 5so942015gxk.6 for ; Thu, 13 May 2010 10:07:19 -0700 (PDT) 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 --===============0088659545== Content-Type: multipart/alternative; boundary=000e0cd6aae276cea004867ccabf --000e0cd6aae276cea004867ccabf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I also use git at work -- I have a central 'repo' on my work network share and when using my laptop or desktop, I simply pull and push from/to the central repo to keep everything in sync. My structure is something like this: ~/org ~/org/aux ~/org/aux/emacs-config ~/org/aux/pics Then on each of my computers I do 'ln -s ~/org/aux/emacs-config ~/.emacs' When I make a change on either computer for some new option I want to use, it's updated with the next pull from the other computer. I also used to kee= p a ~/org/aux/elisp folder as well so that I could even sync my various additional elisp files. I discontinued this only because my org.git repo wasn't pulling/pushing since git doesn't like nested git repos. There is a way to do this, but since I hardly change my elisp folder, I decided it wasn't worth it. John On Thu, May 13, 2010 at 10:32 AM, charles snyder wrote= : > Thanks > > - perfect > > On Thu, May 13, 2010 at 7:37 AM, Jan B=F6cker wr= ote: > >> 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 >> > > > > -- > Charles L. Snyder, MD > Professor of Surgery > Children's Mercy Hospital > Kansas City, MO > www.clsnyder.com > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > --000e0cd6aae276cea004867ccabf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I also use git at work -- I have a central 'repo' on my work networ= k share and when using my laptop or desktop, I simply pull and push from/to= the central repo to keep everything in sync.

My structure is someth= ing like this:
~/org
~/org/aux
~/org/aux/emacs-config
~/org/aux/pics

Then = on each of my computers I do 'ln -s ~/org/aux/emacs-config ~/.emacs'= ;

When I make a change on either computer for some new option I want= to use, it's updated with the next pull from the other computer. I als= o used to keep a ~/org/aux/elisp folder as well so that I could even sync m= y various additional elisp files. I discontinued this only because my org.g= it repo wasn't pulling/pushing since git doesn't like nested git re= pos. There is a way to do this, but since I hardly change my elisp folder, = I decided it wasn't worth it.


John

On Thu, May 13, 2010 at 10:3= 2 AM, charles snyder <clsnyder@gmail.com> wrote:
Thanks

- perfect

On Thu, May 13, 2= 010 at 7:37 AM, Jan B=F6cker <jan.boecker@jboecker.de>= wrote:
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,<= br> > just do something like this throughout the file:
>
> (add-to-list 'load-path "cls-org-file" + org-mode6.35i/l= isp" )
> (add-to-list 'load-path "cls-org-file" + personal.org
> <http://per= sonal.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<= br> 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:

=A0(setq jb/system
=A0 =A0 =A0 =A0(cond ((string-match "N900" system-name) 'n90= 0)
=A0 =A0 =A0 =A0 =A0 =A0 =A0((string-match "pythagoras" system-na= me) 'laptop)
=A0 =A0 =A0 =A0 =A0 =A0 =A0(t 'unknown)))

and later I can do:

(when (eq jb/system 'n900)
=A0(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



--
Charles L. Snyder, MDProfessor of Surgery
Children's Mercy Hospital
Kansas City, MO<= br>www.clsnyder.com

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


--000e0cd6aae276cea004867ccabf-- --===============0088659545== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0088659545==--