* Re: how to keep .emacs files in synch
2007-10-03 17:43 how to keep .emacs files in synch kj
@ 2007-10-03 18:51 ` Ekkehard Görlach
2007-10-03 19:16 ` Harald Hanche-Olsen
2007-10-03 19:30 ` Andrew Walrond
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Ekkehard Görlach @ 2007-10-03 18:51 UTC (permalink / raw)
To: help-gnu-emacs
kj <socyl@987jk.com.invalid> writes:
> 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.
>
As for 2) I split my .emacs in a common .emacs and a .emacs-local. The
first thing in .emacs is to load .emacs-local.
(load "~/.emacs-local")
This in turn defines - among other things like the default printer -
the directory where I put my extensions on that system, e.g. on a w32
box
(setq local-site-path "e:/prog/elisp"
local-prog-path "e:/prog")
[ ... more local stuff ...]
Upon return to .emacs the local paths are added to my load-path
(setq load-path (cons local-site-path load-path))
Larger extensions I am then able to load on all machines in a universl
manner from whithin .emacs, e.g.
(add-to-list 'load-path
(expand-file-name (concat local-site-path "/ess/lisp")))
Not really a big thing, but it works for me. Off course I assume that
underneath the local-site-path all systems look the same for what is
loaded in .emacs.
For a while I synched .emacs via CVS. But after a while it was pretty
stable, so I don't do this any more.
Just my two cents,
Ekkehard
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-03 18:51 ` Ekkehard Görlach
@ 2007-10-03 19:16 ` Harald Hanche-Olsen
0 siblings, 0 replies; 13+ messages in thread
From: Harald Hanche-Olsen @ 2007-10-03 19:16 UTC (permalink / raw)
To: help-gnu-emacs
+ Ekkehard Görlach <e.goerlach@computer.org>:
> For a while I synched .emacs via CVS. But after a while it was
> pretty stable, so I don't do this any more.
That is what I still do. Not only with .emacs, but with loads of
other configuration files. Seems they never stabilize enough for me
to stop doing it. 8-)
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-03 17:43 how to keep .emacs files in synch kj
2007-10-03 18:51 ` Ekkehard Görlach
@ 2007-10-03 19:30 ` Andrew Walrond
2007-10-04 9:24 ` Andreas Röhler
2007-10-04 7:03 ` Rainer Stengele
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Andrew Walrond @ 2007-10-03 19:30 UTC (permalink / raw)
To: kj; +Cc: help-gnu-emacs
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.
And of course all my important .emacs, .emacs.d/ and other settings are
stored in a mercurial repository. On a machine I haven't used for a while,
hg pull -u
gets all the latest files before I start work. If I make some changes to
the local .emacs,
hg commit
hg push
makes the changes available to all my other machines.
SCM this easy has all sorts of uses :)
Andrew Walrond
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-03 19:30 ` Andrew Walrond
@ 2007-10-04 9:24 ` Andreas Röhler
2007-10-04 16:25 ` Edward O'Connor
0 siblings, 1 reply; 13+ messages in thread
From: Andreas Röhler @ 2007-10-04 9:24 UTC (permalink / raw)
To: help-gnu-emacs
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.
>
....
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)
...
((string-match "21.4" (emacs-version))
(if
(file-readable-p "~/.gnu-emacs-custom")
(progn (load "~/.gnu-emacs-custom" t t)
...
(t (message "%s" "No Emacs init file found")))
Extendable with
(when (string-match "my-host" (getenv "HOST")))
for example.
Andreas Röhler
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-04 9:24 ` Andreas Röhler
@ 2007-10-04 16:25 ` Edward O'Connor
2007-10-04 18:26 ` Andreas Röhler
0 siblings, 1 reply; 13+ messages in thread
From: Edward O'Connor @ 2007-10-04 16:25 UTC (permalink / raw)
To: help-gnu-emacs
> Solved it in my ~/.emacs file that way:
> (cond ((string-match "XEmacs\\|Lucid" emacs-version)
Better to test (featurep 'xemacs).
> (when (file-readable-p "~/.xemacs/init.el")
You could roll this into the cond test. Same goes for the other cond
clauses. That is,
(cond ((and (featurep 'xemacs) (file-readable-p "~/.xemacs/init.el"))
(load "~/.xemacs/init.el" nil t))
...)
This'll let you avoid explicit progns, like in this clause of yours:
> ((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)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-04 16:25 ` Edward O'Connor
@ 2007-10-04 18:26 ` Andreas Röhler
0 siblings, 0 replies; 13+ messages in thread
From: Andreas Röhler @ 2007-10-04 18:26 UTC (permalink / raw)
To: help-gnu-emacs
Thanks a lot! Always nice to have some progress.
Andreas Röhler
Am Donnerstag, 4. Oktober 2007 18:25 schrieb Edward O'Connor:
> > Solved it in my ~/.emacs file that way:
> >
> > (cond ((string-match "XEmacs\\|Lucid" emacs-version)
>
> Better to test (featurep 'xemacs).
>
> > (when (file-readable-p "~/.xemacs/init.el")
>
> You could roll this into the cond test. Same goes for the other cond
> clauses. That is,
>
> (cond ((and (featurep 'xemacs) (file-readable-p "~/.xemacs/init.el"))
> (load "~/.xemacs/init.el" nil t))
> ...)
>
> This'll let you avoid explicit progns, like in this clause of yours:
> > ((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)
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-03 17:43 how to keep .emacs files in synch kj
2007-10-03 18:51 ` Ekkehard Görlach
2007-10-03 19:30 ` Andrew Walrond
@ 2007-10-04 7:03 ` Rainer Stengele
2007-10-05 16:57 ` kj
2007-10-04 8:31 ` William Xu
2007-10-04 9:53 ` Tim X
4 siblings, 1 reply; 13+ messages in thread
From: Rainer Stengele @ 2007-10-04 7:03 UTC (permalink / raw)
To: help-gnu-emacs
kj schrieb:
> 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.
>
> Thanks!
>
> kj
I use subversion to sync (and backup!) all emacs related config files.
I also have an automatic "save files and checkin" procedure - started on my office pc after I left
work to be sure I can checkout the latest files at home.
In my .emacs file I switch configs depending on the hostname of the machine I am working on.
My goal is to have one single .emacs file for all platforms.
rainer
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-04 7:03 ` Rainer Stengele
@ 2007-10-05 16:57 ` kj
0 siblings, 0 replies; 13+ messages in thread
From: kj @ 2007-10-05 16:57 UTC (permalink / raw)
To: help-gnu-emacs
In <lf0Ni.9$ch4.7410882@news.odn.de> Rainer Stengele <rainer.stengele@diplan.de> writes:
>I also have an automatic "save files and checkin" procedure - started on my office pc after I left
>work to be sure I can checkout the latest files at home.
Hmmm... I'm curious about how you implement the timing (or
triggering) of this automatic procedure.
My interest in this question extends beyond the problem of keeping
my .emacs files in synch. There are a few other housekeeping jobs
like this one that I'd like to run automatically "right after I
leave work", but the time I leave work varies considerably from
day to day, so following a fixed daily schedule for doing this
(e.g. with cron) would not work too well in general...
Come to think of it, given my work habits, it probably would require
a pretty sophisticated bit of AI to have such jobs run for me
automatically and at the right time every day...
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-03 17:43 how to keep .emacs files in synch kj
` (2 preceding siblings ...)
2007-10-04 7:03 ` Rainer Stengele
@ 2007-10-04 8:31 ` William Xu
2007-10-04 9:53 ` Tim X
4 siblings, 0 replies; 13+ messages in thread
From: William Xu @ 2007-10-04 8:31 UTC (permalink / raw)
To: help-gnu-emacs
kj <socyl@987jk.com.invalid> writes:
> I'd be interested to read how others solve this problem.
I use emacs on my ibook + tramp / sshfs / samba, etc..
--
William
http://williamxu.net9.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-03 17:43 how to keep .emacs files in synch kj
` (3 preceding siblings ...)
2007-10-04 8:31 ` William Xu
@ 2007-10-04 9:53 ` Tim X
2007-10-04 11:34 ` weber
4 siblings, 1 reply; 13+ messages in thread
From: Tim X @ 2007-10-04 9:53 UTC (permalink / raw)
To: help-gnu-emacs
kj <socyl@987jk.com.invalid> writes:
> 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.
>
I just use one emacs!
Actually, thats a bit of a lie. I use one emacs at work. All editing is
done through that emacs via tramp over an ssh connection. I run a separate
emacs at home.
I do maintain only a single .emacs file, which is under version control. I
have a SYSTEM_PROFILE environment variable, which is set to either home,
work, work-laptop, home-laptop (there is actually only one laptop, whihc I
may use at home or work). nearly all my emacs settings are constant, but I
do have some specific settings that depend on whether I'm at home, work or
on the laptop at home or work. For these profile specific sections, I just
put my bits of elisp inside an if, cond, unless etc test which looks at the
value of the envrioinment variable. Not very sophisticated, but it works
well and isn't so complicated as to break everytime something changes or
gets updated.
The version control is a subversion repository which I can access from home
or work. When I make a change, I commit them to the repository. When I'm on
another system, I can update from the repository to get the latest
changes.
Another approach I've used for environments where I don't have a dedicated
desktop or laptop is to NFS my home directory so that no matter what host I
log into directly, my home directory (and hence my .emacs) is there. Of
course, there are some risks and you need to keep in mind that NFS can be
slow and is not good for things like mail folders (probably ok for maildir
style, but not mbox). if the NFS export host goes down, then your pretty
much stuffed on all systems.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-04 9:53 ` Tim X
@ 2007-10-04 11:34 ` weber
2007-10-04 12:14 ` Andrew Walrond
0 siblings, 1 reply; 13+ messages in thread
From: weber @ 2007-10-04 11:34 UTC (permalink / raw)
To: help-gnu-emacs
On Oct 4, 6:53 am, Tim X <t...@nospam.dev.null> wrote:
> kj <so...@987jk.com.invalid> writes:
> > 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.
>
> I just use one emacs!
>
> Actually, thats a bit of a lie. I use one emacs at work. All editing is
> done through that emacs via tramp over an ssh connection. I run a separate
> emacs at home.
>
> I do maintain only a single .emacs file, which is under version control. I
> have a SYSTEM_PROFILE environment variable, which is set to either home,
> work, work-laptop, home-laptop (there is actually only one laptop, whihc I
> may use at home or work). nearly all my emacs settings are constant, but I
> do have some specific settings that depend on whether I'm at home, work or
> on the laptop at home or work. For these profile specific sections, I just
> put my bits of elisp inside an if, cond, unless etc test which looks at the
> value of the envrioinment variable. Not very sophisticated, but it works
> well and isn't so complicated as to break everytime something changes or
> gets updated.
>
> The version control is a subversion repository which I can access from home
> or work. When I make a change, I commit them to the repository. When I'm on
> another system, I can update from the repository to get the latest
> changes.
>
> Another approach I've used for environments where I don't have a dedicated
> desktop or laptop is to NFS my home directory so that no matter what host I
> log into directly, my home directory (and hence my .emacs) is there. Of
> course, there are some risks and you need to keep in mind that NFS can be
> slow and is not good for things like mail folders (probably ok for maildir
> style, but not mbox). if the NFS export host goes down, then your pretty
> much stuffed on all systems.
>
> Tim
>
> --
> tcross (at) rapttech dot com dot au
In my head a distributed versioning system like darcs would be nice
for keeping my emacs updated between pcs, so i could send patches to
myself via email...
But after trying it I found out that it also needs a central
repository for comparing what has changed. (I thought you could just
say "everything that changed since yesterday"
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: how to keep .emacs files in synch
2007-10-04 11:34 ` weber
@ 2007-10-04 12:14 ` Andrew Walrond
0 siblings, 0 replies; 13+ messages in thread
From: Andrew Walrond @ 2007-10-04 12:14 UTC (permalink / raw)
To: weber; +Cc: help-gnu-emacs
weber wrote:
>
> In my head a distributed versioning system like darcs would be nice
> for keeping my emacs updated between pcs, so i could send patches to
> myself via email...
> But after trying it I found out that it also needs a central
> repository for comparing what has changed. (I thought you could just
> say "everything that changed since yesterday"
>
Hmm not entirely sure what you mean. But with Mercurial (good
distributed SCM), you could share your .config files with something like
this:
cd ~
hg init
hg add .emacs .emacs/* .screenrc
hg commit
Whenever you make changes, just do
hg commit
Then on any other server, something like
cd ~
hg init
hg pull ssh://me@fqdn_of_server_one/~/
would get the files. Subsequent changes could be retrieved with a simple
hg pull -u
or 'pushed' to another server with
hg push ssh://me@fqdn_of_server/~/
Doesn't get much simpler than that :)
Andrew Walrond
^ permalink raw reply [flat|nested] 13+ messages in thread