info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronizing multiple computers


From: Reiner Steib
Subject: Re: Synchronizing multiple computers
Date: Mon, 28 Jan 2008 22:34:20 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On Mon, Jan 28 2008, David wrote:

> http://www.emacswiki.org/cgi-bin/wiki/GnusSync
| To make things more concise, I like to put all files I want to sync
| in one central Gnus-directory. Create a directory ~/Gnus and put the
| following into your .gnus right at the beginning:
| 
| (setq gnus-home-directory "~/Gnus"
|       gnus-startup-file "~/Gnus/.newsrc"
|       message-directory "~/Gnus/Mail"
|       gnus-directory "~/Gnus/News"
|       gnus-article-save-directory "~/Gnus/News"
|       message-auto-save-directory "~/Gnus/Mail/drafts"
|       gnus-cache-directory "~/Gnus/News/Cache"
|       gnus-kill-files-directory "~/Gnus/News"
|       mail-source-directory "~/Gnus/Mail" 
| ; If you use the registry
|       gnus-registry-cache-file "~/Gnus/.gnus.registry.eld"
| ; If you use gnus-agent
|       gnus-agent-directory "~/Gnus/agent"
[...]
| I’m sure some of these are redundant since they are generated from
| others, 

,----[ (info "(gnus)Various Various") ]
| `gnus-home-directory'
|      All Gnus file and directory variables will be initialized from this
|      variable, which defaults to `~/'.
`----

,----[ (info "(message)Various Message Variables") ]
| `message-directory'
|      Directory used by many mailey things.  The default is `~/Mail/'.
|      All other mail file variables are derived from `message-directory'.
`----

| but I guess it does no harm to set them all explicitly.

It's confusing and error-prone, IMHO.

| rsync -e "ssh -l name" -auvzp workcomputer:./Gnus ~/.

Only ancient versions of rsync don't use ssh by default.  So this
could be...

$ rsync -auvzp name@workcomputer:./Gnus ~/.

| (defun DE-sync-gnus (arg)
|   (interactive)
|   (let ((bufname (get-buffer-create "*GNUS SYNC*")))
|     (switch-to-buffer bufname)
|     (call-process "/usr/local/bin/gnus-sync-script" nil bufname t arg)))

I'd suggest to get rid of the shell script and do it in elisp[1].
Within Emacs, the values of `gnus-directory', `message-directory',
`gnus-startup-file', ... are available, you can use them in the sync
function.  I'd guess that you don't even need to bother about frobbing
`gnus-home-directory' and `message-directory'.  Just rsync ~/.newsrc*,
~/Mail and ~/News.  Or am I missing something?
 
| (add-hook 'gnus-before-startup-hook (lambda () (DE-sync-gnus "fromwork")))
| (add-hook 'gnus-after-exiting-gnus-hook (lambda () (DE-sync-gnus "towork")))

Nice idea.  Maybe adding a prompt "Do you want to sync from ... to
...?" would make sense.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]