* one .emacs on multiple computers @ 2010-05-13 1:48 charles snyder 2010-05-13 12:37 ` Jan Böcker 0 siblings, 1 reply; 5+ messages in thread From: charles snyder @ 2010-05-13 1:48 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 1675 bytes --] Hi I find I am running org mode from a Dropbox folder (and my org files) from several machines - a couple of windows computers at home and one at work, and several Macs. I have modified my .emacs file(s) ala Bernt Hansen's and others modifications. However, all of the computers (of course) have different paths to the latest version of the orgmode files in Dropbox folder, and to my personal orgmode files, for example: link to org-mode6.35i -> "C:/Users/clsnyder/My Documents/My Dropbox/emacs_org/org-mode6.35i/lisp" ;;Windows machine 1 "C:/Users/cls/My Documents/My Dropbox/emacs_org/org-mode6.35i/lisp" ;;Windows machine 2 "/Users/clsnyder/Dropbox/emacs_org/org-mode6.35i/lisp" ;;Mac machine 1 link to my todo file (for example) -> "C:/Users/clsnyder/My Documents/My Dropbox/emacs_org/personal.org" "C:/Users/cls/My Documents/My Dropbox/emacs_org/personal.org" "/Users/clsnyder/Dropbox/emacs_org/personal.org" 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" ) I don't know the correct syntax, but I would like to simply define the path variable in each .emacs file, and then I could basically have use the same .emacs file everywhere, with just a few different lines at the start to differentiate the individual machine's path. Thanks in advance. Charles Snyder -- [-- Attachment #1.2: Type: text/html, Size: 2100 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: one .emacs on multiple computers 2010-05-13 1:48 one .emacs on multiple computers charles snyder @ 2010-05-13 12:37 ` Jan Böcker 2010-05-13 13:34 ` Scot Becker 2010-05-13 15:32 ` charles snyder 0 siblings, 2 replies; 5+ messages in thread From: Jan Böcker @ 2010-05-13 12:37 UTC (permalink / raw) 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 > <http://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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: one .emacs on multiple computers 2010-05-13 12:37 ` Jan Böcker @ 2010-05-13 13:34 ` Scot Becker 2010-05-13 15:32 ` charles snyder 1 sibling, 0 replies; 5+ messages in thread From: Scot Becker @ 2010-05-13 13:34 UTC (permalink / raw) To: Jan Böcker; +Cc: emacs-orgmode, charles snyder [-- Attachment #1.1: Type: text/plain, Size: 2713 bytes --] Many thanks from me too, Jan. That's very helpful. Scot On Thu, May 13, 2010 at 1:37 PM, Jan Böcker <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, > > 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 > > <http://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 > > _______________________________________________ > 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 > [-- Attachment #1.2: Type: text/html, Size: 3666 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: one .emacs on multiple computers 2010-05-13 12:37 ` Jan Böcker 2010-05-13 13:34 ` Scot Becker @ 2010-05-13 15:32 ` charles snyder 2010-05-13 17:07 ` John Hendy 1 sibling, 1 reply; 5+ messages in thread From: charles snyder @ 2010-05-13 15:32 UTC (permalink / raw) To: Jan Böcker; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 2572 bytes --] Thanks - perfect On Thu, May 13, 2010 at 7:37 AM, Jan Böcker <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, > > 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 > > <http://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 [-- Attachment #1.2: Type: text/html, Size: 3447 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: one .emacs on multiple computers 2010-05-13 15:32 ` charles snyder @ 2010-05-13 17:07 ` John Hendy 0 siblings, 0 replies; 5+ messages in thread From: John Hendy @ 2010-05-13 17:07 UTC (permalink / raw) To: charles snyder; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 3813 bytes --] 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 keep 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 <clsnyder@gmail.com> wrote: > Thanks > > - perfect > > On Thu, May 13, 2010 at 7:37 AM, Jan Böcker <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, >> > 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 >> > <http://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 > > [-- Attachment #1.2: Type: text/html, Size: 5069 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-13 17:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-13 1:48 one .emacs on multiple computers charles snyder 2010-05-13 12:37 ` Jan Böcker 2010-05-13 13:34 ` Scot Becker 2010-05-13 15:32 ` charles snyder 2010-05-13 17:07 ` John Hendy
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).