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

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

Re: Solution for gnus wide sync


From: Brett Viren
Subject: Re: Solution for gnus wide sync
Date: Sun, 12 Dec 2010 20:15:25 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Andi Albrecht <albrecht.andi <at> gmail.com> writes:

> I'm using Dropbox too for a while now and it works pretty well. The only
> thing I've never tried is to be logged in on both machines at the same
> time with a running Gnus on both. Dropbox has no automatic merging, so
> maybe this could cause some problems.

I played with using Dropbox but now I'm trying with git.  Here is what I do.

I have a "gnus.git" bare repository that I clone onto ~/gnus on workstation and 
laptop.  All emacs setup is same on both.

In .emacs:

(setq 
 gnus-startup-file "~/gnus/.newsrc"
 gnus-directory "~/gnus/"
 gnus-dribble-directory "~/gnus/"
 mail-source-directory "~/gnus/incoming/"
 gnus-cache-directory "~/gnus/cache/"
)

(add-hook 'gnus-after-exiting-gnus-hook
          (lambda ()
            (shell-command "gnus-sync push")))

At the very top of .gnus:

(shell-command "gnus-sync pull")

The "gnus-sync" script simply collects some git commands.  A push does:

    cd $HOME/gnus
    git add overview drafts .newsrc.eld
    git commit -a -m "State of gnus as of $(date)"
    git push

A "pull" does:

    cd $HOME/gnus
    git pull

Like with the dropbox approach it is possible to get conflicts when the 
pull/push cycle of one system overlaps with another.

The mail itself is synced from workstation to laptop using offlineimap in IMAP-
to-IMAP with dovecot serving both ends.

This seems to all work fairly well but some problems remain:

 * I have years of monthly outboxes on the workstation that are not synced to 
the laptop.  Each time the workstation runs gnus these get added as new groups 
and they can't be opened on the laptop.  I guess I can fix this by doing a 
monthly sync of some kind.

 * I still have the problem (posted previously) that most groups no longer load 
just new, unread articles but try to load all articles as if C-u ENTER was done 
on the group (instead of just ENTER).

-Brett.





reply via email to

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